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>
|
2018-09-21 21:53:29 -04:00
|
|
|
<a href="{{ route "createCategory" }}">{{ t "menu.create_category" }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
{{ if not .categories }}
|
2018-09-21 21:53:29 -04:00
|
|
|
<p class="alert alert-error">{{ t "page.categories.no_category" }}</p>
|
2017-11-20 00:10:04 -05:00
|
|
|
{{ else }}
|
|
|
|
<div class="items">
|
|
|
|
{{ range .categories }}
|
|
|
|
<article class="item">
|
|
|
|
<div class="item-header">
|
|
|
|
<span class="item-title">
|
|
|
|
<a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ .Title }}</a>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="item-meta">
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
{{ if eq .FeedCount 0 }}
|
2018-09-22 13:22:58 -04:00
|
|
|
{{ t "page.categories.no_feed" }}
|
2017-11-20 00:10:04 -05:00
|
|
|
{{ else }}
|
2018-09-21 21:53:29 -04:00
|
|
|
{{ plural "page.categories.feed_count" .FeedCount .FeedCount }}
|
2017-11-20 00:10:04 -05:00
|
|
|
{{ end }}
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<ul>
|
|
|
|
<li>
|
2018-09-22 13:22:58 -04:00
|
|
|
<a href="{{ route "editCategory" "categoryID" .ID }}">{{ t "menu.edit_category" }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
</li>
|
|
|
|
{{ if eq .FeedCount 0 }}
|
|
|
|
<li>
|
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" }}"
|
|
|
|
data-url="{{ route "removeCategory" "categoryID" .ID }}">{{ t "action.remove" }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ end }}
|