Changeset - 796c8cca18d9
pinaxcon/registrasion/admin.py
Show inline comments
 
new file 100644
 
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")
pinaxcon/templates/dashboard.html
Show inline comments
...
 
@@ -88,80 +88,81 @@
 
                    </tr>
 
                    {% for proposal in pending_proposals %}
 
                        {% include "symposion/proposals/_pending_proposal_row.html" %}
 
                    {% endfor %}
 
                </table>
 
            {% endif %}
 
        {% endif %}
 
    </div>
 

	
 
    <div class="panel panel-default">
 
        <div class="panel-heading">
 
            <div class="pull-right">
 
                {% if not user.attendee.completed_registration %}
 
                    <a href="{% url "guided_registration" %}" class="btn btn-xs btn-default">
 
                        <i class="fa fa-plus-sign"></i> Register for the conference
 
                    </a>
 
                {% else %}
 
                  <a href="{% url "attendee_edit" %}" class="btn btn-xs btn-default">
 
                      <i class="fa fa-pencil"></i> Edit your attendee profile
 
                  </a>
 

	
 
                  {% items_pending as pending %}
 
                  {% if pending %}
 
                    <a href="{% url "checkout" %}" class="btn btn-xs btn-default">
 
                        <i class="fa fa-credit-card"></i> Pay your registration
 
                        <i class="fa fa-credit-card"></i> Check out and pay
 
                    </a>
 
                  {% endif %}
 
                {% endif %}
 
            </div>
 
            <h3 class="panel-title">
 
              <i class="fa fa-ticket"></i>
 
                {% trans "Registration" %}
 
            </h3>
 

	
 
        </div>
 

	
 
        <div class="panel-body">
 
            {% if not user.attendee.completed_registration %}
 
                <p>To attend the conference, you must purchase a ticket. <a href="{% url "guided_registration" %}">Use our registration form to purchase your ticket</a>.
 
            {% else %}
 
              <h4>Your registration</h4>
 
                  {% items_pending as pending %}
 
                  {% if pending %}
 
                    <h5>Items pending payment</h5>
 
                    {% include "registrasion/items_list.html" with items=pending %}
 
                    {% include "registrasion/_items_list.html" with items=pending %}
 
                    <p><a href="{% url "checkout" %}" class="btn btn-xs btn-default">
 
                        <i class="fa fa-credit-card"></i>
 
                        Check out and pay for these items.</a></p>
 
                  {% endif %}
 
                {% items_purchased as purchased %}
 
                {% if purchased %}
 
                  <h5>Paid items</h5>
 
                  {% include "registrasion/items_list.html" with items=purchased %}
 
                  {% include "registrasion/_items_list.html" with items=purchased %}
 
                {% endif %}
 
                <h5>Add/Update items</h5>
 
                {% available_categories as categories %}
 
                {% for category in categories %}
 
                  <li><a href="{% url "product_category" category.id %}">{{ category.name }}</a></li>
 
                {% endfor %}
 
                {% include "registrasion/_category_list.html" with categories=categories %}
 
              </ul>
 

	
 
              {% invoices as invoices %}
 
              {% if invoices %}
 
              <h5>Invoices</h5>
 
                <ul>
 
                  {% for invoice in invoices %}
 
                    {% if not invoice.is_void %}
 
                      <li>
 
                          <a href="{% url "invoice" invoice.id %}">Invoice {{ invoice.id }}</a>
 
                          - ${{ invoice.value }} ({{ invoice.get_status_display }})
 
                      </li>
 
                    {% endif %}
 
                  {% endfor %}
 
                </ul>
 
              {% endif %}
 

	
 
              {% available_credit as credit %}
 
              {% if credit %}
 
                <p>You have ${{ credit }} leftover from refunded invoices. Contact the conference organisers
 
                  to put this toward other purchases, or to refund it.</p>
 
              {% endif %}
 
            {% endif %}
 

	
pinaxcon/templates/registrasion/_category_list.html
Show inline comments
 
new file 100644
 
<ul>
 
  {% for category in categories %}
 
    {% if not category in exclude %}
 
      <li><a href="{% url "product_category" category.id %}">{{ category.name }}</a></li>
 
    {% endif %}
 
  {% endfor %}
 
</ul>
pinaxcon/templates/registrasion/_invoice_details.html
Show inline comments
 
{% load registrasion_tags %}
 

	
 
<h2>Invoice</h2>
 

	
 
{% with invoice_user=invoice.cart.user %}
 
  <ul>
 
    <li><strong>Invoice number:</strong> {{ invoice.id }}
 
    <li><strong>Invoice status:</strong> {{ invoice.get_status_display }}</li>
 
    <li><strong>Issue date:</strong> {{ invoice.issue_time|date:"DATE_FORMAT" }}
 
    {% if not invoice.is_void %}
 
      <li><strong>Due:</strong> {{ invoice.due_time|date:"DATETIME_FORMAT"}}</li>
 
    {% endif %}
 
    <li><strong>Recipient:</strong> {{ invoice_user.attendee.attendeeprofilebase.invoice_recipient|linebreaksbr}}</li>
 
    <li><strong>Recipient:</strong> {{ invoice.recipient|linebreaksbr}}</li>
 
  </ul>
 
{% endwith %}
 

	
 
<p>This invoice has been issued as a result of an application to attend (conference name).</p>
 

	
 

	
 
<table class="table table-striped">
 
  <tr>
 
    <th>Description</th>
 
    <th class="text-right">Quantity</th>
 
    <th class="text-right">Price/Unit</th>
 
    <th class="text-right">Total</th>
 
  </tr>
 
  {% for line_item in invoice.lineitem_set.all %}
 
    <tr>
 
      <td>{{ line_item.description }}</td>
 
      <td class="text-right">{{ line_item.quantity }}</td>
 
      <td class="text-right">${{ line_item.price }}</td>
 
      <td class="text-right">${{ line_item.price|multiply:line_item.quantity }}</td>
 
    </tr>
 
  {% endfor %}
 
  <tr>
 
    <th>TOTAL</th>
 
    <td></td>
pinaxcon/templates/registrasion/_items_list.html
Show inline comments
 
file renamed from pinaxcon/templates/registrasion/items_list.html to pinaxcon/templates/registrasion/_items_list.html
 
{% if items %}
 
  <ul>
 
    {% for item in items %}
 
      <li>{{ item.quantity }} &times; {{ item.product }}</li>
 
      <li>{{ item.quantity }} &times; {{ item.product }} {{ suffix }}</li>
 
    {% endfor %}
 
  </ul>
 
{% endif %}
pinaxcon/templates/registrasion/amend_registration.html
Show inline comments
 
{% extends "site_base.html" %}
 
{% load bootstrap %}
 
{% load registrasion_tags %}
 

	
 
{% block body %}
 

	
 
<h2>Item summary for {{ user.attendee.attendeeprofilebase.attendee_name }}
 
  (id={{user.id}})</h2>
 

	
 
<h3>Paid Items</h3>
 

	
 
<p>You cannot remove paid items from someone's registration. You must first
 
  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.</p>
 

	
 
{% include "registrasion/items_list.html" with items=paid %}
 
{% include "registrasion/_items_list.html" with items=paid %}
 

	
 
<h3>Cancelled Items</h3>
 

	
 
{% include "registrasion/items_list.html" with items=cancelled %}
 
{% include "registrasion/_items_list.html" with items=cancelled %}
 

	
 
<h3>Amend pending items</h3>
 

	
 
<form method="POST">
 
  {% csrf_token %}
 
  {{ form | bootstrap}}
 
  <br/>
 
  <input type="submit">
 
</form>
 

	
 
<h3>Generate invoice</h3>
 

	
 
<div>
 
  <a class="btn btn-xs btn-default" href="{% url "checkout" user.id %}">Check out cart and view invoice</a>
 
</div>
 

	
 
<h3>Apply voucher</h3>
 

	
 
<form method="POST">
 
  {% csrf_token %}
 
  {{ voucher_form | bootstrap}}
 
  <br/>
 
  <input type="submit">
 
</form>
pinaxcon/templates/registrasion/credit_note.html
Show inline comments
 
{% extends "site_base.html" %}
 
{% load bootstrap %}
 
{% load registrasion_tags %}
 
{% block body %}
 

	
 
<h2>Credit Note</h2>
 

	
 
{% with note_user=credit_note.invoice.user %}
 
  <ul>
 
    <li><strong>Number:</strong> {{ credit_note.id }}
 
    <li><strong>Attention:</strong> {{ credit_note.invoice.user.attendee.attendeeprofilebase.invoice_recipient }}</li>
 
    <li><strong>Attention:</strong> {{ credit_note.invoice.recipient }}</li>
 
    <li><strong>Value:</strong> {{ credit_note.value }}</li>
 
    <li><strong>Status:</strong> {{ credit_note.status }}</li>
 
  </ul>
 
{% endwith %}
 

	
 
<p>This credit note was generated from funds excess from invoice {{ credit_note.invoice.id }}.</p>
 

	
 
{% if credit_note.is_unclaimed %}
 
  <form method="post" action="">
 
    {% csrf_token %}
 
    <h3>Apply to invoice</h3>
 
    <p>You can apply this credit note to an unpaid invoice.</p>
 

	
 
      {{ apply_form|bootstrap }}
 
      <div class="form-actions">
 
          <input class="btn btn-primary" type="submit" value="Apply to invoice" />
 
      </div>
 
    <h3>Manual refund</h3>
 
    <p>You can mark this credit note as refunded, and handle the refund manually.
 
    </p>
 

	
 
      {{ refund_form|bootstrap }}
 
      <div class="form-actions">
 
          <input class="btn btn-primary" type="submit" value="Mark as refunded" />
pinaxcon/templates/registrasion/discount_list.html
Show inline comments
 
{% if discounts %}
 
  <ul>
 
    {% for discount in discounts %}
 
      <li>{{ discount.quantity }} &times; {{ discount.clause }}</li>
 
      <li>{{ discount.discount.description }}: {{ discount.quantity }} &times; {{ discount.clause }}</li>
 
    {% endfor %}
 
  </ul>
 
{% endif %}
pinaxcon/templates/registrasion/guided_registration_complete.html
Show inline comments
 
deleted file
pinaxcon/templates/registrasion/product_category.html
Show inline comments
 
{% extends "registrasion/base.html" %}
 
{% load bootstrap %}
 
{% load registrasion_tags %}
 
{% block body %}
 

	
 
  <h1>Product Category: {{ category.name }}</h1>
 

	
 
  <form method="post" action="">
 
    {% csrf_token %}
 

	
 
    <table>
 
        {{ voucher_form | bootstrap }}
 
    </table>
 

	
 
    <div class="form-actions">
 
        <input class="btn btn-primary" type="submit" value="Add voucher" />
 
    </div>
 

	
 
    {% items_purchased category as items %}
 
    {% if items %}
 
      <h3>Paid items</h3>
 
      <p>You have already paid for the following items:</p>
 
      {% include "registrasion/items_list.html" with items=items %}
 
      {% include "registrasion/_items_list.html" with items=items %}
 
    {% endif %}
 

	
 

	
 
    {% if discounts %}
 
      <h3>Available Discounts</h3>
 
      {% include "registrasion/discount_list.html" with discounts=discounts %}
 
    {% endif %}
 

	
 
    <h3>Available Products</h3>
 
    <p>{{ category.description }}</p>
 
    <table>
 
        {{ form | bootstrap }}
 
    </table>
 

	
 
    <div class="form-actions">
 
        <input class="btn btn-primary" type="submit" value="Add to cart" />
 
        <a href="{% url "dashboard" %}" class="btn btn-default">Return to dashboard</a>
 
    </div>
 

	
 

	
 
  </form>
 

	
 

	
 
{% endblock %}
pinaxcon/templates/registrasion/report.html
Show inline comments
...
 
@@ -2,40 +2,37 @@
 
{% load bootstrap %}
 
{% load registrasion_tags %}
 

	
 
{% block body %}
 

	
 
  <h2>{{ title }}</h2>
 

	
 
  {% if form %}
 
    <form method="GET">
 
      {{ form | bootstrap}}
 
      <br/>
 
      <input type="submit">
 
    </form>
 
  {% endif %}
 
<hr />
 

	
 
{% for report in reports %}
 
  <h3>{{ report.title }}</h3>
 
  <table class="table table-striped">
 
    <tr>
 
      {% for heading in report.headings %}
 
        <th>{{ heading }}</th>
 
      {% endfor %}
 
    </tr>
 
    {% for line in report.data %}
 
    {% for line in report.rows %}
 
      <tr>
 
        {% for item in line %}
 
          <td>
 
            {% if report.link_view and forloop.counter0 == 0 %}
 
              <a href="{% url report.link_view item %}">
 
            {% endif %}
 
            {{ item }}
 
            {{ item|safe }}
 
          </td>
 
        {% endfor %}
 
      </tr>
 
    {% endfor %}
 
  </table>
 
{% endfor %}
 

	
 
{% endblock %}
pinaxcon/templates/registrasion/review.html
Show inline comments
 
new file 100644
 
{% extends "registrasion/base.html" %}
 
{% load bootstrap %}
 
{% load registrasion_tags %}
 

	
 
{% block body %}
 

	
 
  <h1>Review your selection</h1>
 

	
 
  {% items_pending as pending %}
 
  {% if pending %}
 

	
 
  <h3>Current selection</h3>
 

	
 
  <p>You've selected the following items, which will be in your invoice when
 
    you check out:<p>
 
  {% include "registrasion/_items_list.html" with items=pending %}
 

	
 
  {% items_purchased as purchased %}
 
  {% if purchased %}
 
    <p>You've already paid for the following items:</p>
 
    {% include "registrasion/_items_list.html" with items=purchased suffix="(PAID)" %}
 
  {% endif %}
 

	
 

	
 
  {% missing_categories as missing %}
 

	
 
  <h3>Add to your selection</h3>
 

	
 
  <p>You can add these items now, or you can come back and add them in a
 
    later purchase.</p>
 

	
 
  {% if missing %}
 

	
 
    <p>
 
      <strong>You have <em>not</em> 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.
 
      </strong>
 
    </p>
 

	
 
    {% include "registrasion/_category_list.html" with categories=missing %}
 

	
 
  {% endif %}
 

	
 
  <p>
 
    <strong>You can also change your selection from these categories:</strong>
 
  </p>
 

	
 
  {% available_categories as available %}
 
  {% include "registrasion/_category_list.html" with categories=available exclude=missing %}
 

	
 
  <h3>What next?</h3>
 

	
 
  <p>You can either generate an invoice and pay for your selections, or return to
 
      the dashboard.</p>
 

	
 
  <div class="form-actions">
 
    <a class="btn btn-primary" href="{% url "checkout" %}">
 
      <i class="fa fa-credit-card"></i> Check out and pay
 
    </a>
 
    <a class="btn btn-default" href="{% url "dashboard" %}">Return to dashboard</a>
 
  </div>
 

	
 
  {% else %}
 

	
 
  <p>You have no items that need to be paid.</p>
 

	
 
  <div class="form-actions">
 
    <a class="btn btn-default" href="{% url "dashboard" %}">Return to dashboard</a>
 
  </div>
 

	
 
  {% endif %}
 

	
 
{% endblock %}
0 comments (0 inline, 0 general)