~cedric/newspipe

ref: 304c416a741d62bb88e38694f99536bcbb7b7d89 newspipe/newspipe/templates/categories.html -rw-r--r-- 1.7 KiB
304c416aC├ędric Bonhomme Updated dependencies. 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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 %}
                <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="fa fa-pencil-square-o" aria-hidden="true" title='{{ _("Edit this category") }}'></i></a>
                        <a href="{{ url_for("category.delete", category_id=category.id) }}"><i class="fa fa-times" aria-hidden="true" title='{{ _("Delete this category") }}' onclick="return confirm('{{ _('You are going to delete this category.') }}');"></i></a>
                    </td>
            </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>
    {% endif %}
{% endblock %}