hydra/src/root/edit-release.tt

65 lines
2.2 KiB
Plaintext
Raw Normal View History

[% WRAPPER layout.tt title=(create ? "New release" : "Edit release") %]
2009-10-23 09:58:23 +00:00
[% PROCESS common.tt %]
[% USE HTML %]
<div class="page-header"><h1>[% IF create %]New release[% ELSE %]Release <tt>[% release.name %]</tt>[% END %]</h1></div>
2009-10-23 09:58:23 +00:00
<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">
2009-10-23 09:58:23 +00:00
<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>
2009-10-26 10:35:59 +00:00
<p><em>Note:</em> to add a build to this release, go to the builds
information page and click on “Add to release”.</p>
2009-10-26 10:35:59 +00:00
[% 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>
2009-10-26 10:35:59 +00:00
[% 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>
2009-10-26 10:35:59 +00:00
[% END %]
</div>
</fieldset>
2009-10-23 09:58:23 +00:00
</form>
[% END %]