mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[IMP] runbot: bring back copy bundle name button
This commit is contained in:
parent
9c7cee657d
commit
9637976fef
@ -42,3 +42,11 @@
|
|||||||
// new Clipboard('.clipbtn');
|
// new Clipboard('.clipbtn');
|
||||||
//});
|
//});
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
|
function copyToClipboard(text) {
|
||||||
|
if (!navigator.clipboard) {
|
||||||
|
console.error('Clipboard not supported');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
navigator.clipboard.writeText(text);
|
||||||
|
}
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
<div class="col-md-3 col-lg-2 cell">
|
<div class="col-md-3 col-lg-2 cell">
|
||||||
<div class="one_line">
|
<div class="one_line">
|
||||||
<i t-if="bundle.sticky" class="fa fa-star" style="color: #f0ad4e" />
|
<i t-if="bundle.sticky" class="fa fa-star" style="color: #f0ad4e" />
|
||||||
|
<t t-if="not bundle.sticky" t-call="runbot.branch_copy_button"/>
|
||||||
<a t-attf-href="/runbot/bundle/#{bundle.id}" title="View Bundle">
|
<a t-attf-href="/runbot/bundle/#{bundle.id}" title="View Bundle">
|
||||||
<b t-esc="bundle.name"/>
|
<b t-esc="bundle.name"/>
|
||||||
</a>
|
</a>
|
||||||
|
@ -302,5 +302,11 @@
|
|||||||
</t>
|
</t>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template id="runbot.branch_copy_button">
|
||||||
|
<button t-attf-class="btn btn-link btn-ssm" title="Copy Bundle name" aria-label="Copy Bundle name" t-attf-onclick="copyToClipboard('{{ bundle.name.split(':')[-1] }}')">
|
||||||
|
<i t-attf-class="fa fa-clipboard"/>
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
</data>
|
</data>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
Loading…
Reference in New Issue
Block a user