From c0fea7d60800af8f31c2a568b365b42ad01daf14 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Fri, 28 Nov 2014 21:19:27 +0100 Subject: Improved layout of the template duplicate.html. --- pyaggr3g470r/templates/duplicates.html | 28 ++++++++++++++++++++++------ pyaggr3g470r/views.py | 2 +- 2 files changed, 23 insertions(+), 7 deletions(-) (limited to 'pyaggr3g470r') diff --git a/pyaggr3g470r/templates/duplicates.html b/pyaggr3g470r/templates/duplicates.html index 548f845d..4b8a7c44 100644 --- a/pyaggr3g470r/templates/duplicates.html +++ b/pyaggr3g470r/templates/duplicates.html @@ -2,13 +2,29 @@ {% block content %}
{% if duplicates != [] %} - +

{{ _('Duplicates in the feed') }} {{ feed.title }}.

+

+ + + + + + + + + + {% for pair in duplicates %} + + + + + + {% endfor %} + +
#
{{ loop.index }}{{ pair[0].title }}{{ pair[1].title }}
+
{% else %} -

{{ _('No duplicates.') }}

+

{{ _('No duplicates in the feed') }} {{ feed.title }}.

{% endif %}

{% endblock %} diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py index c6c7b5b3..7e97560b 100644 --- a/pyaggr3g470r/views.py +++ b/pyaggr3g470r/views.py @@ -485,7 +485,7 @@ def duplicates(feed_id=None): feed = Feed.query.filter(Feed.user_id == g.user.id, Feed.id == feed_id).first() duplicates = [] duplicates = duplicate.compare_documents(feed) - return render_template('duplicates.html', duplicates=duplicates) + return render_template('duplicates.html', duplicates=duplicates, feed=feed) @app.route('/index_database', methods=['GET']) @login_required -- cgit