osem-fcy/app/views/admin/schedule/show.html.haml
Ana 99f71497cc Introduce a "Save" button for the admin schedule
The changes were saved after you drop an event, and now it only saves the schedule when you're done with the changes and click the "Save" button.
2016-08-02 00:45:01 +02:00

45 lines
1.5 KiB
Text

.row
.col-md-12
.page-header
%h1 Schedule
%p.text-muted
Create the schedules for the conference
- if @rooms.nil?
.h3
No Rooms!
%small
= link_to 'Create rooms', admin_conference_venue_rooms_path
before creating the schedule.
- else
.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' }
%button.btn.btn-success.schedule-save
Save
.h4
Unscheduled events
.unscheduled-events
- @unscheduled_events.each do |e|
= render partial: 'event', locals: { event: e, event_schedule_id: nil }
.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.initialize("#{@conference.short_title}", "#{@schedule_id}");
});