mirror of
https://github.com/odoo/runbot.git
synced 2025-03-16 16:05:42 +07:00
[IMP] runbot: add a copy to clipboard button for branch
When using the runbot frontend, it's sometimes very frustrating when trying to copy branch name, some mouse gym is necessary. With this commit, a copy to clipboard button is added near the branch name on the frontend.
This commit is contained in:
parent
e345d4d0d0
commit
54f0488b26
@ -41,5 +41,7 @@
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
$(function() {
|
||||
new Clipboard('.clipbtn');
|
||||
});
|
||||
})(jQuery);
|
||||
|
@ -7,7 +7,9 @@
|
||||
<div class="row">
|
||||
<div class='col-md-12'>
|
||||
<div class="navbar navbar-default">
|
||||
<span class="text-center" style="font-size: 18px;">Builds for branch: <t t-esc="builds[0].branch_id.name.split('/')[-1]" /></span>
|
||||
<span class="text-center" style="font-size: 18px;">Builds for branch: <span id="branchclp"><t t-esc="builds[0].branch_id.branch_name" /></span>
|
||||
<a href="#" class="clipbtn octicon octicon-clippy" data-clipboard-target="#branchclp" title="Copy branch name to clipboard"/><br/>
|
||||
</span>
|
||||
<span class="pull-right"><t t-call="website.pager" /></span>
|
||||
</div>
|
||||
<table class="table table-condensed table-stripped" style="table-layout: initial;">
|
||||
|
@ -209,6 +209,8 @@
|
||||
<t t-if='dep.closest_branch_id'> from branch <t t-esc="dep.closest_branch_id.name"/></t>
|
||||
<br/>
|
||||
</t>
|
||||
Branch: <span id="branchclp"><t t-esc="build.branch_id.branch_name"/></span>
|
||||
<a href="#" class="clipbtn octicon octicon-clippy" data-clipboard-target="#branchclp" title="Copy branch name to clipboard"/><br/>
|
||||
Build host: <t t-esc="build.real_build.host"/><br/>
|
||||
</td>
|
||||
<td t-if="build.children_ids">
|
||||
|
Loading…
Reference in New Issue
Block a user