osem-fcy/app/views/admin/stats/_registrations.html.haml

72 lines
2.1 KiB
Text
Raw Normal View History

2013-07-13 09:57:13 +03:00
.row-fluid
.span12
%h3
2013-07-30 11:41:39 +03:00
Total Registrations
2013-07-13 09:57:13 +03:00
- if @registered
= "(#{@registered})"
- if @attendees
= " - Attendees (#{@attendees})"
.row-fluid
.span3
2013-07-12 15:32:41 +02:00
%table.table.table-bordered.table-striped
%thead
2013-07-13 09:57:13 +03:00
%th General Stats
2013-07-12 15:32:41 +02:00
%th #
2013-07-13 09:57:13 +03:00
%tr
%td Registered attended
2013-07-30 11:41:39 +03:00
%td= @pre_registered_attended
2013-07-13 09:57:13 +03:00
%tr
%td Registered not attended
2013-07-30 11:41:39 +03:00
%td= @pre_registered - @pre_registered_attended
2013-07-13 09:57:13 +03:00
%tr
%td Attended with partner
%td= @attended_with_partner
%tr
%td Registred to attend with partner
%td= @registered_with_partner
%tr
%td Handicapped Access for
2013-07-30 11:41:39 +03:00
%td= @handicapped_access
2013-07-13 09:57:13 +03:00
%tr
%td Staying at suggested hotel
2013-07-30 11:41:39 +03:00
%td= @suggested_hotel_stay
2013-07-12 15:27:46 +02:00
2013-07-13 09:57:13 +03:00
.span3
- if @conference.use_dietary_choices == true
- diet_choices = []
- @conference.dietary_choices.each do |d|
2013-07-30 11:41:39 +03:00
- count = diet_count(d.id)
2013-07-13 09:57:13 +03:00
- if count > 0
- diet_choices << [d.title, count]
- if diet_choices.any?
%table.table.table-bordered.table-striped
%thead
%th Dietary Choice
%th #
%th Percentage
- diet_choices.each do |d|
%tr
%td= d[0]
%td= d[1]
%td
- if @registered and @registered > 0
= "#{d[1] * 100 / @registered}% of registered"
- if @attendees and @attendees > 0
%br
= "#{d[1] * 100 / @attendees}% of attendees"
.span3
- if @conference.social_events.count > 0
- social_events = []
- @conference.social_events.each do |social_event|
2013-07-30 11:41:39 +03:00
- count = social_event_count(social_event)
2013-07-13 09:57:13 +03:00
- if count > 0
- social_events << [social_event.title, count]
- if social_events.any?
%table.table.table-bordered.table-striped
%thead
%th Social Event
%th #
- social_events.each do |s|
%tr
%td= s[0]
%td= s[1]