aboutsummaryrefslogtreecommitdiff
path: root/src/web/templates/feed_list.html
blob: 04543e4c805802ed3e6d45e5202e924c30497273 (plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{% if feeds.count() != 0 %}
<div class="table-responsive">
    <table class="table table-striped">
        <thead>
            <tr>
                <th>#</th>
                {% if current_user.is_authenticated and current_user.id == user.id %}
                    <th>{{ _('Status') }}</th>
                {% endif %}
                <th>{{ _('Title') }}</th>
                <th>{{ _('Site') }}</th>
                {% if current_user.is_authenticated and current_user.id == user.id %}
                    <th>{{ _('Articles') }}</th>
                    <th>{{ _('Actions') }}</th>
                {% endif %}
            </tr>
        </thead>
        <tbody>
        {% for feed in feeds %}
            <tr {% if not feed.enabled and current_user.is_authenticated  %}class="warning"{% endif %}>
                <td>{{ loop.index }}</td>
                {% if current_user.is_authenticated and current_user.id == user.id %}
                    <td>
                        {% if feed.enabled  %}
                            <i class="glyphicon glyphicon-eye-open" title="{{ _('Feed enabled') }}"></i>
                        {% else %}
                            <i class="glyphicon glyphicon-eye-close" title="{{ _('Feed disabled') }}"></i>
                        {% endif %}
                        {% if feed.error_count >= conf.DEFAULT_MAX_ERROR %}
                            <i class="glyphicon glyphicon-exclamation-sign" title="{{ _('Feed encountered too much errors.') }}"></i>
                        {% endif %}
                    </td>
                {% endif %}
                <td>{% if feed.icon_url %}<img src="{{ url_for('icon.icon', url=feed.icon_url) }}" width="16px" />&nbsp;{% endif %}{{ feed.title }}</td>
                <td><a href="{{ feed.site_link }}">{{ feed.site_link }}</a></td>
                {% if current_user.is_authenticated and current_user.id == user.id %}
                    <td>( {{ unread_article_count.get(feed.id, 0) }} ) {{ article_count.get(feed.id, 0) }}</td>
                    <td>
                        <a href="{{ url_for("feed.feed", feed_id=feed.id) }}"><i class="glyphicon glyphicon-info-sign" title="{{ _('Information') }}"></i></a>
                        <a href="{{ url_for("feed.form", feed_id=feed.id) }}"><i class="glyphicon glyphicon-edit" title="{{ _('Edit this feed') }}"></i></a>
                        <a href="{{ url_for("feed.duplicates", feed_id=feed.id) }}"><i class="glyphicon glyphicon-book" title="{{ _('Duplicate articles') }}"></i></a>
                        <a href="{{ url_for("feed.delete", feed_id=feed.id) }}"><i class="glyphicon glyphicon-remove" title="{{ _('Delete this feed') }}" onclick="return confirm('{{ _('You are going to delete this feed.') }}');"></i></a>
                    </td>
                {% endif %}
        </tr>
        {% endfor %}
        </tbody>
    </table>
</div>
{% endif %}
bgstack15