Move 'keep build' and 'restart' to toplevel menu

This commit is contained in:
Rob Vermaas 2012-04-12 21:50:06 +02:00
parent 089a9c836f
commit 8aaa0a1a8a
3 changed files with 12 additions and 16 deletions

View file

@ -362,18 +362,8 @@
<em>Build output is no longer available</em>
[% ELSIF build.keep %]
<em>Build output will be kept permanently</em>
[% IF c.user_exists %]
<form action="[% c.uri_for('/build' build.id 'keep' 0) %]" method="post" class="inline">
<button id="unkeep" type="submit">Unkeep</button>
</form>
[% END %]
[% ELSE %]
<em>Build output is available, but may be garbage-collected</em>
[% IF c.user_exists %]
<form action="[% c.uri_for('/build' build.id 'keep' 1) %]" method="post" class="inline">
<button id="keep" type="submit">Keep</button>
</form>
[% END %]
[% END %]
</td>
</tr>

View file

@ -262,11 +262,6 @@
<span class="error">Build failed</span>
(see <a href="#nix-error">below</a>)
[% END %]
[% IF c.user_exists && (buildstatus == 3 || buildstatus == 4) %]
<form action="[% c.uri_for('/build' build.id 'restart') %]" method="post" class="inline">
<button id="restart" type="submit">Restart</button>
</form>
[% END %]
[% ELSIF build.busy %]
<strong>Build in progress</strong>
since [% INCLUDE renderDateTime timestamp = build.starttime %]

View file

@ -114,8 +114,19 @@
[% INCLUDE makeLink
uri = c.uri_for('/build' build.id 'clone')
title = "Clone build" %]
[% IF !available %]
[% ELSIF build.keep %]
[% INCLUDE makeLink
uri = c.uri_for('/build' build.id 'keep' 0)
title = "Unkeep build" %]
[% ELSE %]
[% INCLUDE makeLink
uri = c.uri_for('/build' build.id 'keep' 1)
title = "Keep build" %]
[% END %]
[% INCLUDE makeLink
uri = '#'
uri = c.uri_for('/build' build.id 'restart')
title = "Restart build" %]
[% END %]