You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: subprojects/hydra/root/common.tt
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -393,7 +393,7 @@ BLOCK renderInputs; %]
393
393
<tt>[% HTML.escape(input.uri) %]</tt>
394
394
[% END %]
395
395
</td>
396
-
<td>[% IF input.revision %][% HTML.escape(input.revision) %][% END %]</td>
396
+
<td>[% IF input.revision %]<tt class="rev-copy" onclick="copyToClipboard('[% input.revision | html %]', this)" title="Click to copy">[% HTML.escape(input.revision) %]</tt>[% END %]</td>
397
397
<td><tt>[% input.path | html %]</tt></td>
398
398
</tr>
399
399
[% END %]
@@ -423,10 +423,12 @@ BLOCK renderInputDiff; %]
423
423
[% IF bi1.type == "git" %]
424
424
<tr><td>
425
425
<b>[% HTML.escape(bi1.name) %]</b></td><td><tt>[% INCLUDE renderDiffUri contents=(bi1.frontend_revision _ ' to ' _ bi2.frontend_revision) %]</tt>
426
+
(<a class="rev-copy" href="javascript:void(0)" onclick="copyToClipboard('[% bi2.revision | html %]', this); return false;" title="Click to copy full revision: [% bi2.revision | html %]">copy</a>)
426
427
</td></tr>
427
428
[% ELSE %]
428
429
<tr><td>
429
430
<b>[% HTML.escape(bi1.name) %]</b></td><td><tt>[% INCLUDE renderDiffUri contents=(bi1.revision _ ' to ' _ bi2.revision) %]</tt>
431
+
(<a class="rev-copy" href="javascript:void(0)" onclick="copyToClipboard('[% bi2.revision | html %]', this); return false;" title="Click to copy latest revision">copy</a>)
<a class="rev-copy" href="javascript:void(0)" onclick="copyToClipboard('[% input.revision | html %]', this); return false;" title="Click to copy full revision: [% input.revision | html %]"><tt>[% input.frontend_revision | html %]</tt></a>
0 commit comments