category_entries.html 2.0 KB

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