And more registrations fixes...
This commit is contained in:
parent
9e92d1f593
commit
84d30e13f0
1 changed files with 16 additions and 16 deletions
|
|
@ -33,22 +33,22 @@
|
||||||
- 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?
|
||||||
%table.table.table-bordered.table-striped
|
%table.table.table-bordered.table-striped
|
||||||
%thead
|
%thead
|
||||||
%th Dietary Choice
|
%th Dietary Choice
|
||||||
%th #
|
%th #
|
||||||
%th Percentage
|
%th Percentage
|
||||||
- diet_choices.each do |d|
|
- diet_choices.each do |d|
|
||||||
%tr
|
%tr
|
||||||
%td= d[0]
|
%td= d[0]
|
||||||
%td= d[1]
|
%td= d[1]
|
||||||
%td
|
%td
|
||||||
- if @registered and @registered > 0
|
- if @registered and @registered > 0
|
||||||
= "#{d[1] * 100 / @registered}% of registered"
|
= "#{d[1] * 100 / @registered}% of registered"
|
||||||
- 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 = []
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue