diff options
author | 2017-11-19 21:10:04 -0800 | |
---|---|---|
committer | 2017-11-19 22:01:46 -0800 | |
commit | 8ffb773f43c8dc54801ca1d111854e7e881c93c9 (patch) | |
tree | 38133a2fc612597a75fed1d13e5b4042f58a2b7e /server/template/html/categories.html |
First commit
Diffstat (limited to 'server/template/html/categories.html')
-rw-r--r-- | server/template/html/categories.html | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/server/template/html/categories.html b/server/template/html/categories.html new file mode 100644 index 0000000..88b0ebe --- /dev/null +++ b/server/template/html/categories.html @@ -0,0 +1,50 @@ +{{ define "title"}}{{ t "Categories" }} ({{ .total }}){{ end }} + +{{ define "content"}} +<section class="page-header"> + <h1>{{ t "Categories" }} ({{ .total }})</h1> + <ul> + <li> + <a href="{{ route "createCategory" }}">{{ t "Create a category" }}</a> + </li> + </ul> +</section> + +{{ if not .categories }} + <p class="alert alert-error">{{ t "There is no category." }}</p> +{{ 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 }} + {{ t "No feed." }} + {{ else }} + {{ plural "plural.categories.feed_count" .FeedCount .FeedCount }} + {{ end }} + </li> + </ul> + <ul> + <li> + <a href="{{ route "editCategory" "categoryID" .ID }}">{{ t "Edit" }}</a> + </li> + {{ if eq .FeedCount 0 }} + <li> + <a href="{{ route "removeCategory" "categoryID" .ID }}">{{ t "Remove" }}</a> + </li> + {{ end }} + </ul> + </div> + </article> + {{ end }} + </div> +{{ end }} + +{{ end }} |