2018-09-21 21:53:29 -04:00
|
|
|
{{ define "title"}}{{ t "page.categories.title" }} ({{ .total }}){{ end }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
<section class="page-header">
|
2018-09-21 21:53:29 -04:00
|
|
|
<h1>{{ t "page.categories.title" }} ({{ .total }})</h1>
|
2017-11-20 00:10:04 -05:00
|
|
|
<ul>
|
|
|
|
<li>
|
2022-01-18 00:00:32 -05:00
|
|
|
<a href="{{ route "createCategory" }}">{{ icon "add-category" }}{{ t "menu.create_category" }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
{{ if not .categories }}
|
2018-10-27 20:11:05 -04:00
|
|
|
<p class="alert alert-error">{{ t "alert.no_category" }}</p>
|
2017-11-20 00:10:04 -05:00
|
|
|
{{ else }}
|
|
|
|
<div class="items">
|
|
|
|
{{ range .categories }}
|
2023-02-06 23:46:42 -05:00
|
|
|
<article role="article" class="item category-item {{if gt .TotalUnread 0 }} category-has-unread{{end}}">
|
2020-06-25 00:46:37 -04:00
|
|
|
<div class="item-header" dir="auto">
|
2017-11-20 00:10:04 -05:00
|
|
|
<span class="item-title">
|
|
|
|
<a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ .Title }}</a>
|
|
|
|
</span>
|
2021-04-25 07:47:59 -04:00
|
|
|
(<span title="{{ t "page.categories.unread_counter" }}">{{ .TotalUnread }}</span>)
|
2017-11-20 00:10:04 -05:00
|
|
|
</div>
|
|
|
|
<div class="item-meta">
|
2020-03-22 19:33:35 -04:00
|
|
|
<ul class="item-meta-info">
|
2023-02-06 23:46:42 -05:00
|
|
|
<li class="item-meta-info-feed-count">
|
2020-06-14 22:00:41 -04:00
|
|
|
{{ if eq .FeedCount 0 }}{{ t "page.categories.no_feed" }}{{ else }}{{ plural "page.categories.feed_count" .FeedCount .FeedCount }}{{ end }}
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<ul class="item-meta-icons">
|
2023-02-06 23:46:42 -05:00
|
|
|
<li class="item-meta-icons-entries">
|
2021-03-07 14:02:52 -05:00
|
|
|
<a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ icon "entries" }}<span class="icon-label">{{ t "page.categories.entries" }}</span></a>
|
2020-06-14 22:00:41 -04:00
|
|
|
</li>
|
2023-02-06 23:46:42 -05:00
|
|
|
<li class="item-meta-icons-feeds">
|
2021-03-07 14:02:52 -05:00
|
|
|
<a href="{{ route "categoryFeeds" "categoryID" .ID }}">{{ icon "feeds" }}<span class="icon-label">{{ t "page.categories.feeds" }}</span></a>
|
2017-11-20 00:10:04 -05:00
|
|
|
</li>
|
2023-02-06 23:46:42 -05:00
|
|
|
<li class="item-meta-icons-edit">
|
2021-03-07 14:02:52 -05:00
|
|
|
<a href="{{ route "editCategory" "categoryID" .ID }}">{{ icon "edit" }}<span class="icon-label">{{ t "menu.edit_category" }}</span></a>
|
2017-11-20 00:10:04 -05:00
|
|
|
</li>
|
|
|
|
{{ if eq .FeedCount 0 }}
|
2023-02-06 23:46:42 -05:00
|
|
|
<li class="item-meta-icons-delete">
|
2017-11-21 17:44:47 -05:00
|
|
|
<a href="#"
|
|
|
|
data-confirm="true"
|
2018-09-21 21:53:29 -04: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 14:02:52 -05:00
|
|
|
data-url="{{ route "removeCategory" "categoryID" .ID }}">{{ icon "delete" }}<span class="icon-label">{{ t "action.remove" }}</span></a>
|
2017-11-20 00:10:04 -05:00
|
|
|
</li>
|
|
|
|
{{ end }}
|
2021-07-01 13:25:58 -04:00
|
|
|
{{ if gt .TotalUnread 0 }}
|
2023-02-06 23:46:42 -05:00
|
|
|
<li class="item-meta-icons-mark-as-read">
|
2021-07-01 13:25:58 -04:00
|
|
|
<a href="#"
|
|
|
|
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 00:10:04 -05:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ end }}
|