Module: Decidim::Conferences::ConferenceProgramHelper

Includes:
ResourceHelper
Defined in:
decidim-conferences/app/helpers/decidim/conferences/conference_program_helper.rb

Overview

Helpers related to the Conferences layout.

Instance Method Summary collapse

Methods included from ResourceHelper

#linked_classes_filter_values_for, #linked_classes_for, #linked_resources_for, #resource_locator, #resource_title

Instance Method Details

#meetings_for_day(component, day, user) ⇒ Object


9
10
11
12
13
14
15
16
17
18
# File 'decidim-conferences/app/helpers/decidim/conferences/conference_program_helper.rb', line 9

def meetings_for_day(component, day, user)
  meetings = Decidim::Conferences::ConferenceProgramMeetingsByDay.new(component, day, user).query

  meetings_by_time = {}
  meetings.each do |meeting|
    meetings_by_time[start_time: meeting.start_time, end_time: meeting.end_time] ||= []
    meetings_by_time[start_time: meeting.start_time, end_time: meeting.end_time] << { meeting: meeting }
  end
  meetings_by_time
end