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
34
app/views/admin/schedule/show.html.haml
Normal file
34
app/views/admin/schedule/show.html.haml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1 Schedule
|
||||
%p.text-muted
|
||||
Create the schedules for the conference
|
||||
|
||||
.row
|
||||
.col-md-2
|
||||
Selected schedule
|
||||
= check_box_tag @conference.short_title, @schedule_id, (@schedule_id == @selected_schedule_id),
|
||||
method: :put, url: "/admin/conference/#{@conference.short_title}/schedule/#{@schedule_id}?selected_schedule=",
|
||||
class: 'switch-checkbox', data: { size: 'small',
|
||||
off_color: 'warning',
|
||||
on_text: 'Yes',
|
||||
off_text: 'No' }
|
||||
.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