Browse Source
Fixed past conference details 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
10 additions and
10 deletions
-
app/controllers/conference_administration_controller.rb
|
@ -342,11 +342,6 @@ class ConferenceAdministrationController < ApplicationController |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
def administrate_stats |
|
|
def administrate_stats |
|
|
if @this_conference.start_date.blank? || @this_conference.end_date.blank? |
|
|
|
|
|
@warning_message = :no_date_warning |
|
|
|
|
|
return |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
get_stats(!request.format.xlsx?) |
|
|
get_stats(!request.format.xlsx?) |
|
|
|
|
|
|
|
|
if request.format.xlsx? |
|
|
if request.format.xlsx? |
|
@ -355,6 +350,16 @@ class ConferenceAdministrationController < ApplicationController |
|
|
format.xlsx { render xlsx: '../conferences/stats', filename: "stats-#{DateTime.now.strftime('%Y-%m-%d')}" } |
|
|
format.xlsx { render xlsx: '../conferences/stats', filename: "stats-#{DateTime.now.strftime('%Y-%m-%d')}" } |
|
|
end |
|
|
end |
|
|
else |
|
|
else |
|
|
|
|
|
@past_conferences = [] |
|
|
|
|
|
Conference.all.order("start_date DESC").each do |conference| |
|
|
|
|
|
@past_conferences << conference if conference.is_public && @this_conference.id != conference.id |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
if @this_conference.start_date.blank? || @this_conference.end_date.blank? |
|
|
|
|
|
@warning_message = :no_date_warning |
|
|
|
|
|
return |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
@registration_count = @registrations.size |
|
|
@registration_count = @registrations.size |
|
|
@completed_registrations = 0 |
|
|
@completed_registrations = 0 |
|
|
@bikes = 0 |
|
|
@bikes = 0 |
|
@ -378,11 +383,6 @@ class ConferenceAdministrationController < ApplicationController |
|
|
end |
|
|
end |
|
|
end |
|
|
end |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
@past_conferences = [] |
|
|
|
|
|
Conference.all.order("start_date DESC").each do |conference| |
|
|
|
|
|
@past_conferences << conference if conference.is_public && @this_conference.id != conference.id |
|
|
|
|
|
end |
|
|
|
|
|
end |
|
|
end |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|