summaryrefslogtreecommitdiff
path: root/components/recommendation.html
blob: 17e622a070c0fc06587345f0d30683eb7850cb96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{{define "recommendation"}}
<hr>
<h4>Recommendations</h4>
<p>Some actions used by other users for inspiration.</p>
<div class="actiontable">
<p>ActionTypePlus</p>
<table>
  <tr>
    <th>Name</th>
    <th>Magnitude</th>
    <th>Repeatable</th>
    <th>Copy</th>
  </tr>
  {{range $action := .}}
    {{if (eq $action.Type "ActionTypePlus")}}
      <form hx-post="/done" hx-target="#ancestor" hx-swap="outerHTML">
      <tr>
        <td><input class="action_name" name="name" value={{$action.Name}} type="hidden" readonly />{{$action.Name}}</td>
        <td>{{$action.Magnitude}}</td>
        <td>{{$action.Repeatable}}</td>
        <td><input type="submit" value="Done It"></input></td>
      </tr>
      </form>
    {{end}}
  {{end}}
</table>
</div>
<div class="actiontable">
<p>ActionTypeMinus</p>
<table>
  <tr>
    <th>Name</th>
    <th>Magnitude</th>
    <th>Repeatable</th>
    <th>Copy</th>
  </tr>
  {{range $action := .}}
    {{if eq $action.Type "ActionTypeMinus"}}
      <form hx-post="/done" hx-target="#ancestor" hx-swap="outerHTML">
      <tr>
        <td><input class="action_name" name="name" value={{$action.Name}} type="hidden" readonly />{{$action.Name}}</td>
        <td>{{$action.Magnitude}}</td>
        <td>{{$action.Repeatable}}</td>
        <td><input type="submit" value="Done It"></input></td>
      </tr>
      </form>
    {{end}}
  {{end}}
</table>
</div>
{{end}}