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:
parent
3897ec79ca
commit
42848f929b
8 changed files with 90 additions and 36 deletions
13
app/views/admin/schedule/_day_tab.html.haml
Normal file
13
app/views/admin/schedule/_day_tab.html.haml
Normal 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}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue