aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyaggr3g470r/templates/duplicates.html28
-rw-r--r--pyaggr3g470r/views.py2
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
bgstack15