Browse Source
Fixed another NPE on the stats page
G0dwin-copy-edits
Godwin
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
3 deletions
-
app/views/conference_administration/_stats.html.haml
|
|
@ -7,11 +7,11 @@ |
|
|
|
= data_set(:h3, 'articles.admin.stats.headings.bikes') do |
|
|
|
= (@completed_registrations || 0) > 0 ? "#{@bikes} (#{number_to_percentage(@bikes / @completed_registrations.to_f * 100.0)})" : "0" |
|
|
|
= data_set(:h3, 'articles.admin.stats.headings.food.meat') do |
|
|
|
= (@food[:all] || 0) > 0 ? "#{@food[:meat]} (#{number_to_percentage(@food[:meat] / @food[:all].to_f * 100.0)})" : "0" |
|
|
|
= @food && (@food[:all] || 0) > 0 ? "#{@food[:meat]} (#{number_to_percentage(@food[:meat] / @food[:all].to_f * 100.0)})" : "0" |
|
|
|
= data_set(:h3, 'articles.admin.stats.headings.food.vegetarian') do |
|
|
|
= (@food[:all] || 0) > 0 ? "#{@food[:vegetarian]} (#{number_to_percentage(@food[:vegetarian] / @food[:all].to_f * 100.0)})" : "0" |
|
|
|
= @food && (@food[:all] || 0) > 0 ? "#{@food[:vegetarian]} (#{number_to_percentage(@food[:vegetarian] / @food[:all].to_f * 100.0)})" : "0" |
|
|
|
= data_set(:h3, 'articles.admin.stats.headings.food.vegan') do |
|
|
|
= (@food[:all] || 0) > 0 ? "#{@food[:vegan]} (#{number_to_percentage(@food[:vegan] / @food[:all].to_f * 100.0)})" : "0" |
|
|
|
= @food && (@food[:all] || 0) > 0 ? "#{@food[:vegan]} (#{number_to_percentage(@food[:vegan] / @food[:all].to_f * 100.0)})" : "0" |
|
|
|
= data_set(:h3, 'articles.admin.stats.headings.donation_count') do |
|
|
|
= (@completed_registrations || 0) > 0 ? "#{@donation_count} (#{number_to_percentage(@donation_count / @completed_registrations.to_f * 100.0)})" : "0" |
|
|
|
= data_set(:h3, 'articles.admin.stats.headings.donation_total') do |
|
|
|