2018-09-22 03:53:29 +02:00
|
|
|
{{ define "title"}}{{ t "page.categories.title" }} ({{ .total }}){{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
2024-01-27 09:25:55 +01:00
|
|
|
{{ define "page_header"}}
|
2024-02-02 09:30:45 +01:00
|
|
|
<section class="page-header" aria-labelledby="page-header-title page-header-title-count">
|
2024-01-25 07:22:18 +01:00
|
|
|
<h1 id="page-header-title" dir="auto">
|
2024-01-23 03:42:10 +01:00
|
|
|
{{ t "page.categories.title" }}
|
|
|
|
<span aria-hidden="true"> ({{ .total }})</span>
|
|
|
|
</h1>
|
2024-02-04 21:51:04 +01:00
|
|
|
<span id="page-header-title-count" class="sr-only">{{ plural "page.categories_count" .total .total }}</span>
|
2024-01-23 03:42:10 +01:00
|
|
|
<nav aria-label="{{ t "page.categories.title" }} {{ t "menu.title" }}">
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<a href="{{ route "createCategory" }}">{{ icon "add-category" }}{{ t "menu.create_category" }}</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
2024-01-27 09:25:55 +01:00
|
|
|
</section>
|
2024-01-25 07:22:18 +01:00
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
2024-01-25 07:22:18 +01:00
|
|
|
{{ define "content"}}
|
2017-11-20 06:10:04 +01:00
|
|
|
{{ if not .categories }}
|
2018-10-28 02:11:05 +02:00
|
|
|
<p class="alert alert-error">{{ t "alert.no_category" }}</p>
|
2017-11-20 06:10:04 +01:00
|
|
|
{{ else }}
|
|
|
|
<div class="items">
|
|
|
|
{{ range .categories }}
|
2024-01-27 08:11:48 +01:00
|
|
|
<article
|
|
|
|
class="item category-item {{if gt (deRef .TotalUnread) 0 }} category-has-unread{{end}}"
|
|
|
|
aria-labelledby="category-title-{{ .ID }}"
|
|
|
|
>
|
|
|
|
<header id="category-title-{{ .ID }}" class="item-header" dir="auto">
|
|
|
|
<h2 class="item-title">
|
2024-02-02 09:30:45 +01:00
|
|
|
<a href="{{ route "categoryEntries" "categoryID" .ID }}" aria-label="{{ .Title }}, {{ t "page.categories.unread_counter" }}: {{ .TotalUnread }}">
|
|
|
|
{{ .Title }}
|
|
|
|
<span class="category-item-total" aria-hidden="true">
|
|
|
|
(<span class="sr-only">{{ t "page.categories.unread_counter" }}: </span>{{ .TotalUnread }})
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
|
2024-01-27 08:11:48 +01:00
|
|
|
</h2>
|
|
|
|
</header>
|
2017-11-20 06:10:04 +01:00
|
|
|
<div class="item-meta">
|
2020-03-23 00:33:35 +01:00
|
|
|
<ul class="item-meta-info">
|
2023-02-07 05:46:42 +01:00
|
|
|
<li class="item-meta-info-feed-count">
|
2023-06-19 18:50:08 +02:00
|
|
|
{{ if eq (deRef .FeedCount) 0 }}{{ t "page.categories.no_feed" }}{{ else }}{{ plural "page.categories.feed_count" (deRef .FeedCount) (deRef .FeedCount) }}{{ end }}
|
2020-06-15 04:00:41 +02:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<ul class="item-meta-icons">
|
2023-02-07 05:46:42 +01:00
|
|
|
<li class="item-meta-icons-entries">
|
2021-03-07 20:02:52 +01:00
|
|
|
<a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ icon "entries" }}<span class="icon-label">{{ t "page.categories.entries" }}</span></a>
|
2020-06-15 04:00:41 +02:00
|
|
|
</li>
|
2023-02-07 05:46:42 +01:00
|
|
|
<li class="item-meta-icons-feeds">
|
2021-03-07 20:02:52 +01:00
|
|
|
<a href="{{ route "categoryFeeds" "categoryID" .ID }}">{{ icon "feeds" }}<span class="icon-label">{{ t "page.categories.feeds" }}</span></a>
|
2017-11-20 06:10:04 +01:00
|
|
|
</li>
|
2023-02-07 05:46:42 +01:00
|
|
|
<li class="item-meta-icons-edit">
|
2021-03-07 20:02:52 +01:00
|
|
|
<a href="{{ route "editCategory" "categoryID" .ID }}">{{ icon "edit" }}<span class="icon-label">{{ t "menu.edit_category" }}</span></a>
|
2017-11-20 06:10:04 +01:00
|
|
|
</li>
|
2023-06-19 18:50:08 +02:00
|
|
|
{{ if eq (deRef .FeedCount) 0 }}
|
2023-02-07 05:46:42 +01:00
|
|
|
<li class="item-meta-icons-delete">
|
2017-11-21 23:44:47 +01:00
|
|
|
<a href="#"
|
2024-02-02 09:30:45 +01:00
|
|
|
role="button"
|
|
|
|
aria-describedby="category-title-{{ .ID }}"
|
2017-11-21 23:44:47 +01:00
|
|
|
data-confirm="true"
|
2018-09-22 03:53:29 +02:00
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}"
|
2021-03-07 20:02:52 +01:00
|
|
|
data-url="{{ route "removeCategory" "categoryID" .ID }}">{{ icon "delete" }}<span class="icon-label">{{ t "action.remove" }}</span></a>
|
2017-11-20 06:10:04 +01:00
|
|
|
</li>
|
|
|
|
{{ end }}
|
2023-06-19 18:50:08 +02:00
|
|
|
{{ if gt (deRef .TotalUnread) 0 }}
|
2023-02-07 05:46:42 +01:00
|
|
|
<li class="item-meta-icons-mark-as-read">
|
2021-07-01 19:25:58 +02:00
|
|
|
<a href="#"
|
2024-02-02 09:30:45 +01:00
|
|
|
role="button"
|
|
|
|
aria-describedby="category-title-{{ .ID }}"
|
2021-07-01 19:25:58 +02:00
|
|
|
data-confirm="true"
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}"
|
|
|
|
data-url="{{ route "markCategoryAsRead" "categoryID" .ID }}">{{ icon "read" }}<span class="icon-label">{{ t "menu.mark_all_as_read" }}</span></a>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ end }}
|