课程主页,项目主页 500
This commit is contained in:
parent
6f3bed94d9
commit
7a4d562773
|
@ -96,14 +96,14 @@ class WelcomeController < ApplicationController
|
|||
@projects = Project.all_public.active
|
||||
render :layout => false, :content_type => 'text/plain'
|
||||
end
|
||||
|
||||
|
||||
def course
|
||||
redirect_to signin_path
|
||||
return
|
||||
|
||||
@course_page = FirstPage.find_by_page_type('course')
|
||||
@school_id = params[:school_id] || User.current.user_extensions.school.try(:id) || 117
|
||||
@logoLink ||= logolink()
|
||||
#
|
||||
# @course_page = FirstPage.find_by_page_type('course')
|
||||
# @school_id = params[:school_id] || User.current.user_extensions.school.try(:id) || 117
|
||||
# @logoLink ||= logolink()
|
||||
end
|
||||
|
||||
def logolink()
|
||||
|
@ -146,8 +146,8 @@ class WelcomeController < ApplicationController
|
|||
redirect_to signin_path
|
||||
return
|
||||
|
||||
@contest_page = FirstPage.find_by_page_type('contest')
|
||||
@contest_notifications = Contestnotification.order("created_at desc").limit(5)
|
||||
# @contest_page = FirstPage.find_by_page_type('contest')
|
||||
# @contest_notifications = Contestnotification.order("created_at desc").limit(5)
|
||||
end
|
||||
|
||||
def search
|
||||
|
@ -187,28 +187,28 @@ class WelcomeController < ApplicationController
|
|||
private
|
||||
# 判断网站的入口,是课程 course 则跳过index去渲染 course 方法
|
||||
def entry_select
|
||||
url = request.original_url.gsub('/','')
|
||||
if url.include?(Setting.url_course.gsub('/',''))
|
||||
if @first_page.show_course == 1
|
||||
course
|
||||
render :course
|
||||
else
|
||||
render_404
|
||||
end
|
||||
|
||||
return 0
|
||||
elsif url.include?(Setting.url_contest.gsub('/',''))
|
||||
if @first_page.show_contest == 1
|
||||
contest
|
||||
render :contest
|
||||
else
|
||||
render_404
|
||||
end
|
||||
|
||||
return 0
|
||||
elsif url.include?(Setting.url_user.gsub('/',''))
|
||||
#redirect_to(:controller => "users", :action => "index")
|
||||
end
|
||||
# url = request.original_url.gsub('/','')
|
||||
# if url.include?(Setting.url_course.gsub('/',''))
|
||||
# if @first_page.show_course == 1
|
||||
# course
|
||||
# render :course
|
||||
# else
|
||||
# render_404
|
||||
# end
|
||||
#
|
||||
# return 0
|
||||
# elsif url.include?(Setting.url_contest.gsub('/',''))
|
||||
# if @first_page.show_contest == 1
|
||||
# contest
|
||||
# render :contest
|
||||
# else
|
||||
# render_404
|
||||
# end
|
||||
#
|
||||
# return 0
|
||||
# elsif url.include?(Setting.url_user.gsub('/',''))
|
||||
# #redirect_to(:controller => "users", :action => "index")
|
||||
# end
|
||||
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue