runbot/runbot/templates/branch.xml
Xavier-Do 6bafea7c36 [IMP] runbot: adapt to bootstrap 5.3
The bootstrap version was freezed during a previous migration to avoid
loosing to much time adapting the style again to fit the previous
look and feel.

Anyway, the  latest version of bootsrap offers more flexibility about
themes, and it could be a good oportunity to modernise a little the
runbot interface and answer to long lasting requests.

The main part of the adaptation is to tweak colors to match the
previous style, and adapt some class in xml views.

Some css rules are also tweaked to keep the same looks without the need
to rewrite xml views too much, this could be done in a future commit.
2024-04-23 10:08:54 +02:00

86 lines
3.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="runbot.branch">
<t t-call='runbot.layout'>
<div class="container-fluid">
<div class="row">
<div class='col-md-12'>
<div class="navbar navbar-default">
<h3>
<span class="text-muted"><t t-esc="branch.remote_id.short_name"/>:</span><t t-esc="branch.name"/> <i t-if="not branch.alive" title="deleted/closed" class="fa fa-ban text-danger"/>
<div class="btn-group" role="group">
<a t-att-href="branch.branch_url" class="btn btn-sm text-start" title="View Branch on Github"><i class="fa fa-github"/></a>
<a groups="runbot.group_runbot_admin" class="btn btn-sm fa fa-list text-start" t-attf-href="/web/#id={{branch.id}}&amp;view_type=form&amp;model=runbot.branch" target="new" title="View Branch in Backend"/>
</div>
</h3>
</div>
<table class="table table-condensed table-responsive table-stripped">
<tr>
<td>Remote:</td>
<td t-esc="branch.remote_id.name"></td>
</tr>
<tr>
<td>Head:</td>
<td t-esc="branch.head_name"></td>
</tr>
<tr>
<td>Bundle:</td>
<td>
<small>
<div class="btn-toolbar mb-1" role="toolbar">
<div class="btn-group btn-group-ssm w-100" role="group">
<a t-attf-href="/runbot/bundle/{{branch.bundle_id.id}}" t-esc="branch.bundle_id.name" class="btn btn-default text-start" title="View Bundle Details"/>
</div>
</div>
</small>
</td>
</tr>
<t t-if="branch.is_pr">
<tr t-if="pr_branch">
<td>Pull Head Name</td>
<td><a t-attf-href="/runbot/branch/{{pr_branch.id}}" t-esc="branch.pull_head_name" title="View PR Details"/></td>
</tr>
<tr>
<td>Target Branch</td>
<td t-esc="branch.target_branch_name"></td>
</tr>
<tr>
<td>Pr title</td>
<td t-esc="branch.pr_title"/>
</tr>
</t>
<t t-elif="branch_pr">
<tr>
<td>Pull Request:</td>
<td><a t-attf-href="/runbot/branch/{{branch_pr.id}}" t-esc="branch_pr.name" title="View Branch Details"/></td>
</tr>
</t>
</table>
<table t-if="branch.reflog_ids" class="table table-condensed table-stripped" style="table-layout: initial;">
<thead>
<tr>
<th>Ref Date</th>
<th>SHA</th>
<th>Commit Date</th>
<th>Author</th>
<th>Subject</th>
</tr>
</thead>
<tr t-foreach='branch.reflog_ids' t-as='reflog'>
<td t-esc="reflog.date"/>
<td><a t-attf-href="/runbot/commit/{{reflog.commit_id.id}}" t-esc="reflog.commit_id.name"/></td>
<td t-esc="reflog.commit_id.date"/>
<td t-esc="reflog.commit_id.author"/>
<td t-esc="reflog.commit_id.subject"/>
</tr>
</table>
<h4 t-else="">No Reflogs Found</h4>
</div>
</div>
</div>
</t>
</template>
</data>
</odoo>