From f3b5f4e5f762b6c52bf698c2b12b33cbd546f0a6 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 20 Jan 2016 16:58:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8F=E8=A7=88=E5=99=A8ta?= =?UTF-8?q?b=E9=A1=B5=E9=80=9A=E8=BF=87=E4=B8=8D=E5=90=8C=E7=9A=84?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=B1=95=E7=A4=BA=E4=B8=8D=E5=90=8C=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 66f60d020..ebc60c312 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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