aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/templates/categories.html
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-10-12 17:48:41 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2016-01-26 23:46:31 +0100
commit7cbbcb59f4c434fbd7e74e85c90e98fadd189b65 (patch)
treef979fd6300b8767c8bbca0a7ac5c3ee831df49df /pyaggr3g470r/templates/categories.html
parentupdating translations (diff)
downloadnewspipe-7cbbcb59f4c434fbd7e74e85c90e98fadd189b65.tar.gz
newspipe-7cbbcb59f4c434fbd7e74e85c90e98fadd189b65.tar.bz2
newspipe-7cbbcb59f4c434fbd7e74e85c90e98fadd189b65.zip
adding, improving UI to manage categories
Diffstat (limited to 'pyaggr3g470r/templates/categories.html')
-rw-r--r--pyaggr3g470r/templates/categories.html36
1 files changed, 36 insertions, 0 deletions
diff --git a/pyaggr3g470r/templates/categories.html b/pyaggr3g470r/templates/categories.html
new file mode 100644
index 00000000..a61cc4b2
--- /dev/null
+++ b/pyaggr3g470r/templates/categories.html
@@ -0,0 +1,36 @@
+{% extends "layout.html" %}
+{% block content %}
+<div class="container">
+ <h1>{{ _("You have %(categories)d categories &middot; Add a %(start_link)scategory%(end_link)s", categories=categories|count, start_link=("<a href='%s'>" % url_for("category.form"))|safe, end_link="</a>"|safe) }}</h1>
+ {% if categories|count == 0 %}
+ <h1>{{_("No category")}}</h1>
+ {% else %}
+ <div class="table-responsive">
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>#</th>
+ <th>{{ _('Name') }}</th>
+ <th>{{ _('Feeds') }}</th>
+ <th>{{ _('Articles') }}</th>
+ <th>{{ _('Actions') }}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for category in categories|sort(attribute="name") %}
+ <tr>
+ <td>{{ loop.index }}</td>
+ <td>{{ category.name }}</td>
+ <td>{{ feeds_count.get(category.id, 0) }}</td>
+ <td>( {{ unread_article_count.get(category.id, 0) }} ) {{ article_count.get(category.id, 0) }}</td>
+ <td>
+ <a href="{{ url_for("category.form", category_id=category.id) }}"><i class="glyphicon glyphicon-edit" title='{{ _("Edit this category") }}'></i></a>
+ <a href="{{ url_for("category.delete", category_id=category.id) }}"><i class="glyphicon glyphicon-remove" title='{{ _("Delete this category") }}' onclick="return confirm('{{ _('You are going to delete this category.') }}');"></i></a>
+ </td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
+ {% endif %}
+{% endblock %}
bgstack15