[PATCH] templates: Add click-to-copy patch ID ("mpe mode") to patch detail page

Andrew Donnellan andrew.donnellan at au1.ibm.com
Wed Dec 20 17:34:24 AEDT 2017


Similar to what we already do on the patch list page, display the patch ID
on the patch detail page and make it a click-to-copy button.

Closes: #115 ("Show copy-able patch ID ("mpe mode") on patch detail page")
Signed-off-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>
---
 patchwork/templates/patchwork/download_buttons.html | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/patchwork/templates/patchwork/download_buttons.html b/patchwork/templates/patchwork/download_buttons.html
index 1322eed..4809db5 100644
--- a/patchwork/templates/patchwork/download_buttons.html
+++ b/patchwork/templates/patchwork/download_buttons.html
@@ -1,4 +1,8 @@
 <div class="btn-group pull-right">
+  <button type="button" class="btn btn-default btn-copy"
+     data-clipboard-text="{{ submission.id }}" title="Copy to Clipboard">
+      {{ submission.id }}
+  </button>
   {% if submission.diff %}
   <a href="{% url 'patch-raw' patch_id=submission.id %}"
    class="btn btn-default" role="button" title="Download patch diff"
-- 
2.11.0



More information about the Patchwork mailing list