Changeset - d4b0b52253ae
[Not reviewed]
0 9 0
Joel Addison - 4 years ago 2020-01-04 14:34:17
joel@addison.net.au
Registrasion updates

Show applied vouchers on attendee registration admin page.
Add head title and page title to more areas.
Update the dashboard to show warning for empty categories and have
button to open voucher page.
Fix exception on attendee page when user does not have attendee object.
9 files changed with 79 insertions and 23 deletions:
0 comments (0 inline, 0 general)
pinaxcon/templates/registrasion/_items_list.html
Show inline comments
...
 
@@ -6,2 +6,4 @@
 
  </ul>
 
{% else %}
 
  <p>No items.</p>
 
{% endif %}
pinaxcon/templates/registrasion/amend_registration.html
Show inline comments
...
 
@@ -43,2 +43,16 @@
 

	
 
<h3>Currently applied vouchers</h3>
 

	
 
{% if vouchers %}
 
<ul>
 
  {% for voucher in vouchers %}
 
    <li>{{ voucher.code }}</li>
 
  {% endfor %}
 
</ul>
 
{% else %}
 
<p>No vouchers applied.</p>
 
{% endif %}
 

	
 
<br />
 

	
 
<h3>Apply voucher</h3>
pinaxcon/templates/registrasion/profile_form.html
Show inline comments
...
 
@@ -3,3 +3,4 @@
 

	
 

	
 
{% block head_title %}Your Profile{% endblock %}
 
{% block page_title %}Your Profile{% endblock %}
 

	
...
 
@@ -24,3 +25,2 @@
 
{% block proposals_body %}
 
  <h1>Your Profile</h1>
 
  <p>These details will appear on your badge, your invoices, and will be used to order catered food at the conference.</p>
pinaxcon/templates/registrasion/review.html
Show inline comments
...
 
@@ -3,2 +3,3 @@
 
{% load lca2018_tags %}
 
{% load lca2019_tags %}
 

	
...
 
@@ -17,3 +18,3 @@
 
{% block proposals_body %}
 
  <h1 class="mb-4">Order Review</h1>
 
  <h2 class="mb-4">Order Review</h2>
 

	
...
 
@@ -22,3 +23,3 @@
 
  <div class="my-4">
 
    <h2>Current selection</h2>
 
    <h3>Current selection</h3>
 
    <p>You've selected the following items, which will be in your invoice when you check out:<p>
...
 
@@ -31,3 +32,3 @@
 
  <div class="my-4">
 
    <h2>Previously purchased</h2>
 
    <h3>Previously purchased</h3>
 
    <p>You've already paid for the following items:</p>
...
 
@@ -38,3 +39,3 @@
 
  <div class="my-4">
 
    <h2>Modify your selection</h2>
 
    <h3>Modify your selection</h3>
 

	
...
 
@@ -53,7 +54,7 @@
 

	
 
    <p>
 
      <strong>You can change your selection from these categories:</strong>
 
      {% available_categories as available %}
 
      {% include "registrasion/_category_list.html" with categories=available exclude=missing %}
 
    </p>
 
    {% available_categories as available %}
 
    {% if available|contains_items_not_in:missing %}
 
    <p><strong>You can change your selection from these categories:</strong></p>
 
    {% include "registrasion/_category_list.html" with categories=available exclude=missing %}
 
    {% endif %}
 
  </div>
...
 
@@ -61,3 +62,3 @@
 
  <div class="my-4">
 
    <h2>Voucher</h2>
 
    <h3>Voucher</h3>
 
    <p>If you have been given a voucher, please <a id="voucher-form-button" href="{% url "voucher_code" %}">enter your voucher code</a> now.
...
 
@@ -67,3 +68,3 @@
 
  <div class="my-4">
 
    <h2>What next?</h2>
 
    <h3>What next?</h3>
 
    {% if pending %}
pinaxcon/templates/registrasion/voucher_code.html
Show inline comments
...
 
@@ -3,2 +3,5 @@
 

	
 
{% block head_title %}Apply Voucher{% endblock %}
 
{% block page_title %}Apply Voucher{% endblock %}
 

	
 
{% block proposals_body %}
pinaxcon/templates/symposion/dashboard/_categories.html
Show inline comments
...
 
@@ -8,2 +8,3 @@
 
{% load staticfiles %}
 
{% load waffle_tags %}
 

	
...
 
@@ -48,2 +49,5 @@
 
        <a class="btn btn-primary" role="button" href="{% url "attendee_edit" %}">Edit attendee profile</a>
 
        {% flag "badge_preview" %}
 
        <a class="btn btn-info" role="button" href="{% url "user_badge" %}">Preview my badge</a>
 
        {% endflag %}
 
      </div>
...
 
@@ -68,6 +72,7 @@
 
    {% if pending %}
 
    <div class="col-md-6 mb-3 mb-md-0">
 
    <div class="col-md-6 mb-3">
 
      <h4>Items pending payment</h4>
 
      {% include "registrasion/_items_list.html" with items=pending %}
 
      <a class="btn btn-lg btn-primary" role="button" href="{% url "checkout" %}">Check out and pay</a>
 
      <a class="btn btn-primary" role="button" href="{% url "checkout" %}"><i class="fa fa-credit-card"></i> Check out and pay</a>
 
      <a class="btn btn-secondary" role="button" href="{% url "voucher_code" %}">Apply voucher</a>
 
    </div>
...
 
@@ -77,5 +82,9 @@
 
    {% if purchased %}
 
    <div class="col-md-6 mb-3 mb-md-0">
 
    <div class="col-md-6 mb-3">
 
      <h4>Paid Items</h4>
 
      {% include "registrasion/_items_list.html" with items=purchased %}
 

	
 
      {% if not pending %}
 
      <a class="btn btn-secondary" role="button" href="{% url "voucher_code" %}">Apply voucher</a>
 
      {% endif %}
 
    </div>
...
 
@@ -83,5 +92,22 @@
 

	
 
    <div class="col-md-6 mb-3 mb-md-0">
 
    <div class="col-md-6 mb-3">
 
      <h4>Add/Update Items</h4>
 
      {% include "registrasion/_category_list.html" with categories=categories %}
 
      {% missing_categories as missing %}
 
      {% if missing %}
 
      <div class="alert alert-warning my-4 pb-4">
 
        <h5 class="alert-heading">You have empty categories</h5>
 
        <p>You have <em>not</em> selected anything from the following
 
          categories. If your ticket includes any of these, you still need to
 
          make a selection:
 
        </p>
 

	
 
        {% include "registrasion/_category_list.html" with categories=missing %}
 
      </div>
 
      {% endif %}
 

	
 
      {% available_categories as available %}
 
      {% if available|contains_items_not_in:missing %}
 
      <p><strong>You can change your selection from these categories:</strong></p>
 
      {% include "registrasion/_category_list.html" with categories=available exclude=missing %}
 
      {% endif %}
 
    </div>
...
 
@@ -90,3 +116,3 @@
 
    {% if invoices %}
 
    <div class="col-md-6 mb-3 mb-md-0">
 
    <div class="col-md-6 mb-3">
 
      <h4>Invoices</h4>
...
 
@@ -101,3 +127,3 @@
 
      <div class="mt-auto">
 
        <button id="toggle-void-invoices" onclick="toggleVoidInvoices();" class="btn btn-lg btn-default">Show void invoices</button>
 
        <button type="button" class="btn btn-sm btn-outline-dark" id="toggle-void-invoices" onclick="toggleVoidInvoices();">Show void invoices</button>
 
      </div>
...
 
@@ -108,3 +134,3 @@
 
    {% if false %}
 
    <div class="col-md-6 mb-3 mb-md-0">
 
    <div class="col-md-6 mb-3">
 
      <h4>Raffle Tickets</h4>
...
 
@@ -119,3 +145,3 @@
 
    {% if credit %}
 
    <div class="col-md-6 mb-3 mb-md-0">
 
    <div class="col-md-6 mb-3">
 
      <h4>Credit</h4>
pinaxcon/templatetags/lca2019_tags.py
Show inline comments
...
 
@@ -50,2 +50,7 @@ def any_is_void(invoices):
 

	
 
@register.filter
 
def contains_items_not_in(list1, list2):
 
    return len(set(list1).difference(list2)) > 0
 

	
 

	
 
@register.filter
vendor/registrasion/registrasion/reporting/views.py
Show inline comments
...
 
@@ -564,5 +564,9 @@ def attendee(request, form, user_id=None):
 

	
 
    profile_data = []
 
    try:
 
        attendee = people.Attendee.objects.get(user__id=user_id)
 
    except people.DoesNotExist:
 
        return reports
 

	
 
    profile_data = []
 
    try:
 
        name = attendee.attendeeprofilebase.attendee_name()
vendor/registrasion/registrasion/views.py
Show inline comments
...
 
@@ -1079,2 +1079,3 @@ def amend_registration(request, user_id):
 
        "voucher_form": voucher_form,
 
        "vouchers": current_cart.cart.vouchers.all(),
 
    }
0 comments (0 inline, 0 general)