categories.html 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {{ define "title"}}{{ t "page.categories.title" }} ({{ .total }}){{ end }}
  2. {{ define "content"}}
  3. <section class="page-header">
  4. <h1>{{ t "page.categories.title" }} ({{ .total }})</h1>
  5. <ul>
  6. <li>
  7. <a href="{{ route "createCategory" }}">{{ icon "add-category" }}{{ t "menu.create_category" }}</a>
  8. </li>
  9. </ul>
  10. </section>
  11. {{ if not .categories }}
  12. <p class="alert alert-error">{{ t "alert.no_category" }}</p>
  13. {{ else }}
  14. <div class="items">
  15. {{ range .categories }}
  16. <article role="article" class="item{{if gt .TotalUnread 0 }} category-has-unread{{end}}">
  17. <div class="item-header" dir="auto">
  18. <span class="item-title">
  19. <a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ .Title }}</a>
  20. </span>
  21. (<span title="{{ t "page.categories.unread_counter" }}">{{ .TotalUnread }}</span>)
  22. </div>
  23. <div class="item-meta">
  24. <ul class="item-meta-info">
  25. <li>
  26. {{ if eq .FeedCount 0 }}{{ t "page.categories.no_feed" }}{{ else }}{{ plural "page.categories.feed_count" .FeedCount .FeedCount }}{{ end }}
  27. </li>
  28. </ul>
  29. <ul class="item-meta-icons">
  30. <li>
  31. <a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ icon "entries" }}<span class="icon-label">{{ t "page.categories.entries" }}</span></a>
  32. </li>
  33. <li>
  34. <a href="{{ route "categoryFeeds" "categoryID" .ID }}">{{ icon "feeds" }}<span class="icon-label">{{ t "page.categories.feeds" }}</span></a>
  35. </li>
  36. <li>
  37. <a href="{{ route "editCategory" "categoryID" .ID }}">{{ icon "edit" }}<span class="icon-label">{{ t "menu.edit_category" }}</span></a>
  38. </li>
  39. {{ if eq .FeedCount 0 }}
  40. <li>
  41. <a href="#"
  42. data-confirm="true"
  43. data-label-question="{{ t "confirm.question" }}"
  44. data-label-yes="{{ t "confirm.yes" }}"
  45. data-label-no="{{ t "confirm.no" }}"
  46. data-label-loading="{{ t "confirm.loading" }}"
  47. data-url="{{ route "removeCategory" "categoryID" .ID }}">{{ icon "delete" }}<span class="icon-label">{{ t "action.remove" }}</span></a>
  48. </li>
  49. {{ end }}
  50. {{ if gt .TotalUnread 0 }}
  51. <li>
  52. <a href="#"
  53. data-confirm="true"
  54. data-label-question="{{ t "confirm.question" }}"
  55. data-label-yes="{{ t "confirm.yes" }}"
  56. data-label-no="{{ t "confirm.no" }}"
  57. data-label-loading="{{ t "confirm.loading" }}"
  58. data-url="{{ route "markCategoryAsRead" "categoryID" .ID }}">{{ icon "read" }}<span class="icon-label">{{ t "menu.mark_all_as_read" }}</span></a>
  59. </li>
  60. {{ end }}
  61. </ul>
  62. </div>
  63. </article>
  64. {{ end }}
  65. </div>
  66. {{ end }}
  67. {{ end }}