Create charts for registrations

Conflicts:

	app/controllers/admin/stats_controller.rb
	app/views/admin/stats/index.html.haml
This commit is contained in:
differentreality 2013-09-17 15:21:45 +03:00
parent 9cf5c59f28
commit 87551e88f8
9 changed files with 432 additions and 72 deletions

View file

@ -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"