More fixes for the regitrations tab
This commit is contained in:
parent
27812216b9
commit
9e92d1f593
1 changed files with 38 additions and 38 deletions
|
|
@ -26,14 +26,14 @@
|
||||||
%tr
|
%tr
|
||||||
%td Staying at suggested hotel:
|
%td Staying at suggested hotel:
|
||||||
%td= @conference.registrations.where("using_affiliated_lodging = ?", true).count
|
%td= @conference.registrations.where("using_affiliated_lodging = ?", true).count
|
||||||
- if @conference.use_dietary_choices == true
|
|
||||||
|
- if @conference.use_dietary_choices == true
|
||||||
- diet_choices = []
|
- diet_choices = []
|
||||||
- @conference.dietary_choices.each do |d|
|
- @conference.dietary_choices.each do |d|
|
||||||
- count = @conference.registrations.where("dietary_choice_id = ?", d.id).count
|
- count = @conference.registrations.where("dietary_choice_id = ?", d.id).count
|
||||||
- if count > 0
|
- if count > 0
|
||||||
- diet_choices << [d.title, count]
|
- diet_choices << [d.title, count]
|
||||||
- if diet_choices.any?
|
- if diet_choices.any?
|
||||||
.span4
|
|
||||||
%table.table.table-bordered.table-striped
|
%table.table.table-bordered.table-striped
|
||||||
%thead
|
%thead
|
||||||
%th Dietary Choice
|
%th Dietary Choice
|
||||||
|
|
@ -49,14 +49,14 @@
|
||||||
- if @attendees and @attendees > 0
|
- if @attendees and @attendees > 0
|
||||||
%br
|
%br
|
||||||
= "#{d[1] * 100 / @attendees}% of attendees"
|
= "#{d[1] * 100 / @attendees}% of attendees"
|
||||||
- if @conference.social_events.count > 0
|
|
||||||
|
- if @conference.social_events.count > 0
|
||||||
- social_events = []
|
- social_events = []
|
||||||
- @conference.social_events.each do |social_event|
|
- @conference.social_events.each do |social_event|
|
||||||
- count = @conference.registrations.joins(:social_events).where("registrations_social_events.social_event_id = ?", social_event.id).count
|
- count = @conference.registrations.joins(:social_events).where("registrations_social_events.social_event_id = ?", social_event.id).count
|
||||||
- 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?
|
||||||
.span4
|
|
||||||
%table.table.table-bordered.table-striped
|
%table.table.table-bordered.table-striped
|
||||||
%thead
|
%thead
|
||||||
%th Social Event
|
%th Social Event
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue