categories.html 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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" dir="auto">
  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 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 }}">{{ template "icon_entries" }}<span class="icon-label">{{ t "page.categories.entries" }}</span></a>
  32. </li>
  33. <li>
  34. <a href="{{ route "categoryFeeds" "categoryID" .ID }}">{{ template "icon_feeds" }}<span class="icon-label">{{ t "page.categories.feeds" }}</span></a>
  35. </li>
  36. <li>
  37. <a href="{{ route "editCategory" "categoryID" .ID }}">{{ template "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 }}">{{ template "icon_delete" }}<span class="icon-label">{{ t "action.remove" }}</span></a>
  48. </li>
  49. {{ end }}
  50. </ul>
  51. </div>
  52. </article>
  53. {{ end }}
  54. </div>
  55. {{ end }}
  56. {{ end }}