more batch improvements (save point)

This commit is contained in:
Lance Edgar 2012-04-16 00:51:12 -05:00
parent 523d7de3e7
commit 675c4deb63
12 changed files with 327 additions and 162 deletions

View file

@ -5,8 +5,9 @@
<%def name="menu()">
<p>${h.link_to("Back to Batches", url('batch.list'))}</p>
% if fieldset.edit and fieldset.model.rowcount:
% if fieldset.edit:
<p>${h.link_to("View Batch Details", url('batch.details', uuid=fieldset.model.uuid))}</p>
<p>${h.link_to("Execute this Batch", url('batch.execute', uuid=fieldset.model.uuid))}</p>
% endif
</%def>

View file

@ -4,7 +4,7 @@
<%def name="title()">Batch Dictionaries</%def>
<%def name="menu()">
<p>${h.link_to("Back to Batches", url('batches'))}</p>
<p>${h.link_to("Back to Batches", url('batch.list'))}</p>
## <p>${h.link_to("Create a New Dictionary", url('batch_dictionary'))}</p>
</%def>

View file

@ -2,10 +2,8 @@
<%inherit file="/crud.mako" />
<%def name="menu()">
<p>${h.link_to("Back to Batches", url('batches'))}</p>
<p>${h.link_to("Back to Batches", url('batch.list'))}</p>
<p>${h.link_to("Back to Dictionaries", url('batch_dictionaries'))}</p>
</%def>
${parent.body()}
${columns|n}

View file

@ -3,9 +3,34 @@
<%def name="title()">Batches</%def>
<%def name="head_tags()">
<style type="text/css">
div.grid table tbody td.rowcount {
text-align: right;
}
</style>
<script language="javascript" type="text/javascript">
$(function() {
$('div.grid table tbody td.action.execute a').live('click', function() {
var tr = $(this).parents('tr:first');
var desc = tr.find('td.description').text();
if (confirm("Do you really wish to execute this batch?\n\n" + desc)) {
var url = '${url('batch.execute', uuid='{uuid}')}';
location.href = url.replace(/%7Buuid%7D/, get_uuid(this));
}
return false;
});
});
</script>
</%def>
<%def name="menu()">
## <p>${h.link_to("Create a New Batch", url('batch.new'))}</p>
<p>${h.link_to("Manage Terminals", url('batch_terminal.list'))}</p>
<p>${h.link_to("Manage Terminals", url('batch_terminals'))}</p>
<p>${h.link_to("View Dictionaries", url('batch_dictionaries'))}</p>
<p>${h.link_to("SIL Columns", url('sil_columns'))}</p>
</%def>

View file

@ -2,7 +2,7 @@
<%inherit file="/crud.mako" />
<%def name="menu()">
<p>${h.link_to("Back to Batches", url('batches'))}</p>
<p>${h.link_to("Back to Batches", url('batch.list'))}</p>
<p>${h.link_to("Back to SIL Columns", url('sil_columns'))}</p>
</%def>

View file

@ -4,7 +4,7 @@
<%def name="title()">SIL Columns</%def>
<%def name="menu()">
<p>${h.link_to("Back to Batches", url('batches'))}</p>
<p>${h.link_to("Back to Batches", url('batch.list'))}</p>
</%def>
${parent.body()}

View file

@ -3,7 +3,7 @@
<%def name="menu()">
<p>${h.link_to("Back to Batches", url('batch.list'))}</p>
<p>${h.link_to("Back to Batch Terminals", url('batch_terminal.list'))}</p>
<p>${h.link_to("Back to Batch Terminals", url('batch_terminals'))}</p>
</%def>
${parent.body()}