~cedric/newspipe

ref: 3ab30e029adedbd7e652552c6da1eafbeadb40cd newspipe/newspipe/templates/feed.html -rw-r--r-- 3.5 KiB
3ab30e02Cédric Bonhomme chg: [ui] improved article_pub template. 1 year, 3 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{% extends "layout.html" %}
{% block content %}
<div class="container">
    <div class="well">
        <h2>
            <img src="{{ url_for('icon.icon', url=feed.icon_url) }}" />
            {{ feed.title }}
        </h2>
        {% if feed.description %} <p>{{ feed.description }}</p> {% endif %}
        {% if current_user.is_authenticated %}
            <a href="{{ url_for("feed.delete", feed_id=feed.id) }}"><i class="fa fa-times" aria-hidden="true" title="{{ _('Delete this feed') }}" onclick="return confirm('{{ _('You are going to delete this feed.') }}');"></i></a>
            <a href="{{ url_for("feed.form", feed_id=feed.id) }}"><i class="fa fa-pencil-square-o" aria-hidden="true" title="{{ _('Edit this feed') }}"></i></a>
        {% endif %}
    </div>
    <div class="well">
        <p>
        {{ _('This feed contains') }} {{ feed.articles.all()|count }} {{ _('articles') }}.<br />
        {% if category %}
            {{ _('This feed is part of category %(category_name)s', category_name=category.name) }}<br />
        {% endif %}
        {{ _('Address of the feed') }}: <a href="{{ feed.link }}" target="_blank">{{ feed.link }}</a><br />
        {% if feed.site_link != "" %}
            {{ _('Address of the site') }}: <a href="{{ feed.site_link }}" target="_blank">{{ feed.site_link }}</a><br />
        {% endif %}

        <br />

        {% if feed.last_retrieved %}
            {{ _("Last download:") }} {{ feed.last_retrieved | datetime }}<br />
        {% endif %}

        {% if feed.error_count >= application.config['DEFAULT_MAX_ERROR'] %}
            <b>{{ _("That feed has encountered too much consecutive errors and won't be retrieved anymore.") }}</b><br />
            {{ _("You can click <a href='%(reset_error_url)s'>here</a> to reset the error count and reactivate the feed.", reset_error_url=url_for("feed.reset_errors", feed_id=feed.id)) }}
        {% elif feed.error_count > 0 %}
            {{ _("The download of this feed has encountered some problems. However its error counter will be reinitialized at the next successful retrieving.") }}<br />
        {% endif %}

        {% if feed.last_error %}
            {{ _("Here's the last error encountered while retrieving this feed:") }} <pre>{{ feed.last_error }}</pre><br />
        {% endif %}

        {% if feed.articles.all()|count != 0 %}
            {{ _('The last article was posted') }} {{ elapsed.days }} {{ _('day(s) ago.') }}<br />
            {{ _('Daily average') }}: {{ average }}, {{ _('between the') }} {{ first_post_date | datetime }} {{ _('and the') }} {{ end_post_date | datetime }}.
        {% endif %}
        </p>
    </div>

    <div class="row">
        <div class="col-md-12">
          <div class="table-responsive">
              <table id="table-articles" class="table table-striped">
                  <thead>
                      <tr>
                          <th>{{ _('Article') }}</th>
                          <th>{{ _('Date') }}</th>
                      </tr>
                  </thead>
                  <tbody>
                  {% for article in articles %}
                      <tr>
                          <td><a href="{{ url_for("article.article_pub", article_id=article.id) }}">{{ article.title }}</a></td>
                          <td>{{ article.date | datetime }}</td>
                      </tr>
                  {% endfor %}
                  </tbody>
              </table>
          </div>
        </div>
    </div>

    <div class="row">
       <div class="col-md-8 offset-md-1">
           {{ pagination.links }}
       </div>
   </div>
</div><!-- /.container -->
{% endblock %}