[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
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ConferencesController < ApplicationController
|
class ConferencesController < ApplicationController
|
||||||
|
include ConferenceHelper
|
||||||
|
|
||||||
protect_from_forgery with: :null_session
|
protect_from_forgery with: :null_session
|
||||||
before_action :respond_to_options
|
before_action :respond_to_options
|
||||||
load_and_authorize_resource find_by: :short_title, except: :show
|
load_and_authorize_resource find_by: :short_title, except: :show
|
||||||
|
|
@ -70,6 +72,7 @@ class ConferencesController < ApplicationController
|
||||||
@sponsors = @conference.sponsors
|
@sponsors = @conference.sponsors
|
||||||
end
|
end
|
||||||
if splashpage.include_happening_now
|
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)
|
@happening_now_url = happening_now_conference_schedule_path(conference_id: @conference.short_title, format: :json)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,15 @@
|
||||||
|
|
||||||
-# happening now events
|
-# happening now events
|
||||||
- if @conference.splashpage.include_happening_now
|
- if @conference.splashpage.include_happening_now
|
||||||
.row
|
- if @events_schedules.any?
|
||||||
.col-md-12
|
- for event_schedule in @events_schedules
|
||||||
#happening_now_panel
|
.container
|
||||||
%h3.text-center There are no events happening now.
|
= render 'schedules/event', conference: @conference, event_schedule: event_schedule, event: event_schedule.event
|
||||||
|
- else
|
||||||
|
.row
|
||||||
|
.col-md-12
|
||||||
|
#happening_now_panel
|
||||||
|
%h3.text-center There are no events happening now.
|
||||||
|
|
||||||
-# calls for content, or program
|
-# calls for content, or program
|
||||||
- if @conference.splashpage.include_cfp
|
- if @conference.splashpage.include_cfp
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue