Public schedule and all events adapted to the new relations and models to allow having several schedules in the admin shcedule.
35 lines
1.5 KiB
Text
35 lines
1.5 KiB
Text
%schedule
|
|
%version= @conference.revision
|
|
%conference
|
|
%acronym= @conference.short_title
|
|
%title= @conference.title
|
|
%start= @conference.start_date
|
|
%end= @conference.end_date
|
|
%days= (@conference.end_date - @conference.start_date).to_i + 1
|
|
%timeslot_duration= length_timestamp(EventType::LENGTH_STEP)
|
|
|
|
- if @events_xml.any?
|
|
- @events_xml.keys.each.with_index(1) do |day, index|
|
|
%day{ date: day, index: index }
|
|
- events_in_rooms = @events_xml[day].group_by(&:room)
|
|
- events_in_rooms.keys.each do |room|
|
|
%room{ name: room.name }
|
|
- events_in_rooms[room].each do |event|
|
|
%event{ guid: event.guid, id: event.id }
|
|
%date= event.scheduled_start_time.iso8601
|
|
%start= event.scheduled_start_time.strftime('%H:%M')
|
|
%duration= length_timestamp(event.event_type.length)
|
|
%room= event.scheduled_room.name
|
|
%type= event.event_type.name
|
|
%language= ISO_639.find_by_english_name(event.language).third if event.language
|
|
%slug= "#{event.id} #{event.title}".parameterize
|
|
%title= event.title
|
|
%subtitle= event.subtitle
|
|
%track= event.track.name if event.track
|
|
%abstract= event.abstract
|
|
%recording
|
|
%license/
|
|
%optout=false #FIXME
|
|
%persons
|
|
- event.speakers.uniq.each do |speaker|
|
|
%person{ id: speaker.id }= speaker.name
|