category_entries.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 }}">{{ icon "mark-page-as-read" }}{{ t "menu.mark_page_as_read" }}</a>
  15. </li>
  16. <li>
  17. <a href="#"
  18. data-confirm="true"
  19. data-label-question="{{ t "confirm.question" }}"
  20. data-label-yes="{{ t "confirm.yes" }}"
  21. data-label-no="{{ t "confirm.no" }}"
  22. data-label-loading="{{ t "confirm.loading" }}"
  23. data-url="{{ route "markCategoryAsRead" "categoryID" .category.ID }}">{{ icon "mark-all-as-read" }}{{ t "menu.mark_all_as_read" }}</a>
  24. </li>
  25. {{ end }}
  26. {{ if .showOnlyUnreadEntries }}
  27. <li>
  28. <a href="{{ route "categoryEntriesAll" "categoryID" .category.ID }}">{{ icon "show-all-entries" }}{{ t "menu.show_all_entries" }}</a>
  29. </li>
  30. {{ else }}
  31. <li>
  32. <a href="{{ route "categoryEntries" "categoryID" .category.ID }}">{{ icon "show-unread-entries" }}{{ t "menu.show_only_unread_entries" }}</a>
  33. </li>
  34. {{ end }}
  35. <li>
  36. <a href="{{ route "categoryFeeds" "categoryID" .category.ID }}">{{ icon "feeds" }}{{ t "menu.feeds" }}</a>
  37. </li>
  38. <li>
  39. <a href="{{ route "refreshCategoryEntriesPage" "categoryID" .category.ID }}">{{ icon "refresh" }}{{ t "menu.refresh_all_feeds" }}</a>
  40. </li>
  41. </ul>
  42. </section>
  43. {{ if not .entries }}
  44. <p class="alert">{{ t "alert.no_category_entry" }}</p>
  45. {{ else }}
  46. <div class="pagination-top">
  47. {{ template "pagination" .pagination }}
  48. </div>
  49. <div class="items">
  50. {{ range .entries }}
  51. <article role="article" class="item entry-item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
  52. <div class="item-header" dir="auto">
  53. <span class="item-title">
  54. {{ if ne .Feed.Icon.IconID 0 }}
  55. <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
  56. {{ end }}
  57. <a href="{{ route "categoryEntry" "categoryID" .Feed.Category.ID "entryID" .ID }}" title="{{ .Title }}">{{ .Title }}</a>
  58. </span>
  59. <span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
  60. </div>
  61. {{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
  62. </article>
  63. {{ end }}
  64. </div>
  65. <section class="page-footer">
  66. {{ if .entries }}
  67. <ul>
  68. <li>
  69. <a href="#"
  70. data-action="markPageAsRead"
  71. data-label-question="{{ t "confirm.question" }}"
  72. data-label-yes="{{ t "confirm.yes" }}"
  73. data-label-no="{{ t "confirm.no" }}"
  74. data-label-loading="{{ t "confirm.loading" }}"
  75. data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ icon "mark-page-as-read" }}{{ t "menu.mark_page_as_read" }}</a>
  76. </li>
  77. </ul>
  78. {{ end }}
  79. </section>
  80. <div class="pagination-bottom">
  81. {{ template "pagination" .pagination }}
  82. </div>
  83. {{ end }}
  84. {{ end }}