From fb5df6041fc7bf97429bfe689e26fdc08e7e307f Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 15 Mar 2015 23:59:14 +0100 Subject: A new test for the history page. --- pyaggr3g470r/templates/history.html | 89 +++++++------------------------------ 1 file changed, 17 insertions(+), 72 deletions(-) (limited to 'pyaggr3g470r/templates/history.html') diff --git a/pyaggr3g470r/templates/history.html b/pyaggr3g470r/templates/history.html index 0194cb89..6216f616 100644 --- a/pyaggr3g470r/templates/history.html +++ b/pyaggr3g470r/templates/history.html @@ -1,74 +1,19 @@ - {% extends "layout.html" %} - {% block head %} -{{ super() }} - - -{% endblock %} - +{% extends "layout.html" %} {% block content %}
-

History

-
-
-
- - - - - -
-{% endblock %} \ No newline at end of file +

{{ _('History') }}

+ +
+{% endblock %} -- cgit From 8d0fea82761f2fdc1ea93687429990eefa851fc8 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Mon, 16 Mar 2015 07:22:52 +0100 Subject: Improvements and fixes for the history() function. --- pyaggr3g470r/templates/history.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pyaggr3g470r/templates/history.html') diff --git a/pyaggr3g470r/templates/history.html b/pyaggr3g470r/templates/history.html index 6216f616..2d64da98 100644 --- a/pyaggr3g470r/templates/history.html +++ b/pyaggr3g470r/templates/history.html @@ -10,7 +10,7 @@
  • {{ article }} : {{ articles_counter[article] }} articles
  • {% else %} {% for article in articles %} -
  • {{ article.title | safe }}
  • +
  • {{ article.date }} - {{ article.title | safe }}
  • {% endfor %} {% endif %} {% endfor %} -- cgit From f322fba75c8ca3dd4296a11bda688d63b2a547d2 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Mon, 16 Mar 2015 07:36:11 +0100 Subject: Added a new Jinja filter to get month name from number. --- pyaggr3g470r/templates/history.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pyaggr3g470r/templates/history.html') diff --git a/pyaggr3g470r/templates/history.html b/pyaggr3g470r/templates/history.html index 2d64da98..3b9412a3 100644 --- a/pyaggr3g470r/templates/history.html +++ b/pyaggr3g470r/templates/history.html @@ -7,7 +7,7 @@ {% if year == None %}
  • {{ article }} : {{ articles_counter[article] }} articles
  • {% elif month == None %} -
  • {{ article }} : {{ articles_counter[article] }} articles
  • +
  • {{ article | month_name }} : {{ articles_counter[article] }} articles
  • {% else %} {% for article in articles %}
  • {{ article.date }} - {{ article.title | safe }}
  • -- cgit From 3cb61e31e6642cba163604893efcca98b46f4b68 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Mon, 16 Mar 2015 13:30:02 +0100 Subject: Improvements to the 'history' page. --- pyaggr3g470r/templates/history.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'pyaggr3g470r/templates/history.html') diff --git a/pyaggr3g470r/templates/history.html b/pyaggr3g470r/templates/history.html index 3b9412a3..c4d6c9a6 100644 --- a/pyaggr3g470r/templates/history.html +++ b/pyaggr3g470r/templates/history.html @@ -2,6 +2,13 @@ {% block content %}

    {{ _('History') }}

    + {% if month != None %} +

    {{ year }}

    +

    {{ month | month_name }}

    + {% elif year != None %} +

     {{ _('all years') }}

    +

    {{ year }}

    + {% endif %}
      {% for article in articles_counter %} {% if year == None %} @@ -9,7 +16,7 @@ {% elif month == None %}
    • {{ article | month_name }} : {{ articles_counter[article] }} articles
    • {% else %} - {% for article in articles %} + {% for article in articles | sort(attribute="date") %}
    • {{ article.date }} - {{ article.title | safe }}
    • {% endfor %} {% endif %} -- cgit From 264c916b1e83a3f429c87a14d69c45e87a5afbd0 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 17 Mar 2015 06:56:38 +0100 Subject: Reverse the sort of articles. --- pyaggr3g470r/templates/history.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pyaggr3g470r/templates/history.html') diff --git a/pyaggr3g470r/templates/history.html b/pyaggr3g470r/templates/history.html index c4d6c9a6..b01ca032 100644 --- a/pyaggr3g470r/templates/history.html +++ b/pyaggr3g470r/templates/history.html @@ -16,7 +16,7 @@ {% elif month == None %}
    • {{ article | month_name }} : {{ articles_counter[article] }} articles
    • {% else %} - {% for article in articles | sort(attribute="date") %} + {% for article in articles | sort(attribute="date", reverse = True) %}
    • {{ article.date }} - {{ article.title | safe }}
    • {% endfor %} {% endif %} -- cgit From c351b29b2181aabfdd115476ffa68df0c05a3a09 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Thu, 19 Mar 2015 11:54:08 +0100 Subject: Format the date with the adequat Babel filter. --- pyaggr3g470r/templates/history.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pyaggr3g470r/templates/history.html') diff --git a/pyaggr3g470r/templates/history.html b/pyaggr3g470r/templates/history.html index b01ca032..6be54d71 100644 --- a/pyaggr3g470r/templates/history.html +++ b/pyaggr3g470r/templates/history.html @@ -17,7 +17,7 @@
    • {{ article | month_name }} : {{ articles_counter[article] }} articles
    • {% else %} {% for article in articles | sort(attribute="date", reverse = True) %} -
    • {{ article.date }} - {{ article.title | safe }}
    • +
    • {{ article.date | datetime }} - {{ article.title | safe }}
    • {% endfor %} {% endif %} {% endfor %} -- cgit