diff --git a/app/controllers/admin/callforpapers_controller.rb b/app/controllers/admin/callforpapers_controller.rb index 910b273e..b36b548c 100644 --- a/app/controllers/admin/callforpapers_controller.rb +++ b/app/controllers/admin/callforpapers_controller.rb @@ -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 diff --git a/app/views/admin/callforpapers/show.html.haml b/app/views/admin/callforpapers/index.html.haml similarity index 87% rename from app/views/admin/callforpapers/show.html.haml rename to app/views/admin/callforpapers/index.html.haml index 7f879e54..79ce99dc 100644 --- a/app/views/admin/callforpapers/show.html.haml +++ b/app/views/admin/callforpapers/index.html.haml @@ -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" } diff --git a/app/views/admin/conference/_sidebar.html.haml b/app/views/admin/conference/_sidebar.html.haml index 6b14338b..c4e8b1e0 100644 --- a/app/views/admin/conference/_sidebar.html.haml +++ b/app/views/admin/conference/_sidebar.html.haml @@ -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))} diff --git a/config/routes.rb b/config/routes.rb index ce0aed46..7ab85652 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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