diff mbox series

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

Message ID 20171220063424.16362-1-andrew.donnellan@au1.ibm.com
State Accepted
Headers show
Series templates: Add click-to-copy patch ID ("mpe mode") to patch detail page | expand

Commit Message

Andrew Donnellan Dec. 20, 2017, 6:34 a.m. UTC
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>
---
 patchwork/templates/patchwork/download_buttons.html | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Stephen Finucane Jan. 4, 2018, 11:37 a.m. UTC | #1
On Wed, 2017-12-20 at 17:34 +1100, Andrew Donnellan wrote:
> 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>

Yup, fine by me. Added a release note and applied to master.

Reviewed-by: Stephen Finucane <stephen@that.guru>
diff mbox series

Patch

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"