From d770bc17899b7e947252237e04a71075999c7f59 Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Tue, 4 Aug 2015 18:17:10 +0200 Subject: refact feed list --- pyaggr3g470r/templates/admin/user.html | 35 +------------------------ pyaggr3g470r/templates/feed_list.html | 47 ++++++++++++++++++++++++++++++++++ pyaggr3g470r/templates/feeds.html | 44 +------------------------------ 3 files changed, 49 insertions(+), 77 deletions(-) create mode 100644 pyaggr3g470r/templates/feed_list.html (limited to 'pyaggr3g470r/templates') diff --git a/pyaggr3g470r/templates/admin/user.html b/pyaggr3g470r/templates/admin/user.html index 21bcd6b6..d1e08c0d 100644 --- a/pyaggr3g470r/templates/admin/user.html +++ b/pyaggr3g470r/templates/admin/user.html @@ -14,39 +14,6 @@ -
- {% if user.feeds.all()|count == 0 %} -

{{ _('This user is not subscribed to any feed.') }}

- {% else %} -

{{ _('Feeds') }}

- - - - - - - - - - - - - {% for feed in user.feeds|sort(attribute="title") %} - - - - - - - - {% endfor %} - -
#{{ _('Title') }}{{ _('Feed link') }}{{ _('Site link') }}{{ _('(unread) articles') }}{{ _('Actions') }}
{{ loop.index }}{%if feed.icon%}{%endif%}{{ feed.title }}{{ feed.link }}{{ feed.site_link }}( {{ unread_article_count.get(feed.id, 0) }} ) {{ article_count.get(feed.id, 0) }} - - - -
- {% endif %} -
+ {% include "feed_list.html" %} {% endblock %} diff --git a/pyaggr3g470r/templates/feed_list.html b/pyaggr3g470r/templates/feed_list.html new file mode 100644 index 00000000..6ef612b4 --- /dev/null +++ b/pyaggr3g470r/templates/feed_list.html @@ -0,0 +1,47 @@ +{% if feeds.all()| count == 0 %} +

{{_("No feed")}}

+{% else %} +
+ + + + + + + + + + + + + {% for feed in feeds|sort(attribute="title") %} + + + + + + + + + {% endfor %} + +
#{{ _('Status') }}{{ _('Title') }}{{ _('Site') }}{{ _('Articles') }}{{ _('Actions') }}
{{ loop.index }} + {% if feed.enabled %} + + {% else %} + + {% endif %} + {% if feed.error_count > conf.DEFAULT_MAX_ERROR %} + + {% endif %} + + {% if feed.icon_url %}{% endif %} + {{ feed.title }} + {{ feed.site_link }}( {{ unread_article_count.get(feed.id, 0) }} ) {{ article_count.get(feed.id, 0) }} + + + + +
+
+{% endif %} diff --git a/pyaggr3g470r/templates/feeds.html b/pyaggr3g470r/templates/feeds.html index 82af2411..9ba16359 100644 --- a/pyaggr3g470r/templates/feeds.html +++ b/pyaggr3g470r/templates/feeds.html @@ -2,48 +2,6 @@ {% block content %}

{{ _('You are subscribed to') }} {{ feeds.count() }} {{ _('feeds') }} · {{ _('Add a') }} {{ _('feed') }}

-
- - - - - - - - - - - - - {% for feed in feeds|sort(attribute="title") %} - - - - - - - - - {% endfor %} - -
#{{ _('Status') }}{{ _('Title') }}{{ _('Site') }}{{ _('Articles') }}{{ _('Actions') }}
{{ loop.index }} - {% if feed.enabled %} - - {% else %} - - {% endif %} - {% if feed.error_count > conf.DEFAULT_MAX_ERROR %} - - {% endif %} - - {% if feed.icon_url %}{% endif %} - {{ feed.title }} - {{ feed.site_link }}( {{ unread_article_count.get(feed.id, 0) }} ) {{ article_count.get(feed.id, 0) }} - - - - -
-
+ {% include "feed_list.html" %}
{% endblock %} -- cgit From afcfb5cf3eef2e2b15cc85dd4d4485c994045d14 Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Wed, 5 Aug 2015 17:25:51 +0200 Subject: fixing bug preventing from bumping error count from api crawler for none admin user --- pyaggr3g470r/templates/feed_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pyaggr3g470r/templates') diff --git a/pyaggr3g470r/templates/feed_list.html b/pyaggr3g470r/templates/feed_list.html index 6ef612b4..c5cadab0 100644 --- a/pyaggr3g470r/templates/feed_list.html +++ b/pyaggr3g470r/templates/feed_list.html @@ -23,7 +23,7 @@ {% else %} {% endif %} - {% if feed.error_count > conf.DEFAULT_MAX_ERROR %} + {% if feed.error_count >= conf.DEFAULT_MAX_ERROR %} {% endif %} -- cgit