修改浏览器tab页通过不同的模块展示不同内容

This commit is contained in:
huang 2016-01-20 16:58:41 +08:00
parent 0db69e1ebf
commit f3b5f4e5f7
1 changed files with 11 additions and 1 deletions

View File

@ -969,7 +969,17 @@ module ApplicationHelper
first_page = FirstPage.find_by_page_type('project')
if args.empty?
title = @html_title || []
title << @project.name if @project
if @project
title << @project.name
elsif @course
title << @course.name
elsif @organization
title << @organization.name
elsif @user
title << @user.login
else
title << User.current.login
end
if first_page.nil? || first_page.web_title.nil?
title << Setting.app_title unless Setting.app_title == title.last
else