File tree Expand file tree Collapse file tree
app/grandchallenge/core/templatetags Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ def copy_button(value, link=None):
1111 button = format_html (
1212 "<button "
1313 'type="button" '
14- 'class="btn btn-link text-dark p-0 m -0 mr -1 copy-btn shadow-none" '
14+ 'class="btn btn-link text-dark p-0 mt -0 mb-1 mx -1 copy-btn shadow-none" '
1515 'data-copy="{value}" '
1616 'data-placement="left" '
1717 'title="Copy to clipboard">'
@@ -23,10 +23,13 @@ def copy_button(value, link=None):
2323 shortened = str (value ).split ("-" , 1 )[0 ]
2424
2525 if link :
26- return button + format_html (
27- '<a href="{link}">{display_value}</a>' ,
28- link = link ,
29- display_value = shortened ,
26+ return (
27+ format_html (
28+ '<a href="{link}">{display_value}</a>' ,
29+ link = link ,
30+ display_value = shortened ,
31+ )
32+ + button
3033 )
3134 else :
32- return button + format_html ("{display_value}" , display_value = shortened )
35+ return format_html ("{display_value}" , display_value = shortened ) + button
You can’t perform that action at this time.
0 commit comments