From 4f03d7b324360f718780fcbdfc359f60896fead4 Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Sun, 24 May 2015 19:09:35 +0200 Subject: accelerating the feeds page --- pyaggr3g470r/templates/feeds.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pyaggr3g470r/templates') diff --git a/pyaggr3g470r/templates/feeds.html b/pyaggr3g470r/templates/feeds.html index f0e674c9..4d4581d4 100644 --- a/pyaggr3g470r/templates/feeds.html +++ b/pyaggr3g470r/templates/feeds.html @@ -30,7 +30,7 @@ {{ feed.title }} {{ feed.site_link }} - {{ feed.articles.count() }} + {{ article_count[feed.id] }} -- cgit From be33517445c787be0da5577da048d4b2d91452d4 Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Thu, 28 May 2015 15:27:21 +0200 Subject: adding unread count when listing feeds, using count_by_feed for user management --- pyaggr3g470r/templates/admin/user.html | 4 ++-- pyaggr3g470r/templates/feeds.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'pyaggr3g470r/templates') diff --git a/pyaggr3g470r/templates/admin/user.html b/pyaggr3g470r/templates/admin/user.html index 317fef49..e50741ee 100644 --- a/pyaggr3g470r/templates/admin/user.html +++ b/pyaggr3g470r/templates/admin/user.html @@ -26,7 +26,7 @@ {{ _('Name') }} {{ _('Feed link') }} {{ _('Site link') }} - {{ _('Number of articles') }} + {{ _('(unread) articles') }} {{ _('Actions') }} @@ -37,7 +37,7 @@ {{ feed.title }} {{ feed.link }} {{ feed.site_link }} - {{ feed.articles.all()|count }} + ( {{ unread_article_count.get(feed.id, 0) }} ) {{ article_count.get(feed.id, 0) }} diff --git a/pyaggr3g470r/templates/feeds.html b/pyaggr3g470r/templates/feeds.html index 4d4581d4..789decf5 100644 --- a/pyaggr3g470r/templates/feeds.html +++ b/pyaggr3g470r/templates/feeds.html @@ -30,7 +30,7 @@ {{ feed.title }} {{ feed.site_link }} - {{ article_count[feed.id] }} + ( {{ unread_article_count.get(feed.id, 0) }} ) {{ article_count.get(feed.id, 0) }} -- cgit From c9b8d7ce0eba10fa3e0f0f0b87ad9f9479589062 Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Tue, 9 Jun 2015 12:06:53 +0200 Subject: a more bootstrap edit feed page & removing unused code --- pyaggr3g470r/templates/edit_feed.html | 49 +++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 13 deletions(-) (limited to 'pyaggr3g470r/templates') diff --git a/pyaggr3g470r/templates/edit_feed.html b/pyaggr3g470r/templates/edit_feed.html index be63aa53..a56238d5 100644 --- a/pyaggr3g470r/templates/edit_feed.html +++ b/pyaggr3g470r/templates/edit_feed.html @@ -2,23 +2,46 @@ {% block content %}
-

{{ action }}

-
+

{{ action }}

+ {{ form.hidden_tag() }} +
+ +
+ {{ form.link(size="100%") }} +
+ {% for error in form.link.errors %} {{ error }}
{% endfor %} +
- {{ form.link.label }} - {{ form.link(class_="form-control") }} {% for error in form.link.errors %} {{ error }}
{% endfor %} +
+ +
+ {{ form.title(size="100%", placeholder=_('Optional')) }} +
+ {% for error in form.title.errors %} {{ error }}
{% endfor %} +
- {{ form.title.label }} - {{ form.title(class_="form-control", placeholder=_('Optional')) }} {% for error in form.title.errors %} {{ error }}
{% endfor %} +
+ +
+ {{ form.site_link(size="100%", placeholder=_('Optional')) }} +
+ {% for error in form.site_link.errors %} {{ error }}
{% endfor %} +
- {{ form.site_link.label }} - {{ form.site_link(class_="form-control", placeholder=_('Optional')) }} {% for error in form.site_link.errors %} {{ error }}
{% endfor %} - - {{ form.enabled.label }} - {{ form.enabled(class_="checkbox") }} -
- {{ form.submit(class_="btn btn-default") }} +
+ +
+
+ {{ form.enabled(style="margin-left: 0px;") }} +
+
+
+
+
+ {{ form.submit(class_="btn btn-default") }} +
+
-- cgit From bd0bdc2d1b16d1c5f05e670e6b36c31a5d2ae5d5 Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Wed, 10 Jun 2015 17:51:34 +0200 Subject: redoing home page in a more 'bootstrapy' way --- pyaggr3g470r/templates/home.html | 207 ++++++++++++++++++++----------------- pyaggr3g470r/templates/layout.html | 31 +++--- 2 files changed, 127 insertions(+), 111 deletions(-) (limited to 'pyaggr3g470r/templates') diff --git a/pyaggr3g470r/templates/home.html b/pyaggr3g470r/templates/home.html index dbb95451..6d1ca85e 100644 --- a/pyaggr3g470r/templates/home.html +++ b/pyaggr3g470r/templates/home.html @@ -6,104 +6,119 @@

{{ _('Add some') }}, {{ _('or') }} {{ _('upload an OPML file.') }}

{% else %} - + + {% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} +
+ {% block messages %} + {{ super() }} + {% endblock %} +
+ {% endif %} + {% endwith %} + + {% if articles | count != 0%} +
+ + + + + + + + + + + {% for article in articles %} + + + + + + + {% endfor %} + +
{{ _('Feed') }}{{ _('Article') }}{{ _('Date') }}
+ + {% if article.like %} + + {% else %} + + {% endif %} + {% if article.readed %} + + {% else %} + + {% if filter_ == 'all' %}{% endif %} + {% endif %} + {{ article.source.title|safe }} + {{ article.title|safe }} + {{ article.date|datetime }}
+
+ {% endif %} + + + + {% endif %} {% endblock %} diff --git a/pyaggr3g470r/templates/layout.html b/pyaggr3g470r/templates/layout.html index 80c74703..c66cce3e 100644 --- a/pyaggr3g470r/templates/layout.html +++ b/pyaggr3g470r/templates/layout.html @@ -129,29 +129,30 @@ -
-
- {% with messages = get_flashed_messages(with_categories=true) %} - {% if messages %} - {% for category, message in messages %} -
- - {{ message }} -
- {% endfor %} - {% endif %} - {% endwith %} +
+ {% block messages %} + {% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} + {% for category, message in messages %} +
+ + {{ message }} +
+ {% endfor %} + {% endif %} + {% endwith %} + {% endblock %}
{% block content %}{% endblock %} - - - + + + +