diff mbox

[39/49] patch: Pull the download links next to the "Patch" header

Message ID 1443708774-26996-40-git-send-email-damien.lespiau@intel.com
State Accepted
Headers show

Commit Message

Damien Lespiau Oct. 1, 2015, 2:12 p.m. UTC
From: Belén Barros Peña <belen.barros.pena@intel.com>

Signed-off-by: Belén Barros Peña <belen.barros.pena@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
---
 htdocs/css/style.css                     |  6 ++++++
 patchwork/templates/patchwork/patch.html | 26 +++++++++++++-------------
 2 files changed, 19 insertions(+), 13 deletions(-)
diff mbox

Patch

diff --git a/htdocs/css/style.css b/htdocs/css/style.css
index 3fe42b4..18b9b54 100644
--- a/htdocs/css/style.css
+++ b/htdocs/css/style.css
@@ -11,6 +11,12 @@  h2 {
 	margin: 18px 0 18px 0;
 }
 
+h2 a, h2 span {
+	font-size: 14px;
+	padding-left: 5px;
+	font-weight: normal;
+}
+
 pre {
 	line-height: 110%;
 	background-color: white;
diff --git a/patchwork/templates/patchwork/patch.html b/patchwork/templates/patchwork/patch.html
index eb09990..593281a 100644
--- a/patchwork/templates/patchwork/patch.html
+++ b/patchwork/templates/patchwork/patch.html
@@ -45,17 +45,6 @@  function toggle_headers(link_id, headers_id)
   <th>Message ID</th>
   <td>{{ patch.msgid }}</td>
  </tr>
- <tr>
-  <th>Download</th>
-  <td>
-   <a href="{% url 'patchwork.views.patch.mbox' patch_id=patch.id %}"
-   >mbox</a>
-{% if patch.content %}|
-   <a href="{% url 'patchwork.views.patch.content' patch_id=patch.id %}"
-   >patch</a>
-{% endif %}
-   </td>
- </tr>
   <tr>
    <th>State</th>
    <td>{{ patch.state.name }}{% if patch.archived %}, archived{% endif %}</td>
@@ -188,8 +177,19 @@  function toggle_headers(link_id, headers_id)
 {% endfor %}
 
 {% if patch.content %}
-<h2>Patch</h2>
-<div class="patch">
+<h2>
+ Patch
+ <a href="javascript:toggle_headers('hide-patch', 'patch')" id="hide-patch">hide</a></span>
+{% if patch.content %}
+ <span>|</span>
+ <a href="{% url 'patchwork.views.patch.content' patch_id=patch.id %}"
+   >dowload patch</a>
+{% endif %}
+ <span>|</span>
+ <a href="{% url 'patchwork.views.patch.mbox' patch_id=patch.id %}"
+   >dowload mbox</a>
+</h2>
+<div id="patch" class="patch">
 <pre class="content">
 {{ patch|patchsyntax }}
 </pre>