unread_entries.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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-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" }}">{{ t "menu.mark_page_as_read" }}</a>
  14. </li>
  15. <li>
  16. <a href="#"
  17. data-confirm="true"
  18. data-url="{{ route "markAllAsRead" }}"
  19. data-redirect-url="{{ route "unread" }}"
  20. data-label-question="{{ t "confirm.question" }}"
  21. data-label-yes="{{ t "confirm.yes" }}"
  22. data-label-no="{{ t "confirm.no" }}"
  23. data-label-loading="{{ t "confirm.loading" }}">{{ t "menu.mark_all_as_read" }}</a>
  24. </li>
  25. </ul>
  26. {{ end }}
  27. </section>
  28. {{ if not .entries }}
  29. <p class="alert">{{ t "alert.no_unread_entry" }}</p>
  30. {{ else }}
  31. <div class="items hide-read-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 "unreadEntry" "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" }}">{{ t "menu.mark_page_as_read" }}</a>
  57. </li>
  58. </ul>
  59. {{ end }}
  60. </section>
  61. {{ template "pagination" .pagination }}
  62. {{ end }}
  63. {{ end }}