Event model improvements

- Drop selected_event_schedule function
- Rename scheduled_room and scheduled_start_time to room and time as if there is no selected_schedule, the event is not scheduled.
This commit is contained in:
Ana 2016-08-01 21:25:12 +02:00
parent 5001848af7
commit a578167cf5
13 changed files with 32 additions and 35 deletions

View file

@ -16,10 +16,10 @@
%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')
%date= event.time.iso8601
%start= event.time.strftime('%H:%M')
%duration= length_timestamp(event.event_type.length)
%room= event.scheduled_room.name
%room= event.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