Merge pull request #1319 from JewelSam/master
#1220 adding the cell size attribute to the database
This commit is contained in:
commit
f3e712a1bc
19 changed files with 104 additions and 35 deletions
|
|
@ -12,13 +12,15 @@ module Admin
|
|||
@program = @conference.program
|
||||
@program.assign_attributes(program_params)
|
||||
send_mail_on_schedule_public = @program.notify_on_schedule_public?
|
||||
event_schedules_count_was = @program.event_schedules.count
|
||||
|
||||
if @program.update_attributes(program_params)
|
||||
ConferenceScheduleUpdateMailJob.perform_later(@conference) if send_mail_on_schedule_public
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
redirect_to admin_conference_program_path(@conference.short_title),
|
||||
notice: 'The program was successfully updated.'
|
||||
notice = 'The program was successfully updated.'
|
||||
notice += ' You changed schedule interval and some events were unscheduled.' if @program.event_schedules.count != event_schedules_count_was
|
||||
redirect_to admin_conference_program_path(@conference.short_title), notice: notice
|
||||
end
|
||||
format.js { render json: {} }
|
||||
end
|
||||
|
|
@ -36,7 +38,7 @@ module Admin
|
|||
private
|
||||
|
||||
def program_params
|
||||
params.require(:program).permit(:rating, :schedule_public, :schedule_fluid, :languages, :blind_voting, :voting_start_date, :voting_end_date, :selected_schedule_id)
|
||||
params.require(:program).permit(:rating, :schedule_public, :schedule_interval, :schedule_fluid, :languages, :blind_voting, :voting_start_date, :voting_end_date, :selected_schedule_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class SchedulesController < ApplicationController
|
|||
|
||||
@events_xml = schedules.map(&:event).group_by{ |event| event.time.to_date } if schedules
|
||||
@dates = @conference.start_date..@conference.end_date
|
||||
@step_minutes = EventType::LENGTH_STEP.minutes
|
||||
@step_minutes = @program.schedule_interval.minutes
|
||||
@conf_start = @conference.start_hour
|
||||
@conf_period = @conference.end_hour - @conf_start
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue