unread_entries.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. {{ define "title"}}{{ t "page.unread.title" }} {{ if gt .countUnread 0 }}({{ .countUnread }}){{ end }} {{ end }}
  2. {{ define "content"}}
  3. <section class="page-header">
  4. <h1>{{ t "page.unread.title" }} (<span class="unread-counter">{{ .countUnread }}</span>)</h1>
  5. {{ if .entries }}
  6. <ul>
  7. <li>
  8. <a href="#"
  9. data-action="markPageAsRead"
  10. data-show-only-unread="1"
  11. data-label-question="{{ t "confirm.question" }}"
  12. data-label-yes="{{ t "confirm.yes" }}"
  13. data-label-no="{{ t "confirm.no" }}"
  14. data-label-loading="{{ t "confirm.loading" }}">{{ 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-url="{{ route "markAllAsRead" }}"
  20. data-redirect-url="{{ route "unread" }}"
  21. data-label-question="{{ t "confirm.question" }}"
  22. data-label-yes="{{ t "confirm.yes" }}"
  23. data-label-no="{{ t "confirm.no" }}"
  24. data-label-loading="{{ t "confirm.loading" }}">{{ icon "mark-all-as-read" }}{{ t "menu.mark_all_as_read" }}</a>
  25. </li>
  26. </ul>
  27. {{ end }}
  28. </section>
  29. {{ if not .entries }}
  30. <p class="alert">{{ t "alert.no_unread_entry" }}</p>
  31. {{ else }}
  32. <div class="pagination-top">
  33. {{ template "pagination" .pagination }}
  34. </div>
  35. <div class="items hide-read-items">
  36. {{ range .entries }}
  37. <article role="article" class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
  38. <div class="item-header" dir="auto">
  39. <span class="item-title">
  40. {{ if ne .Feed.Icon.IconID 0 }}
  41. <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
  42. {{ end }}
  43. <a href="{{ route "unreadEntry" "entryID" .ID }}" title="{{ .Title }}">{{ .Title }}</a>
  44. </span>
  45. <span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
  46. </div>
  47. {{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
  48. </article>
  49. {{ end }}
  50. </div>
  51. <section class="page-footer">
  52. {{ if .entries }}
  53. <ul>
  54. <li>
  55. <a href="#"
  56. data-action="markPageAsRead"
  57. data-label-question="{{ t "confirm.question" }}"
  58. data-label-yes="{{ t "confirm.yes" }}"
  59. data-label-no="{{ t "confirm.no" }}"
  60. data-label-loading="{{ t "confirm.loading" }}">{{ icon "mark-page-as-read" }}{{ t "menu.mark_page_as_read" }}</a>
  61. </li>
  62. </ul>
  63. {{ end }}
  64. </section>
  65. <div class="pagination-bottom">
  66. {{ template "pagination" .pagination }}
  67. </div>
  68. {{ end }}
  69. {{ end }}