category_entries.html 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {{ define "title"}}{{ .category.Title }} ({{ .total }}){{ end }}
  2. {{ define "content"}}
  3. <section class="page-header">
  4. <h1>{{ .category.Title }} ({{ .total }})</h1>
  5. <ul>
  6. {{ if .entries }}
  7. <li>
  8. <a href="#"
  9. data-action="markPageAsRead"
  10. data-label-question="{{ t "confirm.question" }}"
  11. data-label-yes="{{ t "confirm.yes" }}"
  12. data-label-no="{{ t "confirm.no" }}"
  13. data-label-loading="{{ t "confirm.loading" }}"
  14. data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ t "menu.mark_page_as_read" }}</a>
  15. </li>
  16. {{ end }}
  17. {{ if .showOnlyUnreadEntries }}
  18. <li>
  19. <a href="{{ route "categoryEntriesAll" "categoryID" .category.ID }}">{{ t "menu.show_all_entries" }}</a>
  20. </li>
  21. {{ else }}
  22. <li>
  23. <a href="{{ route "categoryEntries" "categoryID" .category.ID }}">{{ t "menu.show_only_unread_entries" }}</a>
  24. </li>
  25. {{ end }}
  26. </ul>
  27. </section>
  28. {{ if not .entries }}
  29. <p class="alert">{{ t "alert.no_category_entry" }}</p>
  30. {{ else }}
  31. <div class="items">
  32. {{ range .entries }}
  33. <article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
  34. <div class="item-header">
  35. <span class="item-title">
  36. {{ if ne .Feed.Icon.IconID 0 }}
  37. <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
  38. {{ end }}
  39. <a href="{{ route "categoryEntry" "categoryID" .Feed.Category.ID "entryID" .ID }}">{{ .Title }}</a>
  40. </span>
  41. <span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
  42. </div>
  43. {{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
  44. </article>
  45. {{ end }}
  46. </div>
  47. <section class="page-footer">
  48. {{ if .entries }}
  49. <ul>
  50. <li>
  51. <a href="#"
  52. data-action="markPageAsRead"
  53. data-label-question="{{ t "confirm.question" }}"
  54. data-label-yes="{{ t "confirm.yes" }}"
  55. data-label-no="{{ t "confirm.no" }}"
  56. data-label-loading="{{ t "confirm.loading" }}"
  57. data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ t "menu.mark_page_as_read" }}</a>
  58. </li>
  59. </ul>
  60. {{ end }}
  61. </section>
  62. {{ template "pagination" .pagination }}
  63. {{ end }}
  64. {{ end }}