diff --git a/tailbone/templates/mobile/master/index.mako b/tailbone/templates/mobile/master/index.mako
index 25af12de..b4431b69 100644
--- a/tailbone/templates/mobile/master/index.mako
+++ b/tailbone/templates/mobile/master/index.mako
@@ -7,6 +7,10 @@
## ##############################################################################
<%inherit file="/mobile/base.mako" />
-<%def name="title()">${model_title_plural}%def>
+<%def name="title()">${index_title}%def>
+
+% if master.mobile_creatable and request.has_perm('{}.create'.format(permission_prefix)):
+ ${h.link_to("New {}".format(model_title), url('mobile.{}.create'.format(route_prefix)), class_='ui-btn ui-corner-all')}
+% endif
${grid.render_complete()|n}
diff --git a/tailbone/templates/mobile/receiving/index.mako b/tailbone/templates/mobile/receiving/index.mako
deleted file mode 100644
index 10941783..00000000
--- a/tailbone/templates/mobile/receiving/index.mako
+++ /dev/null
@@ -1,10 +0,0 @@
-## -*- coding: utf-8; -*-
-<%inherit file="/mobile/master/index.mako" />
-
-<%def name="title()">Receiving%def>
-
-% if request.has_perm('receiving.create'):
- ${h.link_to("New Receiving Batch", url('mobile.receiving.create'), class_='ui-btn ui-corner-all')}
-% endif
-
-${parent.body()}
diff --git a/tailbone/templates/ordering/order_form.mako b/tailbone/templates/ordering/order_form.mako
index b682c7f1..bca0ff6f 100644
--- a/tailbone/templates/ordering/order_form.mako
+++ b/tailbone/templates/ordering/order_form.mako
@@ -1,7 +1,7 @@
## -*- coding: utf-8; -*-
<%inherit file="/base.mako" />
-<%def name="title()">Purchase Order Form%def>
+<%def name="title()">Ordering Worksheet%def>
<%def name="extra_javascript()">
${parent.extra_javascript()}
@@ -237,8 +237,8 @@ ${h.end_form()}
- % for cost in subdepartment._order_costs:
-
+ % for i, cost in enumerate(subdepartment._order_costs, 1):
+
${self.order_form_row(cost)}
% for data in history:
@@ -270,7 +270,7 @@ ${h.end_form()}
|
${h.text('units_ordered_{}'.format(cost.uuid), value=int(cost._batchrow.units_ordered or 0) if cost._batchrow else None)}
|
- ${'${:0,.2f}'.format(cost._batchrow.po_total) if cost._batchrow else ''} |
+ ${'${:0,.2f}'.format(cost._batchrow.po_total or 0) if cost._batchrow else ''} |
${self.extra_td(cost)}
% endfor
diff --git a/tailbone/templates/ordering/view.mako b/tailbone/templates/ordering/view.mako
index 04c7526d..4d12e643 100644
--- a/tailbone/templates/ordering/view.mako
+++ b/tailbone/templates/ordering/view.mako
@@ -36,7 +36,7 @@
<%def name="leading_buttons()">
% if not batch.complete and not batch.executed and request.has_perm('ordering.order_form'):
-
+
% endif
%def>
diff --git a/tailbone/templates/purchases/index.mako b/tailbone/templates/purchases/index.mako
deleted file mode 100644
index 38a665ee..00000000
--- a/tailbone/templates/purchases/index.mako
+++ /dev/null
@@ -1,11 +0,0 @@
-## -*- coding: utf-8; -*-
-<%inherit file="/master/index.mako" />
-
-<%def name="context_menu_items()">
- ${parent.context_menu_items()}
- % if request.has_perm('purchases.batch.list'):
- ${h.link_to("Go to Purchasing Batches", url('purchases.batch'))}
- % endif
-%def>
-
-${parent.body()}
diff --git a/tailbone/views/purchasing/ordering.py b/tailbone/views/purchasing/ordering.py
index 91271912..7f16c9b6 100644
--- a/tailbone/views/purchasing/ordering.py
+++ b/tailbone/views/purchasing/ordering.py
@@ -50,6 +50,7 @@ class OrderingBatchView(PurchasingBatchView):
url_prefix = '/ordering'
model_title = "Ordering Batch"
model_title_plural = "Ordering Batches"
+ index_title = "Ordering"
row_grid_columns = [
'sequence',
@@ -144,8 +145,7 @@ class OrderingBatchView(PurchasingBatchView):
'batch': batch,
'instance': batch,
'instance_title': title,
- 'index_title': "{}: {}".format(self.get_model_title(), title),
- 'index_url': self.get_action_url('view', batch),
+ 'instance_url': self.get_action_url('view', batch),
'vendor': batch.vendor,
'departments': departments,
'history': history,
diff --git a/tailbone/views/purchasing/receiving.py b/tailbone/views/purchasing/receiving.py
index 1d7e2336..4a14bc45 100644
--- a/tailbone/views/purchasing/receiving.py
+++ b/tailbone/views/purchasing/receiving.py
@@ -88,6 +88,7 @@ class ReceivingBatchView(PurchasingBatchView):
url_prefix = '/receiving'
model_title = "Receiving Batch"
model_title_plural = "Receiving Batches"
+ index_title = "Receiving"
creatable = False
rows_deletable = False
mobile_creatable = True