From 2738389fbd8654bf1ee5ddc94fda218eb8f92552 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 9 Nov 2019 17:57:35 +0000 Subject: [PATCH] cleanup: rubocop: fix Layout/MultilineArrayBraceLayout in app/helpers/projects_helper.rb git-svn-id: http://svn.redmine.org/redmine/trunk@19050 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .rubocop_todo.yml | 1 - app/helpers/projects_helper.rb | 32 ++++++++++++++++++++++---------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index bb64ef7a6..5415f2205 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -153,7 +153,6 @@ Layout/IndentationWidth: # SupportedStyles: symmetrical, new_line, same_line Layout/MultilineArrayBraceLayout: Exclude: - - 'app/helpers/projects_helper.rb' - 'app/helpers/settings_helper.rb' - 'app/helpers/users_helper.rb' diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 7e59d6ea0..0c8733b79 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -19,16 +19,28 @@ module ProjectsHelper def project_settings_tabs - tabs = [{:name => 'info', :action => :edit_project, :partial => 'projects/edit', :label => :label_project}, - {:name => 'members', :action => :manage_members, :partial => 'projects/settings/members', :label => :label_member_plural}, - {:name => 'issues', :action => :edit_project, :module => :issue_tracking, :partial => 'projects/settings/issues', :label => :label_issue_tracking}, - {:name => 'versions', :action => :manage_versions, :partial => 'projects/settings/versions', :label => :label_version_plural, - :url => {:tab => 'versions', :version_status => params[:version_status], :version_name => params[:version_name]}}, - {:name => 'categories', :action => :manage_categories, :partial => 'projects/settings/issue_categories', :label => :label_issue_category_plural}, - {:name => 'repositories', :action => :manage_repository, :partial => 'projects/settings/repositories', :label => :label_repository_plural}, - {:name => 'boards', :action => :manage_boards, :partial => 'projects/settings/boards', :label => :label_board_plural}, - {:name => 'activities', :action => :manage_project_activities, :partial => 'projects/settings/activities', :label => :label_time_tracking} - ] + tabs = + [ + {:name => 'info', :action => :edit_project, + :partial => 'projects/edit', :label => :label_project}, + {:name => 'members', :action => :manage_members, + :partial => 'projects/settings/members', :label => :label_member_plural}, + {:name => 'issues', :action => :edit_project, :module => :issue_tracking, + :partial => 'projects/settings/issues', :label => :label_issue_tracking}, + {:name => 'versions', :action => :manage_versions, + :partial => 'projects/settings/versions', :label => :label_version_plural, + :url => {:tab => 'versions', :version_status => params[:version_status], + :version_name => params[:version_name]}}, + {:name => 'categories', :action => :manage_categories, + :partial => 'projects/settings/issue_categories', + :label => :label_issue_category_plural}, + {:name => 'repositories', :action => :manage_repository, + :partial => 'projects/settings/repositories', :label => :label_repository_plural}, + {:name => 'boards', :action => :manage_boards, + :partial => 'projects/settings/boards', :label => :label_board_plural}, + {:name => 'activities', :action => :manage_project_activities, + :partial => 'projects/settings/activities', :label => :label_time_tracking} + ] tabs. select {|tab| User.current.allowed_to?(tab[:action], @project)}. select {|tab| tab[:module].nil? || @project.module_enabled?(tab[:module])} -- 2.39.5