Migrate billing templates to new button handling.

agranig/1_0_subfix
Andreas Granig 13 years ago
parent 1731006570
commit 0d63c971af

@ -1,8 +1,5 @@
[% META title = 'Billing Fees' -%]
<a href="[% c.uri_for_action('/billing/zones',[c.req.captures.0]) %]" class="btn btn-tertiary btn-large">Edit Zones</a>
<a href="[% c.uri_for_action('/billing/fees_upload',[c.req.captures.0]) %]" class="btn btn-tertiary btn-large">Upload CSV Fees</a>
[%
helper.name = 'Billing Fees';
helper.messages = messages;
@ -15,7 +12,17 @@
helper.form_object = form;
helper.has_edit = has_edit;
helper.ajax_uri = c.uri_for_action('/billing/fees_ajax', [c.req.captures.0]);
helper.base_uri = c.uri_for( profile.id, 'fees');
helper.tmpuri = c.uri_for( profile.id, 'fees');
helper.dt_buttons = [
{ name = 'Edit', uri = helper.tmpuri _ "/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Delete', uri = helper.tmpuri _ "/'+full[0]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
];
helper.top_buttons = [
{ name = 'Create Fee Entry', uri = c.uri_for( profile.id, 'fees') _ "/create", icon = 'icon-star' },
{ name = 'Upload Fees as CSV', uri = c.uri_for_action('/billing/fees_upload',[c.req.captures.0]), icon = 'icon-star' },
{ name = 'Edit Zones', uri = c.uri_for_action('/billing/zones',[c.req.captures.0]), icon = 'icon-star' },
];
PROCESS 'helpers/datatables.tt';
-%]

@ -9,14 +9,15 @@
helper.create_flag = create_flag;
helper.edit_flag = edit_flag;
helper.form_object = form;
helper.has_edit = has_edit;
helper.has_delete = has_delete;
helper.ajax_uri = c.uri_for( c.controller.action_for('ajax') );
helper.base_uri = c.uri_for( c.controller.action_for("") );
helper.extra_buttons = [
[ 'Edit Fees', 'fees'],
[ 'Edit Peak Times', 'peaktimes'],
helper.dt_buttons = [
{ name = 'Edit', uri = "/billing/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Fees', uri = "/billing/'+full[0]+'/fees", class = 'btn-small btn-tertiary', icon = 'icon-shopping-cart' },
{ name = 'Peaktimes', uri = "/billing/'+full[0]+'/peaktimes", class = 'btn-small btn-tertiary', icon = 'icon-time' },
];
helper.top_buttons = [
{ name = 'Create Billing Profile', uri = c.uri_for('/billing/create'), icon = 'icon-star' },
];
PROCESS 'helpers/datatables.tt';

@ -1,6 +1,10 @@
[% site_config.title = 'Off-peak-times for ' _ profile.name -%]
<a href="[% c.uri_for() %]">&lt; Back</a>
<div class="row">
<span>
<a class="btn btn-primary btn-large" href="[% c.uri_for() %]"><i class="icon-arrow-left"></i> Back</a>
</span>
</div>
[% IF messages -%]
<div class="row">

@ -11,7 +11,15 @@
helper.form_object = form;
helper.has_edit = has_edit;
helper.ajax_uri = c.uri_for_action( '/billing/zones_ajax',[c.req.captures.0] );
helper.base_uri = c.uri_for( profile.id, 'zones');
helper.tmpuri = c.uri_for( profile.id, 'zones');
helper.dt_buttons = [
{ name = 'Edit', uri = helper.tmpuri _ "/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
{ name = 'Delete', uri = helper.tmpuri _ "/'+full[0]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
];
helper.top_buttons = [
{ name = 'Back', uri = c.uri_for(profile.id, 'fees'), icon = 'icon-arrow-left' },
];
PROCESS 'helpers/datatables.tt';
-%]

Loading…
Cancel
Save