Admin sidebar: show schedule instead of edit

This commit is contained in:
Stella Rouzi 2014-06-28 11:32:17 +03:00
parent 50e75c6dd4
commit 88dcc6a92f
6 changed files with 39 additions and 35 deletions

View file

@ -1,18 +1,17 @@
class ScheduleController < ApplicationController
layout 'application'
layout "application"
def index
@conference = Conference.includes(:rooms, {:events => [:speakers, :track, :event_type]}).where("conferences.short_title" => params[:conference_id]).first
@conference = Conference.includes(:rooms, events: [:speakers, :track, :event_type]).
where('conferences.short_title' => params[:conference_id]).first
@rooms = @conference.rooms
@events = @conference.events
@dates = @conference.start_date..@conference.end_date
if @dates === Date.current
@today = Date.current.strftime("%Y-%m-%d")
@today = Date.current.strftime('%Y-%m-%d')
else
@today = @conference.start_date.strftime("%Y-%m-%d")
@today = @conference.start_date.strftime('%Y-%m-%d')
end
end
end