diff options
author | Go MAEDA <maeda@farend.jp> | 2022-07-22 01:33:38 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2022-07-22 01:33:38 +0000 |
commit | 3164895f6995d4255e9ed4c64c25ac07fdc5dd8f (patch) | |
tree | 47c1bb68fab9a0f0241c5ec1c7cccf734bd9409e | |
parent | 04e5ae033bf78d7cfd55dd1b905df79c2a913f83 (diff) | |
download | redmine-3164895f6995d4255e9ed4c64c25ac07fdc5dd8f.tar.gz redmine-3164895f6995d4255e9ed4c64c25ac07fdc5dd8f.zip |
Open Help in a separate tab (#1069).
Contributed by Vijay Kiran.
git-svn-id: https://svn.redmine.org/redmine/trunk@21737 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/views/layouts/base.html.erb | 2 | ||||
-rw-r--r-- | lib/redmine/preparation.rb | 2 | ||||
-rw-r--r-- | test/integration/layout_test.rb | 7 |
3 files changed, 9 insertions, 2 deletions
diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index 8114ff9e0..0a1f2ae38 100644 --- a/app/views/layouts/base.html.erb +++ b/app/views/layouts/base.html.erb @@ -115,7 +115,7 @@ </div> </div> <div id="footer"> - Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> © 2006-2022 Jean-Philippe Lang + Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url, :target => '_blank', :rel => 'noopener' %> © 2006-2022 Jean-Philippe Lang </div> <div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div> diff --git a/lib/redmine/preparation.rb b/lib/redmine/preparation.rb index 79f4f82ee..d2249b03e 100644 --- a/lib/redmine/preparation.rb +++ b/lib/redmine/preparation.rb @@ -169,7 +169,7 @@ module Redmine :caption => :label_project_plural menu.push :administration, {:controller => 'admin', :action => 'index'}, :if => Proc.new {User.current.admin?}, :last => true - menu.push :help, Info.help_url, :last => true + menu.push :help, Info.help_url, :html => {:target => '_blank', :rel => 'noopener'}, :last => true end MenuManager.map :account_menu do |menu| diff --git a/test/integration/layout_test.rb b/test/integration/layout_test.rb index 1679bd964..d9fd376af 100644 --- a/test/integration/layout_test.rb +++ b/test/integration/layout_test.rb @@ -127,4 +127,11 @@ class LayoutTest < Redmine::IntegrationTest get '/projects/ecookbook' assert_select 'div#quick-search form[action="/projects/ecookbook/search"]' end + + def test_help_and_powered_by_redmine_link_should_open_separate_tab + get '/' + assert_select '#top-menu a.help[target="_blank"][rel="noopener"]' + # "Powered by Redmine" link + assert_select '#footer a[target="_blank"][rel="noopener"]' + end end |