lists.tmpl 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. {{with .Data}}
  2. {{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
  3. <div class="page-title"> Lists </div>
  4. {{range .Lists}}
  5. <div>
  6. <a href="/timeline/list?list={{.ID}}"> {{.Title}} timeline </a>
  7. -
  8. <form class="d-inline" action="/list/{{.ID}}" method="GET">
  9. <button type="submit" class="btn-link"> edit </button>
  10. </form>
  11. -
  12. <form class="d-inline" action="/list/{{.ID}}/remove" method="POST">
  13. <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
  14. <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
  15. <button type="submit" class="btn-link"> delete </button>
  16. </form>
  17. </div>
  18. {{else}}
  19. <div class="no-data-found">No data found</div>
  20. {{end}}
  21. <div class="page-title"> Add list </div>
  22. <form action="/list" method="POST">
  23. <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
  24. <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
  25. <span class="settings-form-field">
  26. <label for="title"> Title </label>
  27. <input id="title" name="title" required>
  28. </span>
  29. <button type="submit"> Add </button>
  30. </form>
  31. {{template "footer.tmpl"}}
  32. {{end}}