Now make it hackable and work with or without data
This commit is contained in:
parent
d96f7d5332
commit
27812216b9
4 changed files with 130 additions and 127 deletions
24
app/views/admin/stats/_tickets.html.haml
Normal file
24
app/views/admin/stats/_tickets.html.haml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
%h3
|
||||
Tickets (#{@tickets.length if @tickets}#{0 unless @tickets})
|
||||
- if @supporter_levels.count > 0
|
||||
%table.table.table-bordered.table-striped
|
||||
%thead
|
||||
%th Support Level
|
||||
%th #
|
||||
%th %
|
||||
- @supporter_levels.each do |level|
|
||||
- reg_support = reg_support(level)
|
||||
- if reg_support.count > 0
|
||||
%tr
|
||||
%td= level.title
|
||||
%td
|
||||
= reg_support.count
|
||||
%td
|
||||
- if @registered and @registered > 0
|
||||
= "#{reg_support.count * 100 / @registered}% of registered"
|
||||
- if @attendees and @attendees > 0
|
||||
%br
|
||||
= "#{reg_support.count * 100 / @attendees}% of attendees"
|
||||
- else
|
||||
%p
|
||||
No tickets sold yet
|
||||
Loading…
Add table
Add a link
Reference in a new issue