Skip to content

Commit 1ee9ab2

Browse files
committed
views: Display correct download links for covers
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]>
1 parent 5cbcd3a commit 1ee9ab2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

patchwork/templates/patchwork/download_buttons.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
<div class="btn-group pull-right">
2+
{% if submission.diff %}
23
<a href="{% url 'patch-raw' patch_id=submission.id %}"
34
class="btn btn-default" role="button" title="Download patch diff"
45
>diff</a>
56
<a href="{% url 'patch-mbox' patch_id=submission.id %}"
67
class="btn btn-default" role="button" title="Download patch mbox"
78
>mbox</a>
9+
{% else %}
10+
<a href="{% url 'cover-mbox' cover_id=submission.id %}"
11+
class="btn btn-default" role="button" title="Download cover mbox"
12+
>mbox</a>
13+
{% endif %}
814
{% if submission.series.all|length == 1 %}
915
<a href="{% url 'series-mbox' series_id=submission.latest_series.id %}"
1016
class="btn btn-default" role="button"

0 commit comments

Comments
 (0)