aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-11-28 21:49:53 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-11-28 21:49:53 +0100
commit3c75e4bd17ed238ca0a38e858ee3013ddc2210c0 (patch)
tree455172dad7ea8aa1b368b463da15e424a53c87ff
parentImproved layout of the template duplicate.html. (diff)
downloadnewspipe-3c75e4bd17ed238ca0a38e858ee3013ddc2210c0.tar.gz
newspipe-3c75e4bd17ed238ca0a38e858ee3013ddc2210c0.tar.bz2
newspipe-3c75e4bd17ed238ca0a38e858ee3013ddc2210c0.zip
Added a button to delete duplicate articles.
-rw-r--r--pyaggr3g470r/templates/duplicates.html4
-rw-r--r--pyaggr3g470r/views.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/pyaggr3g470r/templates/duplicates.html b/pyaggr3g470r/templates/duplicates.html
index 4b8a7c44..a7eff2d0 100644
--- a/pyaggr3g470r/templates/duplicates.html
+++ b/pyaggr3g470r/templates/duplicates.html
@@ -16,8 +16,8 @@
{% 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>
+ <td><a href="/delete/{{ pair[0].id }}"><i class="glyphicon glyphicon-remove" title="{{ _('Delete this article') }}"></i></a>&nbsp;<a href="/article/{{ pair[0].id }}">{{ pair[0].title }}</a></td>
+ <td><a href="/delete/{{ pair[1].id }}"><i class="glyphicon glyphicon-remove" title="{{ _('Delete this article') }}"></i></a>&nbsp;<a href="/article/{{ pair[1].id }}">{{ pair[1].title }}</a></td>
</tr>
{% endfor %}
</tobdy>
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 7e97560b..aec5c976 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -341,7 +341,7 @@ def article(article_id=None):
article=article,
previous_article=previous_article, next_article=next_article)
flash(gettext("This article do not exist."), 'warning')
- return redirect(redirect_url())
+ return redirect(url_for('home'))
@app.route('/mark_as/<string:new_value>', methods=['GET'])
@@ -398,7 +398,7 @@ def delete(article_id=None):
except:
pass
flash(gettext('Article') + ' ' + article.title + ' ' + gettext('deleted.'), 'success')
- return redirect(url_for('home'))
+ return redirect(redirect_url())
else:
flash(gettext('This article do not exist.'), 'danger')
return redirect(url_for('home'))
bgstack15