]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
Put download buttons at the top as well
authorDaniel Axtens <dja@axtens.net>
Mon, 27 Mar 2017 05:42:50 +0000 (16:42 +1100)
committerStephen Finucane <stephen@that.guru>
Sat, 15 Apr 2017 11:38:31 +0000 (12:38 +0100)
Suggested by a few people.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Stephen Finucane <stephen@that.guru>
patchwork/templates/patchwork/download_buttons.html [new file with mode: 0644]
patchwork/templates/patchwork/submission.html

diff --git a/patchwork/templates/patchwork/download_buttons.html b/patchwork/templates/patchwork/download_buttons.html
new file mode 100644 (file)
index 0000000..df392b3
--- /dev/null
@@ -0,0 +1,24 @@
+<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>
+  {% if submission.series.all|length == 1 %}
+  <a href="{% url 'series-mbox' series_id=submission.latest_series.id %}"
+   class="btn btn-default" role="button"
+   title="Download patch mbox with dependencies">series</a>
+  {% elif submission.series.all|length > 1 %}
+  <button type="button" class="btn btn-default dropdown-toggle"
+   data-toggle="dropdown">
+   series <span class="caret"></span>
+  </button>
+  <ul class="dropdown-menu" role="menu">
+  {% for series in submission.series.all %}
+   <li><a href="{% url 'series-mbox' series_id=series.id %}"
+    >{{ series }}</a></li>
+  {% endfor %}
+  </ul>
+  {% endif %}
+</div>
index dd1b9e39b9e1803b2262b86fd44bef0e7db88f4f..6ed20c348486f152b4c1e6136bb4614401008e17 100644 (file)
@@ -27,7 +27,9 @@ function toggle_div(link_id, headers_id)
 }
 </script>
 
-<h1>{{ submission.name }}</h1>
+<h1>{{ submission.name }}
+{% include "patchwork/download_buttons.html" %}
+</h1>
 
 <table class="patchmeta">
  <tr>
@@ -281,30 +283,7 @@ function toggle_div(link_id, headers_id)
 {% if submission.diff %}
 <h2>
  Patch
- <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>
-  {% if submission.series.all|length == 1 %}
-  <a href="{% url 'series-mbox' series_id=submission.latest_series.id %}"
-   class="btn btn-default" role="button"
-   title="Download patch mbox with dependencies">series</a>
-  {% elif submission.series.all|length > 1 %}
-  <button type="button" class="btn btn-default dropdown-toggle"
-   data-toggle="dropdown">
-   series <span class="caret"></span>
-  </button>
-  <ul class="dropdown-menu" role="menu">
-  {% for series in submission.series.all %}
-   <li><a href="{% url 'series-mbox' series_id=series.id %}"
-    >{{ series }}</a></li>
-  {% endfor %}
-  </ul>
-  {% endif %}
- </div>
+ {% include "patchwork/download_buttons.html" %}
 </h2>
 
 <div id="patch" class="patch">