Changeset - a2bdcb48b2af
[Not reviewed]
Merge
0 2 3
Christopher Neugebauer - 7 years ago 2016-09-05 01:00:19
chrisjrn@gmail.com
Merge branch 'reports'
5 files changed with 120 insertions and 3 deletions:
0 comments (0 inline, 0 general)
pinaxcon/templates/dashboard.html
Show inline comments
...
 
@@ -164,6 +164,13 @@
 
                  to put this toward other purchases, or to refund it.</p>
 
              {% endif %}
 
            {% endif %}
 

	
 
          {% if user.is_staff %}
 
            <h4>Registration reports</h4>
 

	
 
            <p><a href="{% url "reports_list" %}">View available reports</a>.
 
            </p>
 
          {% endif %}
 
          </div>
 
    </div>
 

	
pinaxcon/templates/registrasion/amend_registration.html
Show inline comments
 
new file 100644
 
{% 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 %}
 

	
 
<h3>Cancelled Items</h3>
 

	
 
{% 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>
 

	
 
{% endblock %}
pinaxcon/templates/registrasion/report.html
Show inline comments
 
new file 100644
 
{% extends "site_base.html" %}
 
{% 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 %}
 
      <tr>
 
        {% for item in line %}
 
          <td>
 
            {% if report.link_view and forloop.counter0 == 0 %}
 
              <a href="{% url report.link_view item %}">
 
            {% endif %}
 
            {{ item }}
 
          </td>
 
        {% endfor %}
 
      </tr>
 
    {% endfor %}
 
  </table>
 
{% endfor %}
 

	
 
{% endblock %}
pinaxcon/templates/registrasion/reports_list.html
Show inline comments
 
new file 100644
 
{% extends "site_base.html" %}
 
{% load bootstrap %}
 
{% load registrasion_tags %}
 
{% block body %}
 

	
 
<h2>Registration reports</h2>
 

	
 
<table class="table table-striped">
 
  {% for report in reports %}
 
    <tr>
 
      <td>
 
        <a href="{{ report.url }}">{{ report.name }}</a>
 
      </td>
 
      <td>
 
        {{ report.description }}
 
      </td>
 
    </tr>
 
  {% endfor %}
 
</table>
 

	
 
{% endblock %}
pinaxcon/urls.py
Show inline comments
...
 
@@ -24,15 +24,17 @@ urlpatterns = [
 

	
 
    url(r"^teams/", include("symposion.teams.urls")),
 

	
 
    url(r"^boxes/", include("pinax.boxes.urls")),
 
    url(r"^", include("pinax.pages.urls")),
 

	
 
    # Required by registrasion
 
    url(r'^register/', include('registrasion.urls')),
 
    url(r'^nested_admin/', include('nested_admin.urls')),
 

	
 
    # Demo payment gateway and related features
 
    url(r"^register/pinaxcon/", include("pinaxcon.registrasion.urls")),
 

	
 
    url(r"^boxes/", include("pinax.boxes.urls")),
 

	
 
    # Catch-all MUST go last.
 
    #url(r"^", include("pinax.pages.urls")),
 
]
 

	
 
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
0 comments (0 inline, 0 general)