mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +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');
|
||||
//});
|
||||
})(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="one_line">
|
||||
<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">
|
||||
<b t-esc="bundle.name"/>
|
||||
</a>
|
||||
|
@ -302,5 +302,11 @@
|
||||
</t>
|
||||
</div>
|
||||
</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>
|
||||
</odoo>
|
||||
|
Loading…
Reference in New Issue
Block a user