Skip to content

Commit

Permalink
fix setting tab is not displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
haru committed Nov 16, 2024
1 parent 2873923 commit 700b73d
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions lib/wiki_extensions_projects_helper_patch.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Wiki Extensions plugin for Redmine
# Copyright (C) 2009-2021 Haruyuki Iida
# Copyright (C) 2009- Haruyuki Iida
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -18,15 +18,13 @@
require_dependency 'projects_helper'

module WikiExtensionsProjectsHelperPatch
def self.apply
ProjectsController.send :helper, WikiExtensionsProjectsHelperPatch
end

def project_settings_tabs
tabs = super
action = {:name => 'wiki_extensions',
:controller => 'wiki_extensions_settings',
:action => :show,
:partial => 'wiki_extensions_settings/show',
action = {:name => 'wiki_extensions',
:controller => 'wiki_extensions_settings',
:action => :show,
:partial => 'wiki_extensions_settings/show',
:label => :wiki_extensions}

tabs << action if User.current.allowed_to?(action, @project)
Expand All @@ -35,4 +33,4 @@ def project_settings_tabs
end
end


ProjectsHelper.prepend(WikiExtensionsProjectsHelperPatch)

0 comments on commit 700b73d

Please sign in to comment.