runbot/runbot/templates/branch.xml
2022-11-24 16:24:42 +01: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-left" 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-left" 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-left" 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>