categories.html 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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" }}">{{ 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 class="item">
  17. <div class="item-header">
  18. <span class="item-title">
  19. <a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ .Title }}</a>
  20. </span>
  21. (<span title="{{ if eq .FeedCount 0 }}{{ t "page.categories.no_feed" }}{{ else }}{{ plural "page.categories.feed_count" .FeedCount .FeedCount }}{{ end }}">{{ .FeedCount }}</span>)
  22. </div>
  23. <div class="item-meta">
  24. <ul>
  25. <li>
  26. <a href="{{ route "categoryFeeds" "categoryID" .ID }}">{{ t "page.categories.feeds" }}</a>
  27. </li>
  28. <li>
  29. <a href="{{ route "editCategory" "categoryID" .ID }}">{{ t "menu.edit_category" }}</a>
  30. </li>
  31. {{ if eq .FeedCount 0 }}
  32. <li>
  33. <a href="#"
  34. data-confirm="true"
  35. data-label-question="{{ t "confirm.question" }}"
  36. data-label-yes="{{ t "confirm.yes" }}"
  37. data-label-no="{{ t "confirm.no" }}"
  38. data-label-loading="{{ t "confirm.loading" }}"
  39. data-url="{{ route "removeCategory" "categoryID" .ID }}">{{ t "action.remove" }}</a>
  40. </li>
  41. {{ end }}
  42. </ul>
  43. </div>
  44. </article>
  45. {{ end }}
  46. </div>
  47. {{ end }}
  48. {{ end }}