summaryrefslogtreecommitdiffstats
path: root/app/helpers/projects_helper.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-09 17:57:35 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-09 17:57:35 +0000
commit2738389fbd8654bf1ee5ddc94fda218eb8f92552 (patch)
tree17e904f9b7082a30b72837087473ca3d7129c36d /app/helpers/projects_helper.rb
parent82c0eaadc3011e9417dc2740f7df2e4082ae1a33 (diff)
downloadredmine-2738389fbd8654bf1ee5ddc94fda218eb8f92552.tar.gz
redmine-2738389fbd8654bf1ee5ddc94fda218eb8f92552.zip
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
Diffstat (limited to 'app/helpers/projects_helper.rb')
-rw-r--r--app/helpers/projects_helper.rb32
1 files changed, 22 insertions, 10 deletions
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])}