diff --git a/app/controllers/admin/rooms_controller.rb b/app/controllers/admin/rooms_controller.rb index fb72df5f..7d05b04b 100644 --- a/app/controllers/admin/rooms_controller.rb +++ b/app/controllers/admin/rooms_controller.rb @@ -7,9 +7,9 @@ class Admin::RoomsController < ApplicationController def update if @conference.update_attributes(params[:conference]) - redirect_to(admin_conference_rooms_list_path(:conference_id => @conference.short_title), :notice => 'Rooms were successfully updated.') + redirect_to(admin_conference_rooms_path(:conference_id => @conference.short_title), :notice => 'Rooms were successfully updated.') else - redirect_to(admin_conference_rooms_list_path(:conference_id => @conference.short_title), :notice => 'Room update failed.') + redirect_to(admin_conference_rooms_path(:conference_id => @conference.short_title), :notice => 'Room update failed.') end end diff --git a/app/views/admin/conference/_sidebar.html.haml b/app/views/admin/conference/_sidebar.html.haml index 55797542..196279cb 100644 --- a/app/views/admin/conference/_sidebar.html.haml +++ b/app/views/admin/conference/_sidebar.html.haml @@ -6,8 +6,8 @@ = 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_rooms_list_path(@conference.short_title))} - = link_to "Rooms", admin_conference_rooms_list_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_list_path(@conference.short_title))} = link_to "Tracks", admin_conference_tracks_list_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_eventtype_list_path(@conference.short_title))} diff --git a/app/views/admin/rooms/rooms_list.html.haml b/app/views/admin/rooms/index.html.haml similarity index 75% rename from app/views/admin/rooms/rooms_list.html.haml rename to app/views/admin/rooms/index.html.haml index 0410f33c..7f8c9268 100644 --- a/app/views/admin/rooms/rooms_list.html.haml +++ b/app/views/admin/rooms/index.html.haml @@ -2,6 +2,6 @@ .col-md-3 = render 'admin/conference/sidebar' .col-md-9 - = semantic_form_for(@conference, :url => admin_conference_rooms_update_path(@conference.short_title)) do |f| + = semantic_form_for(@conference, :url => admin_conference_room_path(:conferecene_id => @conference.short_title, :id => @conference.rooms)) do |f| = dynamic_association :rooms, "Rooms", f = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} diff --git a/config/routes.rb b/config/routes.rb index 6c296a69..9174d5a2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -24,8 +24,6 @@ Osem::Application.routes.draw do put "/venue" => "venue#update", :as => "venue_update" get "/social_events" => "social_events#show", :as => "social_events" put "/social_events" => "social_events#update" - get "/rooms" => "rooms#show", :as => "rooms_list" - put "/rooms" => "rooms#update", :as => "rooms_update" get "/tracks" => "tracks#show", :as => "tracks_list" put "/tracks" => "tracks#update", :as => "tracks_update" get "/dietary_choices" => "dietchoices#show", :as => "dietary_list" @@ -38,8 +36,9 @@ Osem::Application.routes.draw do post "/cfp" => "callforpapers#create", :as => "cfp_create" get "/event_types" => "eventtype#show", :as => "eventtype_list" put "/event_types" => "eventtype#update", :as => "eventtype_update" - #put "/difficulty_levels" => "difficulty_levels#update" + resources :difficulty_levels, :only => [ :show, :update, :index ] + resources :rooms, :only => [ :show, :update, :index ] put "/questions/update_conference" => "questions#update_conference" resources :questions resources :events do