category_entries.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {{ define "title"}}{{ .category.Title }} ({{ .total }}){{ end }}
  2. {{ define "content"}}
  3. <section class="page-header">
  4. <h1 dir="auto">{{ .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. <li>
  27. <a href="{{ route "categoryFeeds" "categoryID" .category.ID }}">{{ t "menu.feeds" }}</a>
  28. </li>
  29. </ul>
  30. </section>
  31. {{ if not .entries }}
  32. <p class="alert">{{ t "alert.no_category_entry" }}</p>
  33. {{ else }}
  34. <div class="items">
  35. {{ range .entries }}
  36. <article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
  37. <div class="item-header" dir="auto">
  38. <span class="item-title">
  39. {{ if ne .Feed.Icon.IconID 0 }}
  40. <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
  41. {{ end }}
  42. <a href="{{ route "categoryEntry" "categoryID" .Feed.Category.ID "entryID" .ID }}">{{ .Title }}</a>
  43. </span>
  44. <span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
  45. </div>
  46. {{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
  47. </article>
  48. {{ end }}
  49. </div>
  50. <section class="page-footer">
  51. {{ if .entries }}
  52. <ul>
  53. <li>
  54. <a href="#"
  55. data-action="markPageAsRead"
  56. data-label-question="{{ t "confirm.question" }}"
  57. data-label-yes="{{ t "confirm.yes" }}"
  58. data-label-no="{{ t "confirm.no" }}"
  59. data-label-loading="{{ t "confirm.loading" }}"
  60. data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ t "menu.mark_page_as_read" }}</a>
  61. </li>
  62. </ul>
  63. {{ end }}
  64. </section>
  65. {{ template "pagination" .pagination }}
  66. {{ end }}
  67. {{ end }}