category_feeds.html 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. method="post"
  38. >
  39. <input type="hidden" name="csrf" value="{{ .csrf }}">
  40. <button
  41. class="page-button"
  42. data-label-loading="{{ t "confirm.loading" }}"
  43. >
  44. {{ icon "refresh" }}{{ t "menu.refresh_all_feeds" }}
  45. </button>
  46. </form>
  47. </li>
  48. </ul>
  49. </nav>
  50. </section>
  51. {{ end }}
  52. {{ define "content"}}
  53. {{ if not .feeds }}
  54. <p role="alert" class="alert">{{ t "alert.no_feed_in_category" }}</p>
  55. {{ else }}
  56. {{ template "feed_list" dict "categoryID" .category.ID "user" .user "feeds" .feeds "ParsingErrorCount" .ParsingErrorCount "csrf" .csrf }}
  57. {{ end }}
  58. {{ end }}