anteo / redmine_custom_workflows

Allows to create custom workflows for Redmine
http://www.redmine.org/plugins/custom-workflows
GNU General Public License v2.0
182 stars 72 forks source link

Other plugins project settings tab disappear #231

Closed WalronGabor closed 3 years ago

WalronGabor commented 3 years ago

Dear Anteo,

I have a probrem when I installed the plugin: my others plugins project settings tabs are disappear.

I modified your projects_helper_patch.rb file, and it fix the problem.

My version:

require_dependency 'projects_helper'

module RedmineCustomWorkflows module Patches module ProjectsHelperPatch extend ActiveSupport::Concern

  included do
    prepend InstanceOverwriteMethods
  end

  module InstanceOverwriteMethods
  def project_settings_tabs
      tabs = super

      action = {:name => 'custom_workflows', 
          :action => :manage_project_workflow, 
          :partial => 'projects/settings/custom_workflow', 
          :label => :label_custom_workflow_plural}

      tabs << action if User.current.allowed_to?(:manage_project_workflow, @project)

      tabs
  end
end
end

end end

if Redmine::Plugin.installed?(:easy_extensions) RedmineExtensions::PatchManager.register_helper_patch 'ProjectsHelper', 'RedmineCustomWorkflows::Patches::ProjectsHelperPatch', prepend: true else ProjectsHelper.send(:include, RedmineCustomWorkflows::Patches::ProjectsHelperPatch) end

I hope You like it, and it will be in your next version.

picman commented 3 years ago

Which other plugins do you use?

WalronGabor commented 3 years ago

In my case I didn't see our plugin's and the Redmine Wiki Extensions plugin's (https://github.com/haru/redmine_wiki_extensions) Project Settings Tab.

picman commented 3 years ago

https://github.com/haru/redmine_wiki_extensions/pull/28