diff --git a/app/controllers/admin/emails_controller.rb b/app/controllers/admin/emails_controller.rb index fcdc0d6a..64b263f9 100644 --- a/app/controllers/admin/emails_controller.rb +++ b/app/controllers/admin/emails_controller.rb @@ -3,10 +3,10 @@ class Admin::EmailsController < ApplicationController def update @conference.email_settings.update_attributes(params[:email_settings]) - redirect_to(admin_conference_email_settings_path(@conference.short_title), :notice => 'Settings have been successfully updated.') + redirect_to(admin_conference_emails_path(@conference.short_title), :notice => 'Settings have been successfully updated.') end - def show + def index @settings = @conference.email_settings end diff --git a/app/views/admin/conference/_sidebar.html.haml b/app/views/admin/conference/_sidebar.html.haml index 294c42a6..6b14338b 100644 --- a/app/views/admin/conference/_sidebar.html.haml +++ b/app/views/admin/conference/_sidebar.html.haml @@ -18,8 +18,8 @@ = link_to "Social Events", admin_conference_social_events_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_supporter_levels_path(@conference.short_title))} = link_to "Supporter Levels", admin_conference_supporter_levels_path(@conference.short_title) - %li{:class=> active_nav_li(admin_conference_email_settings_path(@conference.short_title))} - = link_to "Emails", admin_conference_email_settings_path(@conference.short_title) + %li{:class=> active_nav_li(admin_conference_emails_path(@conference.short_title))} + = link_to "Emails", admin_conference_emails_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_questions_path(@conference.short_title))} = link_to "Questions", admin_conference_questions_path(@conference.short_title) %li{:class=> active_nav_li(admin_conference_volunteers_info_path(@conference.short_title))} diff --git a/app/views/admin/emails/show.html.haml b/app/views/admin/emails/index.html.haml similarity index 95% rename from app/views/admin/emails/show.html.haml rename to app/views/admin/emails/index.html.haml index 1f65f7b9..77c170d4 100644 --- a/app/views/admin/emails/show.html.haml +++ b/app/views/admin/emails/index.html.haml @@ -24,7 +24,7 @@ %tr %td {eventtitle} %td The title of an accepted or rejected proposal - = semantic_form_for(@settings, :url => admin_conference_email_settings_path(@conference.short_title),:html => {:multipart => true}) do |f| + = semantic_form_for(@settings, :url => admin_conference_email_path(@conference.short_title, @conference.email_settings),:html => {:multipart => true}) do |f| = f.input :send_on_registration, :label => false, :hint => "Send an email when the user registers for the conference?" = f.input :registration_subject = f.input :registration_email_template, :input_html => { :rows => 10, :cols => 20} diff --git a/config/routes.rb b/config/routes.rb index 16b34704..ce0aed46 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -16,8 +16,8 @@ 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 "/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" @@ -35,6 +35,7 @@ Osem::Application.routes.draw do resources :eventtype, :only => [ :show, :update, :index ] resources :social_events, :only => [ :show, :update, :index ] resources :supporter_levels, :only => [ :show, :update, :index ] + resources :emails, :only => [ :show, :update, :index ] put "/questions/update_conference" => "questions#update_conference" resources :questions resources :events do