From 83302c44399ccf45d1d5431c6ef68520b07ccdc1 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Sun, 29 May 2016 21:30:05 +0100 Subject: [PATCH] Invoice UI improvements. Renamed pages, added description, and added total number of events --- RIGS/finance.py | 3 ++- RIGS/templates/RIGS/event_invoice.html | 3 ++- RIGS/templates/RIGS/invoice_list.html | 3 ++- RIGS/templates/RIGS/invoice_list_active.html | 13 +++++++++++++ RIGS/templates/RIGS/invoice_list_archive.html | 13 +++++++++++++ templates/base.html | 2 +- 6 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 RIGS/templates/RIGS/invoice_list_active.html create mode 100644 RIGS/templates/RIGS/invoice_list_archive.html diff --git a/RIGS/finance.py b/RIGS/finance.py index 69eaa513..d604cd57 100644 --- a/RIGS/finance.py +++ b/RIGS/finance.py @@ -17,7 +17,7 @@ from RIGS import models class InvoiceIndex(generic.ListView): model = models.Invoice - template_name = 'RIGS/invoice_list.html' + template_name = 'RIGS/invoice_list_active.html' def get_context_data(self, **kwargs): context = super(InvoiceIndex, self).get_context_data(**kwargs) @@ -95,6 +95,7 @@ class InvoiceVoid(generic.View): class InvoiceArchive(generic.ListView): model = models.Invoice + template_name = 'RIGS/invoice_list_archive.html' paginate_by = 25 diff --git a/RIGS/templates/RIGS/event_invoice.html b/RIGS/templates/RIGS/event_invoice.html index 29c56f42..3324911a 100644 --- a/RIGS/templates/RIGS/event_invoice.html +++ b/RIGS/templates/RIGS/event_invoice.html @@ -5,7 +5,8 @@ {% block content %}
-

Events for Invoice (£ {{ total|floatformat:2 }})

+

Events for Invoice ({{object_list|length}} Events, £ {{ total|floatformat:2 }})

+

These events have happened, but paperwork has not yet been sent to treasury

{% if is_paginated %}
{% paginator %} diff --git a/RIGS/templates/RIGS/invoice_list.html b/RIGS/templates/RIGS/invoice_list.html index 32abdcec..26ddeb12 100644 --- a/RIGS/templates/RIGS/invoice_list.html +++ b/RIGS/templates/RIGS/invoice_list.html @@ -5,7 +5,8 @@ {% block content %}
-

Invoices {% if total %}(£ {{ total|floatformat:2 }}){% endif %}

+

{% block heading %}Invoices{% endblock %}

+ {% block description %}{% endblock %} {% if is_paginated %}
{% paginator %} diff --git a/RIGS/templates/RIGS/invoice_list_active.html b/RIGS/templates/RIGS/invoice_list_active.html new file mode 100644 index 00000000..24cea673 --- /dev/null +++ b/RIGS/templates/RIGS/invoice_list_active.html @@ -0,0 +1,13 @@ +{% extends 'RIGS/invoice_list.html' %} + +{% block title %} +Outstanding Invoices +{% endblock %} + +{% block heading %} +Outstanding Invoices ({{object_list|length}} Events, £ {{ total|floatformat:2 }}) +{% endblock %} + +{% block description %} +

Paperwork for these events has been sent to treasury, but the full balance has not yet appeared on a ledger

+{% endblock %} \ No newline at end of file diff --git a/RIGS/templates/RIGS/invoice_list_archive.html b/RIGS/templates/RIGS/invoice_list_archive.html new file mode 100644 index 00000000..77bab204 --- /dev/null +++ b/RIGS/templates/RIGS/invoice_list_archive.html @@ -0,0 +1,13 @@ +{% extends 'RIGS/invoice_list.html' %} + +{% block title %} +Invoice Archive +{% endblock %} + +{% block heading %} +All Invoices +{% endblock %} + +{% block description %} +

This page displays all invoices: outstanding, paid, and void

+{% endblock %} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 3cde5acd..299be06e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -74,7 +74,7 @@