Create charts for registrations
Conflicts: app/controllers/admin/stats_controller.rb app/views/admin/stats/index.html.haml
This commit is contained in:
parent
9cf5c59f28
commit
87551e88f8
9 changed files with 432 additions and 72 deletions
|
|
@ -1,28 +1,5 @@
|
|||
.row-fluid
|
||||
.span12
|
||||
%h3
|
||||
Non-free Tickets (#{@tickets})
|
||||
.row-fluid
|
||||
.span5
|
||||
- if @supporter_levels.count > 0
|
||||
%table.table.table-bordered.table-striped
|
||||
%thead
|
||||
%th Support Level
|
||||
%th #
|
||||
%th %
|
||||
- @supporter_levels.each do |level|
|
||||
- reg_count = level.supporter_registrations.where(conference_id: @conference).count
|
||||
- if reg_count > 0
|
||||
%tr
|
||||
%td= level.title
|
||||
%td
|
||||
= reg_count
|
||||
%td
|
||||
- if @registered and @registered > 0
|
||||
= "#{reg_count * 100 / @registered}% of registered"
|
||||
- if @attendees and @attendees > 0
|
||||
%br
|
||||
= "#{reg_count * 100 / @attendees}% of attendees"
|
||||
- else
|
||||
%p
|
||||
No tickets sold yet
|
||||
- if @tickets
|
||||
%h2
|
||||
= "Non-Free Tickets(#{@tickets.count})"
|
||||
.span4#tickets_time
|
||||
= render :partial => "tickets_time"
|
||||
Loading…
Add table
Add a link
Reference in a new issue