[feat]Display happening now only if program is also displayed
This commit is contained in:
parent
497818cc45
commit
fec78dccce
5 changed files with 15 additions and 16 deletions
|
|
@ -60,6 +60,13 @@ class ConferencesController < ApplicationController
|
||||||
if splashpage.include_booths
|
if splashpage.include_booths
|
||||||
@booths = @conference.confirmed_booths.order('title')
|
@booths = @conference.confirmed_booths.order('title')
|
||||||
end
|
end
|
||||||
|
if splashpage.include_happening_now
|
||||||
|
events_schedules_list = get_happening_now_events_schedules(@conference)
|
||||||
|
@events_schedules_limit = EVENTS_PER_PAGE
|
||||||
|
@events_schedules_length = events_schedules_list.length
|
||||||
|
@pagy, @events_schedules = pagy_array(events_schedules_list, items: @events_schedules_limit, link_extra: 'data-remote="true"')
|
||||||
|
@happening_now_url = happening_now_conference_schedule_path(conference_id: @conference.short_title, format: :json)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if splashpage.include_registrations || splashpage.include_tickets
|
if splashpage.include_registrations || splashpage.include_tickets
|
||||||
@tickets = @conference.tickets.visible.order('price_cents')
|
@tickets = @conference.tickets.visible.order('price_cents')
|
||||||
|
|
@ -73,13 +80,6 @@ class ConferencesController < ApplicationController
|
||||||
).order('sponsorship_levels.position ASC', 'sponsors.name')
|
).order('sponsorship_levels.position ASC', 'sponsors.name')
|
||||||
@sponsors = @conference.sponsors
|
@sponsors = @conference.sponsors
|
||||||
end
|
end
|
||||||
if splashpage.include_happening_now
|
|
||||||
events_schedules_list = get_happening_now_events_schedules(@conference)
|
|
||||||
@events_schedules_limit = EVENTS_PER_PAGE
|
|
||||||
@events_schedules_length = events_schedules_list.length
|
|
||||||
@pagy, @events_schedules = pagy_array(events_schedules_list, items: @events_schedules_limit, link_extra: 'data-remote="true"')
|
|
||||||
@happening_now_url = happening_now_conference_schedule_path(conference_id: @conference.short_title, format: :json)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def calendar
|
def calendar
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@
|
||||||
= f.input :include_tracks, label: 'Include confirmed tracks', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_tracks) }
|
= f.input :include_tracks, label: 'Include confirmed tracks', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_tracks) }
|
||||||
%li
|
%li
|
||||||
= f.input :include_booths, label: "Include confirmed #{(t'booth').pluralize}", input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_booths) }
|
= f.input :include_booths, label: "Include confirmed #{(t'booth').pluralize}", input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_booths) }
|
||||||
|
%li
|
||||||
|
= f.input :include_happening_now, label: 'Include events happening now', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_happening_now) }
|
||||||
|
|
||||||
%li
|
%li
|
||||||
= f.input :include_registrations, label: 'Display the registration period', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_registrations) }
|
= f.input :include_registrations, label: 'Display the registration period', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_registrations) }
|
||||||
|
|
@ -44,9 +46,6 @@
|
||||||
%li
|
%li
|
||||||
= f.input :include_social_media, label: 'Display social media links', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_social_media) }
|
= f.input :include_social_media, label: 'Display social media links', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_social_media) }
|
||||||
|
|
||||||
%li
|
|
||||||
= f.input :include_happening_now, label: 'Display events happening now', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_happening_now) }
|
|
||||||
|
|
||||||
= f.inputs name: 'Access' do
|
= f.inputs name: 'Access' do
|
||||||
%ul.fa-ul
|
%ul.fa-ul
|
||||||
%li
|
%li
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,9 @@
|
||||||
%li
|
%li
|
||||||
%i{ class: "fa-li #{icon_for_todo @splashpage.include_booths?}" }
|
%i{ class: "fa-li #{icon_for_todo @splashpage.include_booths?}" }
|
||||||
Include confirmed #{(t'booth').pluralize}
|
Include confirmed #{(t'booth').pluralize}
|
||||||
|
%li
|
||||||
|
%i{ class: "fa-li #{icon_for_todo @splashpage.include_happening_now?}" }
|
||||||
|
Include events happening now
|
||||||
%li
|
%li
|
||||||
%i{ class: "fa-li #{icon_for_todo @splashpage.include_registrations?}" }
|
%i{ class: "fa-li #{icon_for_todo @splashpage.include_registrations?}" }
|
||||||
Display the registration period
|
Display the registration period
|
||||||
|
|
@ -45,9 +48,6 @@
|
||||||
%li
|
%li
|
||||||
%i{ class: "fa-li #{icon_for_todo @splashpage.include_social_media?}" }
|
%i{ class: "fa-li #{icon_for_todo @splashpage.include_social_media?}" }
|
||||||
Display social media links
|
Display social media links
|
||||||
%li
|
|
||||||
%i{ class: "fa-li #{icon_for_todo @splashpage.include_happening_now?}" }
|
|
||||||
Display events happening now
|
|
||||||
%li
|
%li
|
||||||
- if @conference.splashpage && @conference.splashpage.public
|
- if @conference.splashpage && @conference.splashpage.public
|
||||||
%i{ class: "fa-li #{icon_for_todo @splashpage.public?}" }
|
%i{ class: "fa-li #{icon_for_todo @splashpage.public?}" }
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
.container
|
.container
|
||||||
.row
|
.row
|
||||||
-# happening now events are displayed second in md or lg view
|
-# happening now events are displayed second in md or lg view
|
||||||
- if conference.splashpage.include_happening_now?
|
- if conference.splashpage.include_happening_now && conference.splashpage.include_program
|
||||||
- if conference.description.present?
|
- if conference.description.present?
|
||||||
.col-md-6.col-md-push-6.col-lg-4.col-lg-push-8
|
.col-md-6.col-md-push-6.col-lg-4.col-lg-push-8
|
||||||
= yield :happening_now
|
= yield :happening_now
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
.col-md-12
|
.col-md-12
|
||||||
= yield :happening_now
|
= yield :happening_now
|
||||||
- if conference.description.present?
|
- if conference.description.present?
|
||||||
- if conference.splashpage.include_happening_now?
|
- if conference.splashpage.include_happening_now && conference.splashpage.include_program
|
||||||
.col-md-6.col-md-pull-6.col-lg-8.col-lg-pull-4
|
.col-md-6.col-md-pull-6.col-lg-8.col-lg-pull-4
|
||||||
= yield :about
|
= yield :about
|
||||||
- else
|
- else
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
- if conference.splashpage.include_happening_now
|
- if conference.splashpage.include_program && conference.splashpage.include_happening_now
|
||||||
- if events_schedules.any?
|
- if events_schedules.any?
|
||||||
.row
|
.row
|
||||||
%h2.text-center{ style: 'margin-bottom:30px' } Happening Now
|
%h2.text-center{ style: 'margin-bottom:30px' } Happening Now
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue