|
|
|
@ -86,7 +86,7 @@ class AdminController < ApplicationController
|
|
|
|
|
flash[:error] = l(:error_can_t_load_default_data, e.message)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
redirect_to admin_path
|
|
|
|
|
redirect_to admin_url
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def test_email
|
|
|
|
@ -100,7 +100,7 @@ class AdminController < ApplicationController
|
|
|
|
|
flash[:error] = l(:notice_email_error, e.message)
|
|
|
|
|
end
|
|
|
|
|
ActionMailer::Base.raise_delivery_errors = raise_delivery_errors
|
|
|
|
|
redirect_to settings_path(:tab => 'notifications')
|
|
|
|
|
redirect_to settings_url(:tab => 'notifications')
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def info
|
|
|
|
@ -159,7 +159,7 @@ class AdminController < ApplicationController
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
flash[:notice] = l(:notice_successful_update)
|
|
|
|
|
format.html {
|
|
|
|
|
redirect_to admin_first_page_made_path
|
|
|
|
|
redirect_to admin_first_page_made_url
|
|
|
|
|
}
|
|
|
|
|
format.api { render_api_ok }
|
|
|
|
|
#format.json { render json: @first_page, status: :created, location: @first_page }
|
|
|
|
@ -194,7 +194,7 @@ class AdminController < ApplicationController
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
format.html {
|
|
|
|
|
flash[:notice] = l(:notice_successful_update)
|
|
|
|
|
redirect_to admin_course_page_made_path
|
|
|
|
|
redirect_to admin_course_page_made_url
|
|
|
|
|
}
|
|
|
|
|
format.api { render_api_ok }
|
|
|
|
|
end
|
|
|
|
@ -217,11 +217,11 @@ class AdminController < ApplicationController
|
|
|
|
|
if request.get?
|
|
|
|
|
@contest_page = FirstPage.where("page_type = 'contest'").first
|
|
|
|
|
@first_page = FirstPage.where("page_type = 'project'").first
|
|
|
|
|
@notification = ContestNotification.all.first;
|
|
|
|
|
@notification = ContestNotification.first;
|
|
|
|
|
elsif request.post?
|
|
|
|
|
@first_page = FirstPage.where("page_type = 'project'").first
|
|
|
|
|
@contest_page = FirstPage.where("page_type = 'contest'").first
|
|
|
|
|
@notification = ContestNotification.all.first;
|
|
|
|
|
@notification = ContestNotification.first;
|
|
|
|
|
@first_page.web_title = params[:web_title]
|
|
|
|
|
@contest_page.web_title = params[:web_title]
|
|
|
|
|
@contest_page.title = params[:contest_title]
|
|
|
|
@ -235,7 +235,7 @@ class AdminController < ApplicationController
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
format.html {
|
|
|
|
|
flash[:notice] = l(:notice_successful_update)
|
|
|
|
|
redirect_to admin_contest_page_made_path
|
|
|
|
|
redirect_to admin_contest_page_made_url
|
|
|
|
|
}
|
|
|
|
|
format.api { render_api_ok }
|
|
|
|
|
end
|
|
|
|
@ -254,13 +254,13 @@ class AdminController < ApplicationController
|
|
|
|
|
|
|
|
|
|
def web_footer_made
|
|
|
|
|
if request.get?
|
|
|
|
|
@organizer = WebFooterOranizer.all.first
|
|
|
|
|
@organizer = WebFooterOranizer.first
|
|
|
|
|
@first_page = FirstPage.where("page_type = 'project'").first
|
|
|
|
|
#@notification = ContestNotification.all.first;
|
|
|
|
|
elsif request.post?
|
|
|
|
|
@first_page = FirstPage.where("page_type = 'project'").first
|
|
|
|
|
@first_page.web_title = params[:web_title]
|
|
|
|
|
@organizer = WebFooterOranizer.all.first
|
|
|
|
|
@organizer = WebFooterOranizer.first
|
|
|
|
|
if @organizer.nil?
|
|
|
|
|
@organizer = WebFooterOranizer.new
|
|
|
|
|
end
|
|
|
|
@ -270,7 +270,7 @@ class AdminController < ApplicationController
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
format.html {
|
|
|
|
|
flash[:notice] = l(:notice_successful_update)
|
|
|
|
|
redirect_to admin_web_footer_made_path
|
|
|
|
|
redirect_to admin_web_footer_made_url
|
|
|
|
|
}
|
|
|
|
|
format.api { render_api_ok }
|
|
|
|
|
end
|
|
|
|
|