Improve attendee reports
Display attendee profile data in normal table without DataTables so sorting is not applied, causing data to be confusing to read. Include item quantity in attendee data report for accurate schwag packing.
This commit is contained in:
parent
d2ca86bba2
commit
7fac10241e
3 changed files with 29 additions and 22 deletions
|
@ -81,6 +81,7 @@ class AttendeeProfile(rego.AttendeeProfileBase):
|
|||
help_text="Your name, as you'd like it to appear on your badge. ",
|
||||
)
|
||||
company = models.CharField(
|
||||
verbose_name="Company",
|
||||
max_length=64,
|
||||
help_text="The name of your company, as you'd like it on your badge",
|
||||
blank=True,
|
||||
|
@ -133,6 +134,7 @@ class AttendeeProfile(rego.AttendeeProfileBase):
|
|||
blank=True,
|
||||
)
|
||||
country = CountryField(
|
||||
verbose_name="Country",
|
||||
default="AU",
|
||||
)
|
||||
state = models.CharField(
|
||||
|
@ -159,12 +161,14 @@ class AttendeeProfile(rego.AttendeeProfileBase):
|
|||
blank=True,
|
||||
)
|
||||
gender = models.CharField(
|
||||
verbose_name="Gender",
|
||||
help_text="Gender data will only be used for demographic purposes.",
|
||||
max_length=64,
|
||||
blank=True,
|
||||
)
|
||||
|
||||
children = models.CharField(
|
||||
verbose_name="Child Ages and Information",
|
||||
max_length=256,
|
||||
help_text="Linux.conf.au is a family friendly conference and provides "
|
||||
"free child-care for pre-school children from 6 months up to 5 years. We "
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
<h3>{{ report.title }}</h3>
|
||||
{% if report.headings %}
|
||||
<table class="table table-striped table-reportdata">
|
||||
{% else %}
|
||||
<table class="table table-striped">
|
||||
{% endif %}
|
||||
<thead>
|
||||
<tr>
|
||||
{% for heading in report.headings %}
|
||||
|
@ -34,13 +31,14 @@
|
|||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
{% else %}
|
||||
<table class="table table-striped">
|
||||
{% endif %}
|
||||
<tbody>
|
||||
{% for line in report.rows %}
|
||||
<tr>
|
||||
{% for item in line %}
|
||||
<td>
|
||||
{{ item|safe }}
|
||||
</td>
|
||||
<td>{{ item|safe }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
|
@ -598,6 +598,8 @@ def attendee(request, form, user_id=None):
|
|||
|
||||
profile_data.append((field.verbose_name, value))
|
||||
|
||||
profile_data.insert(1, ("Email", attendee.user.email))
|
||||
|
||||
cart = CartController.for_user(attendee.user)
|
||||
try:
|
||||
reservation = cart.cart.reservation_duration + cart.cart.time_last_updated
|
||||
|
@ -606,7 +608,9 @@ def attendee(request, form, user_id=None):
|
|||
|
||||
profile_data.append(("Current cart reserved until", reservation))
|
||||
|
||||
reports.append(ListReport("Profile", ["", ""], profile_data))
|
||||
# No column headings, as this has row headings instead and sorting makes
|
||||
# everything confusing.
|
||||
reports.append(ListReport("Profile", None, profile_data))
|
||||
|
||||
links = []
|
||||
links.append((
|
||||
|
@ -887,7 +891,7 @@ def attendee_data(request, form, user_id=None):
|
|||
except TypeError:
|
||||
return "Bad value found for %s" % attr
|
||||
|
||||
headings = ["User ID", "Name", "Email", "Product", "Item Status"]
|
||||
headings = ["User ID", "Name", "Email", "Product", "Quantity", "Item Status"]
|
||||
headings.extend(field_names)
|
||||
data = []
|
||||
for item in items:
|
||||
|
@ -897,6 +901,7 @@ def attendee_data(request, form, user_id=None):
|
|||
getattr(profile, name_field),
|
||||
profile.attendee.user.email,
|
||||
item.product,
|
||||
item.quantity,
|
||||
status_display[item.cart.status],
|
||||
] + [
|
||||
display_field(profile, field) for field in fields
|
||||
|
|
Loading…
Reference in a new issue