hydra/src/root/edit-release.tt
2012-04-17 16:53:11 +02:00

65 lines
2.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[% WRAPPER layout.tt title=(create ? "New release" : "Edit release") %]
[% PROCESS common.tt %]
[% USE HTML %]
<div class="page-header"><h1>[% IF create %]New release[% ELSE %]Release <tt>[% release.name %]</tt>[% END %]</h1></div>
<form class="form-horizontal" action="[% IF create %][% c.uri_for('/project' project.name 'create-release/submit') %][% ELSE %][% c.uri_for('/release' project.name release.name 'submit') %][% END %]" method="post">
<fieldset>
<div class="control-group">
<label class="control-label">Identifier</label>
<div class="controls">
<input type="text" class="span3" name="name" [% HTML.attributes(value => release.name) %]></input>
</div>
</div>
<div class="control-group">
<label class="control-label">Description</label>
<div class="controls">
<input type="text" class="span3" name="description" [% HTML.attributes(value => release.description) %]></input>
</div>
</div>
<h3>Release members</h3>
<p><em>Note:</em> to add a build to this release, go to the builds
information page and click on “Add to release”.</p>
[% FOREACH m IN members %]
<div class="releaseMember control-group">
<label class="control-label">Build [% m.build.id %] Label</label>
<div class="controls">
<input type="text" class="span3" name="member-[% m.build.id %]-description" [% HTML.attributes(value => m.description) %]></input>
<button class="btn btn-warning" type="button" onclick='$(this).parents(".releaseMember").remove()'><i class="icon-trash icon-white"></i></button>
</div>
</div>
[% END %]
<div class="form-actions">
<button type="submit" class="btn btn-primary">
<i class="icon-ok icon-white"></i>
[%IF create %]Create[% ELSE %]Apply changes[% END %]
</button>
[% IF !create %]
<button id="delete-release" type="submit" class="btn btn-danger" name="action" value="delete">
<i class="icon-trash icon-white"></i>
Delete this release
</button>
<script type="text/javascript">
$("#delete-release").click(function() {
return confirm("Are you sure you want to delete this release?");
});
</script>
[% END %]
</div>
</fieldset>
</form>
[% END %]