This commit is contained in:
differentreality 2013-07-12 12:48:46 +03:00
parent a71a16922c
commit f39d72bf5d

View file

@ -7,18 +7,25 @@
#tickets-stats #tickets-stats
.row-fluid .row-fluid
.span3 .span4
- if @supporter_levels.count > 0 - if @supporter_levels.count > 0
%table.table.table-bordered.table-striped %table.table.table-bordered.table-striped
%thead %thead
%th Support Level %th Support Level
%th # %th #
%th %
- @supporter_levels.each do |level| - @supporter_levels.each do |level|
- reg_support = reg_support(level) - reg_support = reg_support(level)
- if reg_support.count > 0 - if reg_support.count > 0
%tr %tr
%td= level.title %td= level.title
%td= "#{reg_support.count} (#{reg_support.count * 100 / @attendees}%)" %td
= reg_support.count
%td
= "#{reg_support.count * 100 / @pre_registered}% of registered"
- if @attendees
%br
= "#{reg_support.count * 100 / @attendees}% of attendees"
#registrations-stats #registrations-stats
@ -58,7 +65,7 @@
- if count > 0 - if count > 0
- diet_choices << [d.title, count] - diet_choices << [d.title, count]
- if diet_choices.any? - if diet_choices.any?
.span3 .span4
%table.table.table-bordered.table-striped %table.table.table-bordered.table-striped
%thead %thead
%th Dietary Choice %th Dietary Choice
@ -81,7 +88,7 @@
- if count > 0 - if count > 0
- social_events << [social_event.title, count] - social_events << [social_event.title, count]
- if social_events.any? - if social_events.any?
.span3 .span4
%table.table.table-bordered.table-striped %table.table.table-bordered.table-striped
%thead %thead
%th Social Event %th Social Event
@ -136,6 +143,7 @@
= reg.send(field.to_sym) = reg.send(field.to_sym)
:javascript :javascript
$(document).ready( function() {
$("#registrations-stats-link").click(function() { $("#registrations-stats-link").click(function() {
$("#registrations-stats").toggle(); $("#registrations-stats").toggle();
}); });