Merge branch 'reports'

This commit is contained in:
Christopher Neugebauer 2016-09-05 11:00:19 +10:00
commit a2bdcb48b2
5 changed files with 120 additions and 3 deletions

View file

@ -164,6 +164,13 @@
to put this toward other purchases, or to refund it.</p> to put this toward other purchases, or to refund it.</p>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if user.is_staff %}
<h4>Registration reports</h4>
<p><a href="{% url "reports_list" %}">View available reports</a>.
</p>
{% endif %}
</div> </div>
</div> </div>

View file

@ -0,0 +1,46 @@
{% 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 %}

View file

@ -0,0 +1,41 @@
{% 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 %}

View file

@ -0,0 +1,21 @@
{% 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 %}

View file

@ -24,15 +24,17 @@ urlpatterns = [
url(r"^teams/", include("symposion.teams.urls")), url(r"^teams/", include("symposion.teams.urls")),
url(r"^boxes/", include("pinax.boxes.urls")),
url(r"^", include("pinax.pages.urls")),
# Required by registrasion # Required by registrasion
url(r'^register/', include('registrasion.urls')), url(r'^register/', include('registrasion.urls')),
url(r'^nested_admin/', include('nested_admin.urls')), url(r'^nested_admin/', include('nested_admin.urls')),
# Demo payment gateway and related features # Demo payment gateway and related features
url(r"^register/pinaxcon/", include("pinaxcon.registrasion.urls")), 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) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)