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