diff options
Diffstat (limited to 'templates/lists.tmpl')
-rw-r--r-- | templates/lists.tmpl | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/templates/lists.tmpl b/templates/lists.tmpl index 27979cb..59c53fe 100644 --- a/templates/lists.tmpl +++ b/templates/lists.tmpl @@ -1,33 +1,37 @@ {{with .Data}} {{template "header.tmpl" (WithContext .CommonData $.Ctx)}} -<div class="page-title"> Lists </div> +<h1>Lists</h1> -{{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> +{{if .Lists}} +<table> + {{range .Lists}} + <tr> + <td><a href="/timeline/list?list={{.ID}}">{{.Title}} timeline</a></td> + <td> + <form action="/list/{{.ID}}" method="GET"> + <button type="submit">Edit</button> + </form> + </td> + <td> + <form 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">Delete</button> + </form> + </td> + </tr> + {{end}} +</table> {{else}} -<div class="no-data-found">No data found</div> + <p>No lists added</p> {{end}} -<div class="page-title"> Add list </div> +<h1>Add List</h1> <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> + <label for="title">Title</label> + <input type="text" id="title" name="title" required> <button type="submit"> Add </button> </form> |