2008-11-28 00:16:01 +00:00
|
|
|
|
[% WRAPPER layout.tt title=(create ? "New Release Set" : "Release Set ‘$curProject.name:$releaseSet.name’") %]
|
2008-11-27 21:08:17 +00:00
|
|
|
|
[% PROCESS common.tt %]
|
|
|
|
|
[% USE HTML %]
|
|
|
|
|
|
2008-11-28 00:16:01 +00:00
|
|
|
|
<h1>[% IF create %]New Release Set[% ELSE %]Release Set <tt>[% curProject.name %]:[% releaseSet.name %]</tt>[% END %]</h1>
|
2008-11-27 21:08:17 +00:00
|
|
|
|
|
2008-11-27 22:26:53 +00:00
|
|
|
|
|
|
|
|
|
[% BLOCK renderJob %]
|
|
|
|
|
<tr id="[% id %]" >
|
|
|
|
|
<td>
|
|
|
|
|
<button type="button" onclick='$(this).parents("tr").remove()'>
|
|
|
|
|
<img src="/static/images/failure.gif" alt="Delete job" />
|
|
|
|
|
</button>
|
|
|
|
|
</td>
|
|
|
|
|
<td><input type="radio" id="[% "$baseName-primary" %]" name="primary" [% IF job.isprimary %]
|
2008-11-27 22:29:38 +00:00
|
|
|
|
checked="checked" [% END %] [% HTML.attributes(value => "$n") %] /></td>
|
2008-11-27 22:26:53 +00:00
|
|
|
|
<td><input type="text" class="string" [% HTML.attributes(id => "$baseName-name", name => "$baseName-name", value => job.job) %] /></td>
|
|
|
|
|
<td><input type="text" class="string" [% HTML.attributes(id => "$baseName-description", name => "$baseName-description", value => job.description) %] /></td>
|
|
|
|
|
<td><input type="text" class="string" [% HTML.attributes(id => "$baseName-attrs", name => "$baseName-attrs", value => job.attrs) %] /></td>
|
|
|
|
|
</tr>
|
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
|
|
2008-11-28 00:16:01 +00:00
|
|
|
|
<form action="[% IF create %][% c.uri_for('/create_releaseset' curProject.name 'submit') %][% ELSE %][% c.uri_for('/releases' curProject.name releaseSet.name 'submit') %][% END %]" method="post">
|
2008-11-27 21:08:17 +00:00
|
|
|
|
|
|
|
|
|
<table class="layoutTable">
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Identifier:</th>
|
|
|
|
|
<td><input type="text" class="string" name="name" [% HTML.attributes(value => releaseSet.name) %] /></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Description:</th>
|
|
|
|
|
<td><input type="text" class="string" name="description" [% HTML.attributes(value => releaseSet.description) %] /></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
2008-11-27 21:40:23 +00:00
|
|
|
|
<table class="tablesorter">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
2008-11-27 22:26:53 +00:00
|
|
|
|
<th></th>
|
2008-11-27 21:40:23 +00:00
|
|
|
|
<th>Primary job</th>
|
|
|
|
|
<th>Job name</th>
|
|
|
|
|
<th>Description</th>
|
|
|
|
|
<th>Constraint</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
[% n = 0 %]
|
|
|
|
|
[% FOREACH job IN jobs %]
|
2008-11-27 22:26:53 +00:00
|
|
|
|
[% INCLUDE renderJob baseName="job-$n" %]
|
2008-11-27 21:40:23 +00:00
|
|
|
|
[% n = n + 1 %]
|
|
|
|
|
[% END %]
|
2008-11-27 22:26:53 +00:00
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="5"><button type="button" class="add-job">Add a new job</button></td>
|
|
|
|
|
</tr>
|
2008-11-27 21:40:23 +00:00
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
|
2008-11-27 21:08:17 +00:00
|
|
|
|
<p><button type="submit"><img src="/static/images/success.gif" />[%IF create %]Create[% ELSE %]Apply changes[% END %]</button></p>
|
|
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|
2008-11-27 22:26:53 +00:00
|
|
|
|
<table class="template"> <!-- dummy wrapper needed because “hidden” trs are visible anyway -->
|
|
|
|
|
[% INCLUDE renderJob job="" id="job-template" baseName="job-template" %]
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
var id = [% n %];
|
|
|
|
|
|
|
|
|
|
$(".add-job").click(function() {
|
|
|
|
|
var newnr = id++;
|
|
|
|
|
var newid = "job-" + newnr;
|
|
|
|
|
var x = $("#job-template").clone(true).attr("id", "").insertBefore($(this).parents("tr")).show();
|
|
|
|
|
$("#job-template-name", x).attr("name", newid + "-name");
|
|
|
|
|
$("#job-template-description", x).attr("name", newid + "-description");
|
|
|
|
|
$("#job-template-attrs", x).attr("name", newid + "-attrs");
|
|
|
|
|
$("#job-template-primary", x).attr("value", newnr);
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
2008-11-28 00:16:01 +00:00
|
|
|
|
[% IF !create %]
|
|
|
|
|
|
|
|
|
|
<form action="[% c.uri_for('/releases' curProject.name releaseSet.name 'delete') %]" method="post">
|
|
|
|
|
<p><button id="delete-project" type="submit"><img src="/static/images/failure.gif" />Delete this release set</button></p>
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
$("#delete-project").click(function() {
|
|
|
|
|
return confirm("Are you sure you want to delete this release set?");
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
|
|
2008-11-27 21:08:17 +00:00
|
|
|
|
[% END %]
|