Rebranded to Tailbone.

This commit is contained in:
Lance Edgar 2013-09-01 07:27:47 -07:00
parent 47944767dc
commit 40efd8a3bc
111 changed files with 188 additions and 209 deletions

View file

@ -0,0 +1,11 @@
<%inherit file="/crud.mako" />
<%def name="context_menu_items()">
<li>${h.link_to("Back to Batches", url('batches'))}</li>
<li>${h.link_to("View Batch Rows", url('batch.rows', uuid=form.fieldset.model.uuid))}</li>
% if not form.readonly:
<li>${h.link_to("View this Batch", url('batch.read', uuid=form.fieldset.model.uuid))}</li>
% endif
</%def>
${parent.body()}

View file

@ -0,0 +1,5 @@
<%inherit file="/grid.mako" />
<%def name="title()">Batches</%def>
${parent.body()}

View file

@ -0,0 +1,42 @@
<%inherit file="/base.mako" />
<%def name="title()">Batch Parameters</%def>
<%def name="head_tags()">
${parent.head_tags()}
<script language="javascript" type="text/javascript">
$(function() {
$('#create-batch').click(function() {
disable_button(this, "Creating batch");
disable_button('#cancel');
$('form').submit();
});
});
</script>
</%def>
<%def name="batch_params()"></%def>
<p>Please provide the following values for your new batch:</p>
<br />
<div class="form">
${h.form(request.get_referrer())}
${h.hidden('provider', value=provider)}
${h.hidden('params', value='True')}
${self.batch_params()}
<div class="buttons">
<button type="button" id="create-batch">Create Batch</button>
<button type="button" id="cancel" onclick="location.href = '${request.get_referrer()}';">Cancel</button>
</div>
${h.end_form()}
</div>

View file

@ -0,0 +1,19 @@
<%inherit file="/batches/params.mako" />
<%def name="batch_params()">
<div class="field-wrapper">
<label for="profile">Label Type</label>
<div class="field">
${h.select('profile', None, label_profiles)}
</div>
</div>
<div class="field-wrapper">
<label for="quantity">Quantity</label>
<div class="field">${h.text('quantity', value=1)}</div>
</div>
</%def>
${parent.body()}

View file

@ -0,0 +1,40 @@
<%inherit file="/batches/crud.mako" />
<%def name="context_menu_items()">
${parent.context_menu_items()}
<li>${h.link_to("Edit this Batch", url('batch.update', uuid=form.fieldset.model.uuid))}</li>
<li>${h.link_to("Delete this Batch", url('batch.delete', uuid=form.fieldset.model.uuid))}</li>
</%def>
${parent.body()}
<% batch = form.fieldset.model %>
<h2>Columns</h2>
<div class="grid full hoverable">
<table>
<thead>
<tr>
<th>Name</th>
<th>SIL Name</th>
<th>Display Name</th>
<th>Description</th>
<th>Data Type</th>
<th>Visible</th>
</tr>
</thead>
<tbody>
% for i, column in enumerate(batch.columns, 1):
<tr class="${'odd' if i % 2 else 'even'}">
<td>${column.name}</td>
<td>${column.sil_name}</td>
<td>${column.display_name}</td>
<td>${column.description}</td>
<td>${column.data_type}</td>
<td>${column.visible}</td>
</tr>
% endfor
</tbody>
</table>
</div>

View file

@ -0,0 +1,8 @@
<%inherit file="/crud.mako" />
<%def name="context_menu_items()">
<li>${h.link_to("Back to Batch", url('batch.read', uuid=form.fieldset.model.batch.uuid))}</li>
<li>${h.link_to("Back to Batch Rows", url('batch.rows', uuid=form.fieldset.model.batch.uuid))}</li>
</%def>
${parent.body()}

View file

@ -0,0 +1,46 @@
<%inherit file="/grid.mako" />
<%def name="title()">Batch Rows : ${batch.description}</%def>
<%def name="head_tags()">
${parent.head_tags()}
<script language="javascript" type="text/javascript">
$(function() {
$('#delete-results').click(function() {
var msg = "This will delete all rows matching the current search.\n\n"
+ "PLEASE NOTE that this may include some rows which are not visible "
+ "on your screen.\n(I.e., if there is more than one \"page\" of results.)\n\n"
+ "Are you sure you wish to delete these rows?";
if (confirm(msg)) {
disable_button(this, "Deleting rows");
location.href = '${url('batch.rows.delete', uuid=batch.uuid)}';
}
});
$('#execute-batch').click(function() {
if (confirm("Are you sure you wish to execute this batch?")) {
disable_button(this, "Executing batch");
location.href = '${url('batch.execute', uuid=batch.uuid)}';
}
});
});
</script>
</%def>
<%def name="context_menu_items()">
<li>${h.link_to("Back to Batches", url('batches'))}</li>
<li>${h.link_to("Back to Batch", url('batch.read', uuid=batch.uuid))}</li>
</%def>
<%def name="tools()">
<div class="buttons">
<button type="button" id="delete-results">Delete Results</button>
<button type="button" id="execute-batch">Execute Batch</button>
</div>
</%def>
${parent.body()}