diff --git a/app/controllers/admin/eventtype_controller.rb b/app/controllers/admin/eventtype_controller.rb index 04d8f2e0..a335c8f2 100644 --- a/app/controllers/admin/eventtype_controller.rb +++ b/app/controllers/admin/eventtype_controller.rb @@ -8,9 +8,9 @@ class Admin::EventtypeController < ApplicationController def update begin @conference.update_attributes!(params[:conference]) - redirect_to(admin_conference_eventtype_list_path(:conference_id => @conference.short_title), :notice => 'Event types were successfully updated.') + redirect_to(admin_conference_eventtype_path(:conference_id => @conference.short_title), :notice => 'Event types were successfully updated.') rescue Exception => e - redirect_to(admin_conference_eventtype_list_path(:conference_id => @conference.short_title), :alert => 'Event types update failed: #{e.message}') + redirect_to(admin_conference_eventtype_path(:conference_id => @conference.short_title), :alert => 'Event types update failed: #{e.message}') end end end \ No newline at end of file diff --git a/app/views/admin/conference/_sidebar.html.haml b/app/views/admin/conference/_sidebar.html.haml index 2e80d4c1..294c42a6 100644 --- a/app/views/admin/conference/_sidebar.html.haml +++ b/app/views/admin/conference/_sidebar.html.haml @@ -10,8 +10,8 @@ = link_to "Rooms", admin_conference_rooms_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_tracks_path(@conference.short_title))} = link_to "Tracks", admin_conference_tracks_path(@conference.short_title) - %li{:class=> active_nav_li(admin_conference_eventtype_list_path(@conference.short_title))} - = link_to "Event Types", admin_conference_eventtype_list_path(@conference.short_title) + %li{:class=> active_nav_li(admin_conference_eventtype_index_path(@conference.short_title))} + = link_to "Event Types", admin_conference_eventtype_index_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_difficulty_levels_path(@conference.short_title))} = link_to "Difficulty Levels", admin_conference_difficulty_levels_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_social_events_path(@conference.short_title))} diff --git a/app/views/admin/eventtype/event_type_list.html.haml b/app/views/admin/eventtype/event_type_list.html.haml index 637b7c99..d1eefa53 100644 --- a/app/views/admin/eventtype/event_type_list.html.haml +++ b/app/views/admin/eventtype/event_type_list.html.haml @@ -2,6 +2,6 @@ .col-md-3 = render 'admin/conference/sidebar' .col-md-9 - = semantic_form_for(@conference, :url => admin_conference_eventtype_update_path(@conference.short_title)) do |f| + = semantic_form_for(@conference, :url => admin_conference_eventtype_path(:conference_id => @conference.short_title, :id => @conference.event_types)) do |f| = dynamic_association :event_types, "Event Types", f = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} diff --git a/config/routes.rb b/config/routes.rb index f695e02a..471628b9 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -32,12 +32,11 @@ Osem::Application.routes.draw do get "/cfp" => "callforpapers#show", :as => "cfp_info" put "/cfp" => "callforpapers#update", :as => "cfp_update" post "/cfp" => "callforpapers#create", :as => "cfp_create" - get "/event_types" => "eventtype#show", :as => "eventtype_list" - put "/event_types" => "eventtype#update", :as => "eventtype_update" resources :difficulty_levels, :only => [ :show, :update, :index ] resources :rooms, :only => [ :show, :update, :index ] resources :tracks, :only => [ :show, :update, :index ] + resources :eventtype, :only => [ :show, :update, :index ] put "/questions/update_conference" => "questions#update_conference" resources :questions resources :events do