Several schedules in the backend && routes changed

- Introduce plural resources for Schedule in routes.rb
- Introduce #index and #create actions for ScheduleController
- Make it possible to set a schedule as selected_schedule
This commit is contained in:
Ana 2016-07-29 01:05:15 +02:00
parent 3897ec79ca
commit 42848f929b
8 changed files with 90 additions and 36 deletions

View file

@ -0,0 +1,13 @@
.row
- @rooms.each do |room|
.col-md-2.col-xs-6
.room-name
= room.name
- (9*4..18*4).each do |slot|
- hour = slot / 4
- time = (15 * (slot % 4) == 0) ? '00' : 15 * (slot % 4)
.schedule-room-slot{ id: "schedule-room-#{room.guid}-#{hour}-#{time}", |
"room-guid" => room.guid, |
hour: "#{hour}:#{time}", |
date: date}
= "#{hour}:#{time}"