From 796c8cca18d94d5601c6eaf121bc7d7674bb9947 2016-09-14 05:08:19
From: Christopher Neugebauer
Date: 2016-09-14 05:08:19
Subject: [PATCH] Merge branch 'chrisjrn/20160913_bugs'
---
diff --git a/pinaxcon/registrasion/admin.py b/pinaxcon/registrasion/admin.py
new file mode 100644
index 0000000000000000000000000000000000000000..831b3e78664801abbec3b75b5b236657ba1df0e9
--- /dev/null
+++ b/pinaxcon/registrasion/admin.py
@@ -0,0 +1,9 @@
+import models
+
+from django.contrib import admin
+from django.utils.translation import ugettext_lazy as _
+
+@admin.register(models.AttendeeProfile)
+class UserProfileAdmin(admin.ModelAdmin):
+ model = models.AttendeeProfile
+ list_display = ("name", "company", "name_per_invoice")
diff --git a/pinaxcon/templates/dashboard.html b/pinaxcon/templates/dashboard.html
index b9c0408c41278909de6b26290be09371c4196d85..f2b8062ef473d69e2bd3f4259bf057d733c35d3c 100644
--- a/pinaxcon/templates/dashboard.html
+++ b/pinaxcon/templates/dashboard.html
@@ -109,7 +109,7 @@
{% items_pending as pending %}
{% if pending %}
- Pay your registration
+ Check out and pay
{% endif %}
{% endif %}
@@ -129,18 +129,19 @@
{% items_pending as pending %}
{% if pending %}
Items pending payment
- {% include "registrasion/items_list.html" with items=pending %}
+ {% include "registrasion/_items_list.html" with items=pending %}
+
+
+ Check out and pay for these items.
{% endif %}
{% items_purchased as purchased %}
{% if purchased %}
Paid items
- {% include "registrasion/items_list.html" with items=purchased %}
+ {% include "registrasion/_items_list.html" with items=purchased %}
{% endif %}
Add/Update items
{% available_categories as categories %}
- {% for category in categories %}
- {{ category.name }}
- {% endfor %}
+ {% include "registrasion/_category_list.html" with categories=categories %}
{% invoices as invoices %}
diff --git a/pinaxcon/templates/registrasion/_category_list.html b/pinaxcon/templates/registrasion/_category_list.html
new file mode 100644
index 0000000000000000000000000000000000000000..16d94263c492cd54f5b5d48f3c866bc074aad9e5
--- /dev/null
+++ b/pinaxcon/templates/registrasion/_category_list.html
@@ -0,0 +1,7 @@
+
+ {% for category in categories %}
+ {% if not category in exclude %}
+ - {{ category.name }}
+ {% endif %}
+ {% endfor %}
+
diff --git a/pinaxcon/templates/registrasion/_invoice_details.html b/pinaxcon/templates/registrasion/_invoice_details.html
index b20e45a16bbfd416328957f23867d306a230e8bb..7db97462b3e079c472b17a91b178266502cc3410 100644
--- a/pinaxcon/templates/registrasion/_invoice_details.html
+++ b/pinaxcon/templates/registrasion/_invoice_details.html
@@ -10,7 +10,7 @@
{% if not invoice.is_void %}
Due: {{ invoice.due_time|date:"DATETIME_FORMAT"}}
{% endif %}
- Recipient: {{ invoice_user.attendee.attendeeprofilebase.invoice_recipient|linebreaksbr}}
+ Recipient: {{ invoice.recipient|linebreaksbr}}
{% endwith %}
diff --git a/pinaxcon/templates/registrasion/items_list.html b/pinaxcon/templates/registrasion/_items_list.html
similarity index 53%
rename from pinaxcon/templates/registrasion/items_list.html
rename to pinaxcon/templates/registrasion/_items_list.html
index 1a214243f4ece54e91896098dcf490867de73fa9..9926bc44d6c7d067cc0afbee91dc0fef5356d047 100644
--- a/pinaxcon/templates/registrasion/items_list.html
+++ b/pinaxcon/templates/registrasion/_items_list.html
@@ -1,7 +1,7 @@
{% if items %}
{% for item in items %}
- - {{ item.quantity }} × {{ item.product }}
+ - {{ item.quantity }} × {{ item.product }} {{ suffix }}
{% endfor %}
{% endif %}
diff --git a/pinaxcon/templates/registrasion/amend_registration.html b/pinaxcon/templates/registrasion/amend_registration.html
index faa66c88fbeb919ad22b82fff5bac101267158c2..c5bc2cc99703b93d2be9f7c07cc24136215b9d3e 100644
--- a/pinaxcon/templates/registrasion/amend_registration.html
+++ b/pinaxcon/templates/registrasion/amend_registration.html
@@ -13,11 +13,11 @@
cancel the invoice that added those items. You will need to re-add the items
from that invoice for the user to have them available again.
-{% include "registrasion/items_list.html" with items=paid %}
+{% include "registrasion/_items_list.html" with items=paid %}
Cancelled Items
-{% include "registrasion/items_list.html" with items=cancelled %}
+{% include "registrasion/_items_list.html" with items=cancelled %}
Amend pending items
diff --git a/pinaxcon/templates/registrasion/credit_note.html b/pinaxcon/templates/registrasion/credit_note.html
index 5b9061547f15424ca0ac71f6526d3dd3d1d49660..c0d105d556ae2987bc2f269cb5237a9dd0718fb9 100644
--- a/pinaxcon/templates/registrasion/credit_note.html
+++ b/pinaxcon/templates/registrasion/credit_note.html
@@ -8,7 +8,7 @@
{% with note_user=credit_note.invoice.user %}
- Number: {{ credit_note.id }}
-
- Attention: {{ credit_note.invoice.user.attendee.attendeeprofilebase.invoice_recipient }}
+ - Attention: {{ credit_note.invoice.recipient }}
- Value: {{ credit_note.value }}
- Status: {{ credit_note.status }}
diff --git a/pinaxcon/templates/registrasion/discount_list.html b/pinaxcon/templates/registrasion/discount_list.html
index 577c081be23d91957e4f23a96331a283f025bdae..27834767105e29c74413ceef05e203074f3dcc8a 100644
--- a/pinaxcon/templates/registrasion/discount_list.html
+++ b/pinaxcon/templates/registrasion/discount_list.html
@@ -1,7 +1,7 @@
{% if discounts %}
{% for discount in discounts %}
- - {{ discount.quantity }} × {{ discount.clause }}
+ - {{ discount.discount.description }}: {{ discount.quantity }} × {{ discount.clause }}
{% endfor %}
{% endif %}
diff --git a/pinaxcon/templates/registrasion/guided_registration_complete.html b/pinaxcon/templates/registrasion/guided_registration_complete.html
deleted file mode 100644
index 2683957016d40d7929108ee7ee86e645feff80b3..0000000000000000000000000000000000000000
--- a/pinaxcon/templates/registrasion/guided_registration_complete.html
+++ /dev/null
@@ -1,35 +0,0 @@
-{% extends "registrasion/base.html" %}
-{% load bootstrap %}
-{% load registrasion_tags %}
-
-{% block body %}
-
- Conference Registration – Review
-
- {% items_pending as pending %}
- {% if pending %}
-
- Step 4 of 4
-
- You're almost done! You've selected the following items:
- {% include "registrasion/items_list.html" with items=pending %}
-
-
You can either generate an invoice and pay for your registration, or return to
- the dashboard to make amendments.
-
-
-
- {% else %}
-
- You have no items that need to be paid.
-
-
-
- {% endif %}
-
-{% endblock %}
diff --git a/pinaxcon/templates/registrasion/product_category.html b/pinaxcon/templates/registrasion/product_category.html
index 85c5a8909b1701e892523931b05135fab424279f..4322f38f6f77a2b1d8c6fb75f984dbd652f32d68 100644
--- a/pinaxcon/templates/registrasion/product_category.html
+++ b/pinaxcon/templates/registrasion/product_category.html
@@ -20,7 +20,7 @@
{% if items %}
Paid items
You have already paid for the following items:
- {% include "registrasion/items_list.html" with items=items %}
+ {% include "registrasion/_items_list.html" with items=items %}
{% endif %}
@@ -37,8 +37,10 @@
+
diff --git a/pinaxcon/templates/registrasion/report.html b/pinaxcon/templates/registrasion/report.html
index a76061883d757dac0cd292961bccec5cc39411b9..8dc724ad0a2489f29d17d1f6e2cbf251a7a6d135 100644
--- a/pinaxcon/templates/registrasion/report.html
+++ b/pinaxcon/templates/registrasion/report.html
@@ -23,14 +23,11 @@
{{ heading }} |
{% endfor %}
- {% for line in report.data %}
+ {% for line in report.rows %}
{% for item in line %}
- {% if report.link_view and forloop.counter0 == 0 %}
-
- {% endif %}
- {{ item }}
+ {{ item|safe }}
|
{% endfor %}
diff --git a/pinaxcon/templates/registrasion/review.html b/pinaxcon/templates/registrasion/review.html
new file mode 100644
index 0000000000000000000000000000000000000000..7927c763e003317a733e9f791246336dfd24f440
--- /dev/null
+++ b/pinaxcon/templates/registrasion/review.html
@@ -0,0 +1,74 @@
+{% extends "registrasion/base.html" %}
+{% load bootstrap %}
+{% load registrasion_tags %}
+
+{% block body %}
+
+ Review your selection
+
+ {% items_pending as pending %}
+ {% if pending %}
+
+ Current selection
+
+ You've selected the following items, which will be in your invoice when
+ you check out:
+ {% include "registrasion/_items_list.html" with items=pending %}
+
+ {% items_purchased as purchased %}
+ {% if purchased %}
+
You've already paid for the following items:
+ {% include "registrasion/_items_list.html" with items=purchased suffix="(PAID)" %}
+ {% endif %}
+
+
+ {% missing_categories as missing %}
+
+ Add to your selection
+
+ You can add these items now, or you can come back and add them in a
+ later purchase.
+
+ {% if missing %}
+
+
+ You have not selected any items from the following
+ categories. Even if your ticket includes complimentary tickets to social
+ events, or t-shirts, you must still add them to your selection.
+
+
+
+ {% include "registrasion/_category_list.html" with categories=missing %}
+
+ {% endif %}
+
+
+ You can also change your selection from these categories:
+
+
+ {% available_categories as available %}
+ {% include "registrasion/_category_list.html" with categories=available exclude=missing %}
+
+ What next?
+
+ You can either generate an invoice and pay for your selections, or return to
+ the dashboard.
+
+
+
+ {% else %}
+
+ You have no items that need to be paid.
+
+
+
+ {% endif %}
+
+{% endblock %}