Remove all views etc. for old-style batches
This commit is contained in:
parent
9e5b43ca66
commit
2d29174772
16 changed files with 45 additions and 906 deletions
|
@ -55,14 +55,6 @@
|
|||
<li>${h.link_to("Vendors", url('vendors'))}</li>
|
||||
</ul>
|
||||
</li>
|
||||
% if request.has_perm('batches.list'):
|
||||
<li>
|
||||
<a>Batches</a>
|
||||
<ul>
|
||||
<li>${h.link_to("Batches", url('batches'))}</li>
|
||||
</ul>
|
||||
</li>
|
||||
% endif
|
||||
<li>
|
||||
<a>Stores</a>
|
||||
<ul>
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%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()}
|
|
@ -1,6 +0,0 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%inherit file="/grid.mako" />
|
||||
|
||||
<%def name="title()">Batches</%def>
|
||||
|
||||
${parent.body()}
|
|
@ -1,44 +0,0 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%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.csrf_token(request)}
|
||||
${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>
|
|
@ -1,20 +0,0 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%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()}
|
|
@ -1,41 +0,0 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%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>
|
|
@ -1,9 +0,0 @@
|
|||
## -*- coding: utf-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()}
|
|
@ -1,47 +0,0 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%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()}
|
|
@ -9,38 +9,34 @@
|
|||
|
||||
<%def name="extra_javascript()">
|
||||
${parent.extra_javascript()}
|
||||
% if legacy_mode is Undefined:
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
$('#batch_type').selectmenu({
|
||||
change: function(event, ui) {
|
||||
$('.params-wrapper').hide();
|
||||
$('.params-wrapper.' + ui.item.value).show();
|
||||
}
|
||||
});
|
||||
|
||||
$('.params-wrapper.' + $('#batch_type').val()).show();
|
||||
|
||||
$('#make-batch').click(function() {
|
||||
$(this).button('disable').button('option', 'label', "Working, please wait...");
|
||||
$(this).parents('form:first').submit();
|
||||
});
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
$('#batch_type').selectmenu({
|
||||
change: function(event, ui) {
|
||||
$('.params-wrapper').hide();
|
||||
$('.params-wrapper.' + ui.item.value).show();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
% endif
|
||||
|
||||
$('.params-wrapper.' + $('#batch_type').val()).show();
|
||||
|
||||
$('#make-batch').click(function() {
|
||||
$(this).button('disable').button('option', 'label', "Working, please wait...");
|
||||
$(this).parents('form:first').submit();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
|
||||
<%def name="extra_styles()">
|
||||
${parent.extra_styles()}
|
||||
% if legacy_mode is Undefined:
|
||||
<style type="text/css">
|
||||
.params-wrapper {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
% endif
|
||||
<style type="text/css">
|
||||
.params-wrapper {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</%def>
|
||||
|
||||
<ul id="context-menu">
|
||||
|
@ -51,38 +47,20 @@
|
|||
${h.form(request.current_route_url())}
|
||||
${h.csrf_token(request)}
|
||||
|
||||
% if legacy_mode is not Undefined:
|
||||
${self.wtfield(form, 'batch_type')}
|
||||
|
||||
<div class="field-wrapper">
|
||||
<label for="provider">Batch Type</label>
|
||||
<div class="field">
|
||||
${h.select('provider', None, providers)}
|
||||
</div>
|
||||
% for key, pform in params_forms.items():
|
||||
<div class="params-wrapper ${key}">
|
||||
% for name in pform._fields:
|
||||
${self.wtfield(pform, name)}
|
||||
% endfor
|
||||
</div>
|
||||
% endfor
|
||||
|
||||
<div class="buttons">
|
||||
${h.submit('create', "Create Batch")}
|
||||
${h.link_to("Cancel", url('products'), class_='button')}
|
||||
</div>
|
||||
|
||||
% else: ## new-style batches
|
||||
|
||||
${self.wtfield(form, 'batch_type')}
|
||||
|
||||
% for key, pform in params_forms.items():
|
||||
<div class="params-wrapper ${key}">
|
||||
% for name in pform._fields:
|
||||
${self.wtfield(pform, name)}
|
||||
% endfor
|
||||
</div>
|
||||
% endfor
|
||||
|
||||
<div class="buttons">
|
||||
<button type="button" id="make-batch">Create Batch</button>
|
||||
${h.link_to("Cancel", url('products'), class_='button')}
|
||||
</div>
|
||||
|
||||
% endif
|
||||
<div class="buttons">
|
||||
<button type="button" id="make-batch">Create Batch</button>
|
||||
${h.link_to("Cancel", url('products'), class_='button')}
|
||||
</div>
|
||||
|
||||
${h.end_form()}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue