mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Get rid of the schedule controller
This commit is contained in:
parent
ebb7d8da2c
commit
ce6ed0a8e9
10 changed files with 19 additions and 30 deletions
|
|
@ -11,6 +11,18 @@ class ConferenceController < ApplicationController
|
|||
@keynote_speakers = @conference.keynote_speakers
|
||||
end
|
||||
|
||||
def schedule
|
||||
@rooms = @conference.rooms
|
||||
@events = @conference.events
|
||||
@dates = @conference.start_date..@conference.end_date
|
||||
|
||||
if @dates == Date.current
|
||||
@today = Date.current.strftime('%Y-%m-%d')
|
||||
else
|
||||
@today = @conference.start_date.strftime('%Y-%m-%d')
|
||||
end
|
||||
end
|
||||
|
||||
def gallery_photos
|
||||
@photos = @conference.photos
|
||||
render 'photos', formats: [:js]
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
class ScheduleController < ApplicationController
|
||||
authorize_resource class: false
|
||||
layout 'application'
|
||||
|
||||
def index
|
||||
@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')
|
||||
else
|
||||
@today = @conference.start_date.strftime('%Y-%m-%d')
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue