category_entries.html 3.3 KB

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