Bootstrapify the Hydra forms (except the project and jobset edit pages)
Plus lots of other tweaks.
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
[% WRAPPER layout.tt title=(create ? "New View" : "View ‘$project.name:$view.name’") %]
|
||||
[% WRAPPER layout.tt title=(create ? "New view" : "View ‘$project.name:$view.name’") %]
|
||||
[% PROCESS common.tt %]
|
||||
[% USE HTML %]
|
||||
|
||||
<h1>[% IF create %]New View[% ELSE %]View <tt>[% project.name %]:[% view.name %]</tt>[% END %]</h1>
|
||||
<div class="page-header"><h1>[% IF create %]New view[% ELSE %]View <tt>[% project.name %]:[% view.name %]</tt>[% END %]</h1></div>
|
||||
|
||||
|
||||
[% BLOCK renderJob %]
|
||||
<tr id="[% id %]" >
|
||||
<td>
|
||||
<button type="button" onclick='$(this).parents("tr").remove()'>
|
||||
<img src="/static/images/failure.gif" alt="Delete job" />
|
||||
<button type="button" class="btn btn-warning" onclick='$(this).parents("tr").remove()'>
|
||||
<i class="icon-trash icon-white"></i>
|
||||
</button>
|
||||
</td>
|
||||
<td><input type="radio" id="[% "$baseName-primary" %]" name="primary" [% IF job.isprimary %]
|
||||
@@ -21,19 +21,24 @@
|
||||
[% END %]
|
||||
|
||||
|
||||
<form action="[% IF create %][% c.uri_for('/project' project.name 'create-view/submit') %][% ELSE %][% c.uri_for('/view' project.name view.name 'submit') %][% END %]" method="post">
|
||||
|
||||
<table class="layoutTable">
|
||||
<tr>
|
||||
<th>Identifier:</th>
|
||||
<td><input type="text" class="string" name="name" [% HTML.attributes(value => view.name) %] /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Description:</th>
|
||||
<td><input type="text" class="string" name="description" [% HTML.attributes(value => view.description) %] /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<form class="form-horizontal" action="[% IF create %][% c.uri_for('/project' project.name 'create-view/submit') %][% ELSE %][% c.uri_for('/view' project.name view.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 => view.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 => view.description) %]></input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="tablesorter table table-condensed table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -51,12 +56,28 @@
|
||||
[% n = n + 1 %]
|
||||
[% END %]
|
||||
<tr>
|
||||
<td colspan="5"><button type="button" class="add-job">Add a new job</button></td>
|
||||
<td colspan="5" style="text-align: center;"><button type="button" class="add-job btn btn-success"><i class="icon-plus icon-white"></i> Add a job</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><button type="submit"><img src="/static/images/success.gif" />[%IF create %]Create[% ELSE %]Apply changes[% END %]</button></p>
|
||||
<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-view" type="submit" class="btn btn-danger" name="submit" value="delete">
|
||||
<i class="icon-trash icon-white"></i>
|
||||
Delete this view
|
||||
</button>
|
||||
<script type="text/javascript">
|
||||
$("#delete-view").click(function() {
|
||||
return confirm("Are you sure you want to delete this view?");
|
||||
});
|
||||
</script>
|
||||
[% END %]
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -83,20 +104,5 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
[% IF !create %]
|
||||
|
||||
<form action="[% c.uri_for('/view' project.name view.name 'delete') %]" method="post">
|
||||
<p><button id="delete-project" type="submit"><img src="/static/images/failure.gif" />Delete this view</button></p>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#delete-project").click(function() {
|
||||
return confirm("Are you sure you want to delete this view?");
|
||||
});
|
||||
</script>
|
||||
|
||||
[% END %]
|
||||
|
||||
|
||||
[% END %]
|
||||
|
||||
Reference in New Issue
Block a user