[feat] Display happening now events in splashpage
This commit is contained in:
parent
a7a6255656
commit
3b96d9e63e
2 changed files with 12 additions and 4 deletions
|
|
@ -1,6 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ConferencesController < ApplicationController
|
||||
include ConferenceHelper
|
||||
|
||||
protect_from_forgery with: :null_session
|
||||
before_action :respond_to_options
|
||||
load_and_authorize_resource find_by: :short_title, except: :show
|
||||
|
|
@ -70,6 +72,7 @@ class ConferencesController < ApplicationController
|
|||
@sponsors = @conference.sponsors
|
||||
end
|
||||
if splashpage.include_happening_now
|
||||
@events_schedules = get_happening_now_events_schedules(@conference)
|
||||
@happening_now_url = happening_now_conference_schedule_path(conference_id: @conference.short_title, format: :json)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -46,6 +46,11 @@
|
|||
|
||||
-# happening now events
|
||||
- if @conference.splashpage.include_happening_now
|
||||
- if @events_schedules.any?
|
||||
- for event_schedule in @events_schedules
|
||||
.container
|
||||
= render 'schedules/event', conference: @conference, event_schedule: event_schedule, event: event_schedule.event
|
||||
- else
|
||||
.row
|
||||
.col-md-12
|
||||
#happening_now_panel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue