Skip to content

Commit

Permalink
views: Display correct download links for covers
Browse files Browse the repository at this point in the history
This means using the correct link for the cover mbox and not displaying
one for the non-existent diff.

Signed-off-by: Stephen Finucane <[email protected]>
  • Loading branch information
stephenfin committed May 30, 2017
1 parent 5cbcd3a commit 1ee9ab2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions patchwork/templates/patchwork/download_buttons.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
<div class="btn-group pull-right">
{% if submission.diff %}
<a href="{% url 'patch-raw' patch_id=submission.id %}"
class="btn btn-default" role="button" title="Download patch diff"
>diff</a>
<a href="{% url 'patch-mbox' patch_id=submission.id %}"
class="btn btn-default" role="button" title="Download patch mbox"
>mbox</a>
{% else %}
<a href="{% url 'cover-mbox' cover_id=submission.id %}"
class="btn btn-default" role="button" title="Download cover mbox"
>mbox</a>
{% endif %}
{% if submission.series.all|length == 1 %}
<a href="{% url 'series-mbox' series_id=submission.latest_series.id %}"
class="btn btn-default" role="button"
Expand Down

0 comments on commit 1ee9ab2

Please sign in to comment.