]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
templates: Use buttons for patch download links
authorStephen Finucane <stephen@that.guru>
Mon, 9 Jan 2017 11:12:37 +0000 (11:12 +0000)
committerStephen Finucane <stephen@that.guru>
Tue, 4 Apr 2017 15:24:07 +0000 (16:24 +0100)
We'll make use of this to enable downloading of patches with mboxes.

In addition, the 'hide' link for patches and cover letters is removed.
There's no way to enable this by default and the use cases are dubious
at best.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Reviewed-by: Daniel Axtens <dja@axtens.net>
patchwork/templates/patchwork/submission.html

index 21c345feccf1b845bcd78a6d3434362aa8a19ac1..a5914d78308db69f10de7af55f4b941a115c3a0b 100644 (file)
@@ -281,14 +281,16 @@ function toggle_div(link_id, headers_id)
 {% if submission.diff %}
 <h2>
  Patch
- <a href="javascript:toggle_div('hide-patch', 'patch')" id="hide-patch">hide</a></span>
- <span>|</span>
- <a href="{% url 'patch-raw' patch_id=submission.id %}"
-   >download patch</a>
- <span>|</span>
- <a href="{% url 'patch-mbox' patch_id=submission.id %}"
-   >download mbox</a>
+ <div class="btn-group pull-right">
+  <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>
+ </div>
 </h2>
+
 <div id="patch" class="patch">
 <pre class="content">
 {{ submission|patchsyntax }}