forked from lix-project/hydra
Make "Add to release" a modal dialog
This commit is contained in:
parent
d92d83a82a
commit
06c74085b5
|
@ -192,19 +192,6 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
[% IF c.user_exists && available %]
|
|
||||||
<br/>
|
|
||||||
<form class="form-horizontal" action="[% c.uri_for('/build' build.id 'add-to-release') %]" method="post">
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label">Add to release</label>
|
|
||||||
<div class="controls">
|
|
||||||
<input type="text" class="input" name="name"></input>
|
|
||||||
<button type="submit" class="btn btn-success">Apply</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
[% END %]
|
|
||||||
|
|
||||||
[% IF build.buildproducts && !isAggregate %]
|
[% IF build.buildproducts && !isAggregate %]
|
||||||
|
|
||||||
<h3>Build products</h3>
|
<h3>Build products</h3>
|
||||||
|
@ -559,4 +546,28 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
[% IF c.user_exists && available && project.releases %]
|
||||||
|
<div id="add-to-release" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
|
||||||
|
<form class="form-horizontal" action="[% c.uri_for('/build' build.id 'add-to-release') %]" method="post">
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">Add to release</label>
|
||||||
|
<div class="controls">
|
||||||
|
<select class="span2" name="name">
|
||||||
|
[% FOREACH r IN project.releases %]
|
||||||
|
<option>[% HTML.escape(r.name) %]</option>
|
||||||
|
[% END %]
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" class="btn btn-primary">Add</button>
|
||||||
|
<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
[% END %]
|
||||||
|
|
||||||
|
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[% BLOCK menuItem %]
|
[% BLOCK menuItem %]
|
||||||
<li class="[% IF "${root}${curUri}" == uri %]active[% END %]" [% IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END %]>
|
<li class="[% IF "${root}${curUri}" == uri %]active[% END %]" [% IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END %]>
|
||||||
<a href="[% uri %]">[% title %]</a>
|
<a href="[% uri %]" [% IF modal %]data-toggle="modal"[% END %]>[% title %]</a>
|
||||||
</li>
|
</li>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
|
@ -155,6 +155,12 @@
|
||||||
uri = c.uri_for('/build' build.id 'cancel')
|
uri = c.uri_for('/build' build.id 'cancel')
|
||||||
title = "Cancel build" %]
|
title = "Cancel build" %]
|
||||||
[% END %]
|
[% END %]
|
||||||
|
[% IF available && project.releases %]
|
||||||
|
[% INCLUDE menuItem
|
||||||
|
uri = "#add-to-release"
|
||||||
|
title = "Add to release"
|
||||||
|
modal = 1 %]
|
||||||
|
[% END %]
|
||||||
[% END %]
|
[% END %]
|
||||||
[% END %]
|
[% END %]
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
Loading…
Reference in a new issue