category_feeds.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {{ define "title"}}{{ .category.Title }} > {{ t "page.feeds.title" }} ({{ .total }}){{ end }}
  2. {{ define "page_header"}}
  3. <section class="page-header" aria-labelledby="page-header-title">
  4. <h1 id="page-header-title" dir="auto">
  5. {{ .category.Title }} <span aria-hidden="true">&gt;</span> {{ t "page.feeds.title" }}
  6. <span aria-hidden="true"> ({{ .total }})</span>
  7. </h1>
  8. <span class="sr-only">{{ plural "page.categories.feed_count" .total .total }}</span>
  9. <nav aria-label="{{ .category.Title }} {{ t "page.feeds.title" }} {{ t "menu.title" }}">
  10. <ul>
  11. <li>
  12. <a class="page-link" href="{{ routePath "/category/%d/entries" .category.ID }}">{{ icon "entries" }}{{ t "menu.feed_entries" }}</a>
  13. </li>
  14. <li>
  15. <a class="page-link" href="{{ routePath "/category/%d/edit" .category.ID }}">{{ icon "edit" }}{{ t "menu.edit_category" }}</a>
  16. </li>
  17. {{ if eq .total 0 }}
  18. <li>
  19. <button
  20. class="page-button"
  21. data-confirm="true"
  22. data-label-question="{{ t "confirm.question" }}"
  23. data-label-yes="{{ t "confirm.yes" }}"
  24. data-label-no="{{ t "confirm.no" }}"
  25. data-label-loading="{{ t "confirm.loading" }}"
  26. data-redirect-url="{{ routePath "/categories" }}"
  27. data-url="{{ routePath "/category/%d/remove" .category.ID }}"
  28. >
  29. {{ icon "delete" }}{{ t "action.remove" }}
  30. </button>
  31. </li>
  32. {{ end }}
  33. <li>
  34. <form
  35. class="page-header-action-form"
  36. action="{{ routePath "/category/%d/feeds/refresh" .category.ID }}"
  37. >
  38. <button
  39. class="page-button"
  40. data-label-loading="{{ t "confirm.loading" }}"
  41. >
  42. {{ icon "refresh" }}{{ t "menu.refresh_all_feeds" }}
  43. </button>
  44. </form>
  45. </li>
  46. </ul>
  47. </nav>
  48. </section>
  49. {{ end }}
  50. {{ define "content"}}
  51. {{ if not .feeds }}
  52. <p role="alert" class="alert">{{ t "alert.no_feed_in_category" }}</p>
  53. {{ else }}
  54. {{ template "feed_list" dict "categoryID" .category.ID "user" .user "feeds" .feeds "ParsingErrorCount" .ParsingErrorCount }}
  55. {{ end }}
  56. {{ end }}