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
|
|
@ -1,13 +0,0 @@
|
|||
.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}"
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1 Schedule
|
||||
%p.text-muted
|
||||
Create the schedules for the conference
|
||||
|
||||
.row
|
||||
.col-md-2
|
||||
.h4
|
||||
Unscheduled events
|
||||
.unscheduled-events
|
||||
.col-md-10
|
||||
%ul.nav.nav-tabs
|
||||
- @dates.each do |date|
|
||||
%li{ class: "#{ (@dates.first == date) ? 'active' : '' }"}
|
||||
%a{ href: "##{date}" }
|
||||
= date
|
||||
.tab-content
|
||||
- @dates.each do |date|
|
||||
.tab-pane{ class: "#{ (@dates.first == date) ? 'active' : '' }", id: "#{date}" }
|
||||
= render partial: 'day_tab', locals: { date: date }
|
||||
|
||||
:javascript
|
||||
$(document).ready( function() {
|
||||
Schedule.loadEvents("#{@conference.short_title}", "#{@schedule_id}");
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue