category_entries.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {{ define "title"}}{{ .category.Title }} ({{ .total }}){{ end }}
  2. {{ define "content"}}
  3. <section class="page-header">
  4. <h1>{{ .category.Title }} ({{ .total }})</h1>
  5. <ul>
  6. {{ if .entries }}
  7. <li>
  8. <a href="#" data-on-click="markPageAsRead"
  9. data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">
  10. {{ t "menu.mark_page_as_read" }}
  11. </a>
  12. </li>
  13. {{ end }}
  14. {{ if .showOnlyUnreadEntries }}
  15. <li>
  16. <a href="{{ route "categoryEntriesAll" "categoryID" .category.ID }}">{{ t "menu.show_all_entries" }}</a>
  17. </li>
  18. {{ else }}
  19. <li>
  20. <a href="{{ route "categoryEntries" "categoryID" .category.ID }}">{{ t "menu.show_only_unread_entries" }}</a>
  21. </li>
  22. {{ end }}
  23. </ul>
  24. </section>
  25. {{ if not .entries }}
  26. <p class="alert">{{ t "alert.no_category_entry" }}</p>
  27. {{ else }}
  28. <div class="items">
  29. {{ range .entries }}
  30. <article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
  31. <div class="item-header">
  32. <span class="item-title">
  33. {{ if ne .Feed.Icon.IconID 0 }}
  34. <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" alt="{{ .Feed.Title }}">
  35. {{ end }}
  36. <a href="{{ route "categoryEntry" "categoryID" .Feed.Category.ID "entryID" .ID }}">{{ .Title }}</a>
  37. </span>
  38. <span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
  39. </div>
  40. {{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
  41. </article>
  42. {{ end }}
  43. </div>
  44. <section class="page-footer">
  45. {{ if .entries }}
  46. <ul>
  47. <li>
  48. <a href="#" data-on-click="markPageAsRead"
  49. data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">
  50. {{ t "menu.mark_page_as_read" }}
  51. </a>
  52. </li>
  53. </ul>
  54. {{ end }}
  55. </section>
  56. {{ template "pagination" .pagination }}
  57. {{ end }}
  58. {{ end }}