[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
|
||||
@booths = @conference.confirmed_booths.order('title')
|
||||
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
|
||||
if splashpage.include_registrations || splashpage.include_tickets
|
||||
@tickets = @conference.tickets.visible.order('price_cents')
|
||||
|
|
@ -73,13 +80,6 @@ class ConferencesController < ApplicationController
|
|||
).order('sponsorship_levels.position ASC', 'sponsors.name')
|
||||
@sponsors = @conference.sponsors
|
||||
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
|
||||
|
||||
def calendar
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue