From 1677355a38a2e9c87aa43da1de1459bac1fba63c Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 10 Nov 2013 00:49:04 +0100 Subject: Test if the user is subscribed to a feed. --- pyaggr3g470r/templates/home.html | 54 +++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 25 deletions(-) (limited to 'pyaggr3g470r/templates/home.html') diff --git a/pyaggr3g470r/templates/home.html b/pyaggr3g470r/templates/home.html index 836ef2e6..e79d0603 100644 --- a/pyaggr3g470r/templates/home.html +++ b/pyaggr3g470r/templates/home.html @@ -1,39 +1,43 @@ {% extends "layout.html" %} {% block content %}
- {% for feed in feeds %} -
-
-

{{ feed.title }}

- - - -
-
- {% for number in range(0, feed.articles|length-(feed.articles|length % 3), 3) %} + {% if feeds|count == 0 %} +

You are not subscribed to any feed. Fix this.

+ {% else %} + {% for feed in feeds %}
- {% for n in range(number, number+3) %} -
- {% if feed.articles[n].readed %}

{% else %}

{% endif %} - {{ feed.articles[n].title }}

- {% if feed.articles[n].readed %}

{% else %}{% endif %} -
{{ feed.articles[n].date }}
+
+

{{ feed.title }}

+ + +
- {% endfor %}
- {% endfor %} - {% if feed.articles|length % 3 != 0 %} -
- {% for n in range(feed.articles|length-(feed.articles|length % 3), feed.articles|length) %} + {% for number in range(0, feed.articles|length-(feed.articles|length % 3), 3) %} +
+ {% for n in range(number, number+3) %}
{% if feed.articles[n].readed %}

{% else %}

{% endif %} {{ feed.articles[n].title }}

{% if feed.articles[n].readed %}

{% else %}{% endif %}
{{ feed.articles[n].date }}
- {% endfor %} -
- {% endif %} - {% endfor %} + {% endfor %} +
+ {% endfor %} + {% if feed.articles|length % 3 != 0 %} +
+ {% for n in range(feed.articles|length-(feed.articles|length % 3), feed.articles|length) %} +
+ {% if feed.articles[n].readed %}

{% else %}

{% endif %} + {{ feed.articles[n].title }}

+ {% if feed.articles[n].readed %}

{% else %}{% endif %} +
{{ feed.articles[n].date }}
+
+ {% endfor %} +
+ {% endif %} + {% endfor %} + {% endif %}
{% endblock %} \ No newline at end of file -- cgit