Fixes cfp form
This commit is contained in:
parent
ba2051afc7
commit
169fab5c31
4 changed files with 8 additions and 12 deletions
|
|
@ -1,7 +1,7 @@
|
|||
class Admin::CallforpapersController < ApplicationController
|
||||
before_filter :verify_organizer
|
||||
|
||||
def show
|
||||
def index
|
||||
@cfp = @conference.call_for_papers
|
||||
if @cfp.nil?
|
||||
@cfp = CallForPapers.new
|
||||
|
|
@ -11,7 +11,7 @@ class Admin::CallforpapersController < ApplicationController
|
|||
def update
|
||||
@cfp = @conference.call_for_papers
|
||||
@cfp.update_attributes(params[:call_for_papers])
|
||||
redirect_to(admin_conference_cfp_info_path(:id => @conference.short_title), :notice => 'Call for Papers was successfully updated.')
|
||||
redirect_to(admin_conference_callforpapers_path(:id => @conference.short_title), :notice => 'Call for Papers was successfully updated.')
|
||||
|
||||
end
|
||||
|
||||
|
|
@ -19,9 +19,9 @@ class Admin::CallforpapersController < ApplicationController
|
|||
@cfp = CallForPapers.new(params[:call_for_papers])
|
||||
@conference.call_for_papers = @cfp
|
||||
if @cfp.save
|
||||
redirect_to(admin_conference_cfp_info_path(:id => @conference.short_title), :notice => 'Call for Papers was successfully updated.')
|
||||
redirect_to(admin_conference_callforpapers_path(:id => @conference.short_title), :notice => 'Call for Papers was successfully updated.')
|
||||
else
|
||||
redirect_to(admin_conference_cfp_info_path(:id => @conference.short_title), :error => 'Call for Papers failed.')
|
||||
redirect_to(admin_conference_callforpapers_path(:id => @conference.short_title), :error => 'Call for Papers failed.')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
.col-md-3
|
||||
= render 'admin/conference/sidebar'
|
||||
.col-md-9
|
||||
= semantic_form_for(@cfp, :url => admin_conference_cfp_update_path(@conference.short_title),:html => {:multipart => true}) do |f|
|
||||
= semantic_form_for(@cfp, :url => admin_conference_callforpaper_path(@conference.short_title, @conference.call_for_papers),:html => {:multipart => true}) do |f|
|
||||
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
|
||||
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
|
||||
= f.input :hard_deadline, :as => :string, :input_html => { :id => "cfp-hard-datepicker", :readonly => "readonly" }
|
||||
|
|
@ -4,8 +4,8 @@
|
|||
= link_to "Conference", admin_conference_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_venue_info_path(@conference.short_title))}
|
||||
= link_to "Venue", admin_conference_venue_info_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_cfp_info_path(@conference.short_title))}
|
||||
= link_to "Call for Papers", admin_conference_cfp_info_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_callforpapers_path(@conference.short_title))}
|
||||
= link_to "Call for Papers", admin_conference_callforpapers_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_rooms_path(@conference.short_title))}
|
||||
= link_to "Rooms", admin_conference_rooms_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_tracks_path(@conference.short_title))}
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@ Osem::Application.routes.draw do
|
|||
put "/registrations/edit" => "registrations#update"
|
||||
delete "/registrations" => "registrations#delete"
|
||||
put "/registrations/change_field" => "registrations#change_field"
|
||||
#get "/emailsettings" => "emails#show", :as => "email_settings"
|
||||
#put "/emailsettings" => "emails#update"
|
||||
get "/venue" => "venue#show", :as => "venue_info"
|
||||
put "/venue" => "venue#update", :as => "venue_update"
|
||||
get "/dietary_choices" => "dietchoices#show", :as => "dietary_list"
|
||||
|
|
@ -25,9 +23,6 @@ Osem::Application.routes.draw do
|
|||
get "/volunteers_list" => "volunteers#show"
|
||||
get "/volunteers" => "volunteers#index", :as => "volunteers_info"
|
||||
put "/volunteers" => "volunteers#update", :as => "volunteers_update"
|
||||
get "/cfp" => "callforpapers#show", :as => "cfp_info"
|
||||
put "/cfp" => "callforpapers#update", :as => "cfp_update"
|
||||
post "/cfp" => "callforpapers#create", :as => "cfp_create"
|
||||
|
||||
resources :difficulty_levels, :only => [ :show, :update, :index ]
|
||||
resources :rooms, :only => [ :show, :update, :index ]
|
||||
|
|
@ -36,6 +31,7 @@ Osem::Application.routes.draw do
|
|||
resources :social_events, :only => [ :show, :update, :index ]
|
||||
resources :supporter_levels, :only => [ :show, :update, :index ]
|
||||
resources :emails, :only => [ :show, :update, :index ]
|
||||
resources :callforpapers, :only => [ :show, :update, :index ]
|
||||
put "/questions/update_conference" => "questions#update_conference"
|
||||
resources :questions
|
||||
resources :events do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue