]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
templates: Add click-to-copy patch ID ("mpe mode") to patch detail page
authorAndrew Donnellan <andrew.donnellan@au1.ibm.com>
Wed, 20 Dec 2017 06:34:24 +0000 (17:34 +1100)
committerStephen Finucane <stephen@that.guru>
Thu, 4 Jan 2018 11:39:46 +0000 (11:39 +0000)
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@au1.ibm.com>
Signed-off-by: Stephen Finucane <stephen@that.guru>
patchwork/templates/patchwork/download_buttons.html
releasenotes/notes/add-copy-to-clipboard-button-9705539228e07788.yaml [new file with mode: 0644]

index 1322eed2e5116250f06a8f99c79f23d33cf44aec..4809db54ec1d0df29e9ea9ba00436bbfefbe5a10 100644 (file)
@@ -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"
diff --git a/releasenotes/notes/add-copy-to-clipboard-button-9705539228e07788.yaml b/releasenotes/notes/add-copy-to-clipboard-button-9705539228e07788.yaml
new file mode 100644 (file)
index 0000000..b3914bc
--- /dev/null
@@ -0,0 +1,5 @@
+---
+other:
+  - |
+    The patch ID on the patch detail page can now be clicked to copy it. This
+    is similar to what we already do on the patch list page.