aboutsummaryrefslogtreecommitdiff
path: root/templates/lists.tmpl
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2022-09-23 17:22:54 +0000
committerr <r@freesoftwareextremist.com>2022-09-23 17:22:54 +0000
commitf55595ddb63bd8afb4c85945b82aa1f174050e6b (patch)
tree3e9f909097c026b065365846ca8143295097a09f /templates/lists.tmpl
parentb8c0133bcd5e7f1d4063ad992949cc19d18e7aad (diff)
parent68698a9e1afce43ef807d6b5f892ca1c0f905b8a (diff)
downloadbloat-f55595ddb63bd8afb4c85945b82aa1f174050e6b.tar.gz
bloat-f55595ddb63bd8afb4c85945b82aa1f174050e6b.zip
Merge branch 'master' into absolute_fluorideabsolute_fluoride
Diffstat (limited to 'templates/lists.tmpl')
-rw-r--r--templates/lists.tmpl35
1 files changed, 35 insertions, 0 deletions
diff --git a/templates/lists.tmpl b/templates/lists.tmpl
new file mode 100644
index 0000000..27979cb
--- /dev/null
+++ b/templates/lists.tmpl
@@ -0,0 +1,35 @@
+{{with .Data}}
+{{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
+<div class="page-title"> Lists </div>
+
+{{range .Lists}}
+<div>
+ <a href="/timeline/list?list={{.ID}}"> {{.Title}} timeline </a>
+ -
+ <form class="d-inline" action="/list/{{.ID}}" method="GET">
+ <button type="submit" class="btn-link"> edit </button>
+ </form>
+ -
+ <form class="d-inline" action="/list/{{.ID}}/remove" method="POST">
+ <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
+ <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
+ <button type="submit" class="btn-link"> delete </button>
+ </form>
+</div>
+{{else}}
+<div class="no-data-found">No data found</div>
+{{end}}
+
+<div class="page-title"> Add list </div>
+<form action="/list" method="POST">
+ <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
+ <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
+ <span class="settings-form-field">
+ <label for="title"> Title </label>
+ <input id="title" name="title" required>
+ </span>
+ <button type="submit"> Add </button>
+</form>
+
+{{template "footer.tmpl"}}
+{{end}}