From c80bafec506beef3184381ae7f9b55edd438e45a Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Fri, 10 Nov 2017 11:05:05 -0500 Subject: Fix typo in 'payment_identifier' Add pagination to Drivers, Customers and Invoices. Filter invoices by paid/unpaid. --- .../templates/dispatch/companies/list.html | 64 +++++++------- app/dispatch/templates/dispatch/drivers/list.html | 56 +++++++------ .../templates/dispatch/invoice/detail-table.html | 2 + .../templates/dispatch/invoice/detail.html | 2 +- app/dispatch/templates/dispatch/invoice/list.html | 97 +++++++++++++--------- app/dispatch/templates/dispatch/paginator.html | 82 ++++++++++++++++++ 6 files changed, 213 insertions(+), 90 deletions(-) create mode 100644 app/dispatch/templates/dispatch/paginator.html (limited to 'app/dispatch/templates') diff --git a/app/dispatch/templates/dispatch/companies/list.html b/app/dispatch/templates/dispatch/companies/list.html index e08837b..97e54f7 100644 --- a/app/dispatch/templates/dispatch/companies/list.html +++ b/app/dispatch/templates/dispatch/companies/list.html @@ -11,32 +11,40 @@ Add Customer - - - - - - - - - - - {% for customer in object_list %} - - - - - - - - {% empty %} - - {% endfor %} - -
NameAddressPhoneEmail
{{ customer.name }}{{ customer.address }}{{ customer.phone_number }}{{ customer.email_address }} - {% if user.is_superuser %} - Edit - {% endif %} - View -
No customers yet.
+ +
+
+ + + + + + + + + + + {% for customer in object_list %} + + + + + + + + {% empty %} + + {% endfor %} + +
NameAddressPhoneEmail
{{ customer.name }}{{ customer.address }}{{ customer.phone_number }}{{ customer.email_address }} + {% if user.is_superuser %} + Edit + {% endif %} + View +
No customers yet.
+
+
+ +{% include "dispatch/paginator.html" %} + {% endblock %} diff --git a/app/dispatch/templates/dispatch/drivers/list.html b/app/dispatch/templates/dispatch/drivers/list.html index 8b7508b..c87f99f 100644 --- a/app/dispatch/templates/dispatch/drivers/list.html +++ b/app/dispatch/templates/dispatch/drivers/list.html @@ -8,28 +8,36 @@

Drivers

- - - - - - - - - - {% for driver in object_list %} - - - - - - - {% empty %} - - {% endfor %} - -
First NameLast NameEmail
{{ driver.first_name }}{{ driver.last_name }}{{ driver.email }} - Edit - View -
No drivers yet.
+ +
+
+ + + + + + + + + + {% for driver in object_list %} + + + + + + + {% empty %} + + {% endfor %} + +
First NameLast NameEmail
{{ driver.first_name }}{{ driver.last_name }}{{ driver.email }} + Edit + View +
No drivers yet.
+
+
+ +{% include "dispatch/paginator.html" %} + {% endblock %} diff --git a/app/dispatch/templates/dispatch/invoice/detail-table.html b/app/dispatch/templates/dispatch/invoice/detail-table.html index 508ab31..d09ba76 100644 --- a/app/dispatch/templates/dispatch/invoice/detail-table.html +++ b/app/dispatch/templates/dispatch/invoice/detail-table.html @@ -4,9 +4,11 @@ Invoice #{{object.invoice_id}} + {% if object.paid %}

PAID

+ {% endif %}
diff --git a/app/dispatch/templates/dispatch/invoice/detail.html b/app/dispatch/templates/dispatch/invoice/detail.html index 850c427..c66e545 100644 --- a/app/dispatch/templates/dispatch/invoice/detail.html +++ b/app/dispatch/templates/dispatch/invoice/detail.html @@ -5,7 +5,7 @@ {% block content %}
-

Invoice for {{object.invoice_date}} by {{object.owner}}

+

Invoice for {{object.invoice_date}} by {{object.owner}}

diff --git a/app/dispatch/templates/dispatch/invoice/list.html b/app/dispatch/templates/dispatch/invoice/list.html index d98fb5a..d30c8d8 100644 --- a/app/dispatch/templates/dispatch/invoice/list.html +++ b/app/dispatch/templates/dispatch/invoice/list.html @@ -8,44 +8,67 @@

Invoices

- - + +
+
+
+ {% if request.GET.paid == '1' %} + Show Unpaid Invoices + {% else %} + Show Paid Invoices + {% endif %} +
+
+
+ +
+
+
+ + + + + + + + + + + + + + + {% for invoice in object_list %} - - - - - - - - + + + + + + + + + - - - {% for invoice in object_list %} - - - - - - - - - - - {% empty %} - - - - - - - - - - - {% endfor %} + {% empty %} + + + + + + + + + + + {% endfor %} + + +
OwnerBill ToInvoice IDInvoice DateDue DateAmountPaid
UserOwnerBill ToInvoice IDInvoice DateDue DateAmount{{invoice.owner}}{{invoice.bill_to}}{{invoice.invoice_id}}{{invoice.invoice_date}}{{invoice.due_date}}{{invoice.total}}{{invoice.paid}}View
{{invoice.user}}{{invoice.owner}}{{invoice.bill_to}}{{invoice.invoice_id}}{{invoice.invoice_date}}{{invoice.due_date}}{{invoice.total}}View
No Invoices Found
No Invoices Found
+
+
+ +{% include "dispatch/paginator.html" %} + - - {% endblock %} diff --git a/app/dispatch/templates/dispatch/paginator.html b/app/dispatch/templates/dispatch/paginator.html new file mode 100644 index 0000000..82f5d3c --- /dev/null +++ b/app/dispatch/templates/dispatch/paginator.html @@ -0,0 +1,82 @@ +{% load custom_tags %} +{% echo "blue" as paginate_classes %} +{% if is_paginated %} +
+
+ +
+
+{% endif %} + + + -- cgit v1.2.3