[IMP] runbot: try to improve dashboard bundle line title

This commit is contained in:
Christophe Monniez 2020-11-13 15:26:31 +01:00
parent 9637976fef
commit 733ab2dd43
3 changed files with 29 additions and 21 deletions

View File

@ -10,12 +10,15 @@
<span class="text-center" style="font-size: 18px;">
<t t-esc="bundle.name"/>
<i t-if="bundle.sticky" class="fa fa-star" style="color: #f0ad4e" />
<a groups="runbot.group_runbot_admin" t-attf-href="/web/#id={{bundle.id}}&amp;view_type=form&amp;model=runbot.bundle" class="btn btn-default btn-sm" target="new" title="View in Backend">
<i class="fa fa-list"/>
</a>
<a groups="runbot.group_user" t-attf-href="/runbot/bundle/{{bundle.id}}/force" title="Force A New Batch">
<i class="fa fa-refresh"/>
</a>
<div class="btn-group" role="group">
<a groups="runbot.group_runbot_admin" t-attf-href="/web/#id={{bundle.id}}&amp;view_type=form&amp;model=runbot.bundle" class="btn btn-default btn-sm" target="new" title="View in Backend">
<i class="fa fa-list"/>
</a>
<a class="btn btn-default" groups="runbot.group_user" t-attf-href="/runbot/bundle/{{bundle.id}}/force" title="Force A New Batch">
<i class="fa fa-refresh"/>
</a>
<t t-call="runbot.branch_copy_button"/>
</div>
</span>
<span class="pull-right">
<t t-call="website.pager" />

View File

@ -32,26 +32,31 @@
<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>
<br/>
<t t-foreach="categories" t-as="category">
<t t-if="active_category_id != category.id">
<t t-set="last_category_batch" t-value="bundle.with_context(category_id=category.id).last_done_batch"/>
<t t-if="last_category_batch">
<t t-if="category.view_id" t-call="{{category.view_id.key}}"/>
<a t-else=""
t-attf-title="View last {{category.name}} batch"
t-attf-href="/runbot/batch/{{last_category_batch.id}}"
t-attf-class="fa fa-{{category.icon}}"
/>
</div>
<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
<div class="btn-group" role="group">
<t t-foreach="categories" t-as="category">
<t t-if="active_category_id != category.id">
<t t-set="last_category_batch" t-value="bundle.with_context(category_id=category.id).last_done_batch"/>
<t t-if="last_category_batch">
<t t-if="category.view_id" t-call="{{category.view_id.key}}"/>
<a t-else=""
t-attf-title="View last {{category.name}} batch"
t-attf-href="/runbot/batch/{{last_category_batch.id}}"
t-attf-class="fa fa-{{category.icon}}"
/>
</t>
</t>
</t>
</t>
</div>
<div class="btn-group" role="group">
<t t-if="not bundle.sticky" t-call="runbot.branch_copy_button"/>
<t t-call="runbot.branch_github_menu"/>
</div>
</div>
<t t-call="runbot.branch_github_menu"/>
</div>
<div class="col-md-9 col-lg-10">
<div class="row no-gutters">

View File

@ -304,7 +304,7 @@
</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] }}')">
<button t-attf-class="btn btn-default 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>