From 84d30e13f01dffd6035effdfb33da6ce7278fd74 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Fri, 12 Jul 2013 15:32:41 +0200 Subject: [PATCH] And more registrations fixes... --- .../admin/stats/_registrations.html.haml | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/app/views/admin/stats/_registrations.html.haml b/app/views/admin/stats/_registrations.html.haml index bda3f06c..88c8886b 100644 --- a/app/views/admin/stats/_registrations.html.haml +++ b/app/views/admin/stats/_registrations.html.haml @@ -33,22 +33,22 @@ - count = @conference.registrations.where("dietary_choice_id = ?", d.id).count - 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" + - 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" - if @conference.social_events.count > 0 - social_events = []