diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-11-28 21:19:27 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-11-28 21:19:27 +0100 |
commit | c0fea7d60800af8f31c2a568b365b42ad01daf14 (patch) | |
tree | 7d9a4913e11b6052011160322ea70fcad73054a8 | |
parent | Only compare published date and title of articles. (diff) | |
download | newspipe-c0fea7d60800af8f31c2a568b365b42ad01daf14.tar.gz newspipe-c0fea7d60800af8f31c2a568b365b42ad01daf14.tar.bz2 newspipe-c0fea7d60800af8f31c2a568b365b42ad01daf14.zip |
Improved layout of the template duplicate.html.
-rw-r--r-- | pyaggr3g470r/templates/duplicates.html | 28 | ||||
-rw-r--r-- | pyaggr3g470r/views.py | 2 |
2 files changed, 23 insertions, 7 deletions
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 %} <div class="container"> {% if duplicates != [] %} - <ul class="list-group"> - {% for pair in duplicates %} - <li><a href="/article/{{ pair[0].id }}">{{ pair[0].title }}</a> - <a href="/article/{{ pair[1].id }}">{{ pair[1].title }}</a></li> - {% endfor %} - </ul> + <p><h1>{{ _('Duplicates in the feed') }} <a href="/feed/{{ feed.id }}">{{ feed.title }}</a>.</h1><p> + <div class="table-responsive"> + <table class="table table-striped"> + <thead> + <tr> + <th>#</th> + <th></th> + <th></th> + </tr> + </thead> + <tbody> + {% for pair in duplicates %} + <tr> + <td>{{ loop.index }}</td> + <td><a href="/article/{{ pair[0].id }}">{{ pair[0].title }}</a></td> + <td><a href="/article/{{ pair[1].id }}">{{ pair[1].title }}</a></td> + </tr> + {% endfor %} + </tobdy> + </table> + </div> {% else %} - <p>{{ _('No duplicates.') }}<p> + <p><h1>{{ _('No duplicates in the feed') }} <a href="/feed/{{ feed.id }}">{{ feed.title }}</a>.</h1><p> {% endif %} </div><!-- /.container --> {% 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 |