diff options
Diffstat (limited to 'components')
-rw-r--r-- | components/index.html | 4 | ||||
-rw-r--r-- | components/recommendation.html | 15 |
2 files changed, 12 insertions, 7 deletions
diff --git a/components/index.html b/components/index.html index 3693a56..a1d9293 100644 --- a/components/index.html +++ b/components/index.html @@ -10,9 +10,10 @@ </head> <body> <div id="ancestor"> - {{ if not . }} + {{ if not .Username }} <div> {{ template "auth" }} + {{ template "recommendation" .Recommendations}} </div> {{ else }} <div> @@ -20,6 +21,7 @@ </div> <div> {{ template "showformbtn" }} + {{ template "recommendation" .Recommendations}} </div> {{ end }} </div> diff --git a/components/recommendation.html b/components/recommendation.html index 5036088..17e622a 100644 --- a/components/recommendation.html +++ b/components/recommendation.html @@ -1,4 +1,7 @@ -{{define "recommentdation"}} +{{define "recommendation"}} +<hr> +<h4>Recommendations</h4> +<p>Some actions used by other users for inspiration.</p> <div class="actiontable"> <p>ActionTypePlus</p> <table> @@ -6,10 +9,10 @@ <th>Name</th> <th>Magnitude</th> <th>Repeatable</th> - <th>Commit</th> + <th>Copy</th> </tr> - {{range $action := .Actions}} - {{if and (eq $action.Type "ActionTypePlus") (or (not $action.Done) ($action.Repeatable))}} + {{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> @@ -29,9 +32,9 @@ <th>Name</th> <th>Magnitude</th> <th>Repeatable</th> - <th>Commit</th> + <th>Copy</th> </tr> - {{range $action := .Actions}} + {{range $action := .}} {{if eq $action.Type "ActionTypeMinus"}} <form hx-post="/done" hx-target="#ancestor" hx-swap="outerHTML"> <tr> |