From e8c3e1a9cf6e0aec10d8cfcbcc1f3d09dace560b Mon Sep 17 00:00:00 2001 From: Anton Argirov Date: Tue, 17 Jan 2017 20:14:41 +0700 Subject: [PATCH] Compatibility with ER 2017 --- init.rb | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/init.rb b/init.rb index 29facc5..8248f92 100644 --- a/init.rb +++ b/init.rb @@ -1,4 +1,18 @@ require 'redmine' + +Redmine::Plugin.register :redmine_custom_workflows do + name 'Redmine Custom Workflow plugin' + author 'Anton Argirov' + description 'Allows to create custom workflows for issues, defined in the plain Ruby language' + version '0.1.6' + url 'http://www.redmine.org/plugins/custom-workflows' + + menu :admin_menu, :custom_workflows, {:controller => 'custom_workflows', :action => 'index'}, + :if => Proc.new { User.current.admin? }, :caption => :label_custom_workflow_plural + + permission :manage_project_workflow, {}, :require => :member +end + require 'redmine_custom_workflows/hooks' Rails.application.config.to_prepare do @@ -38,17 +52,4 @@ Rails.application.config.to_prepare do unless ActionView::Base.include?(RedmineCustomWorkflows::Helper) ActionView::Base.send(:include, RedmineCustomWorkflows::Helper) end -end - -Redmine::Plugin.register :redmine_custom_workflows do - name 'Redmine Custom Workflow plugin' - author 'Anton Argirov' - description 'Allows to create custom workflows for issues, defined in the plain Ruby language' - version '0.1.6' - url 'http://www.redmine.org/plugins/custom-workflows' - - menu :admin_menu, :custom_workflows, {:controller => 'custom_workflows', :action => 'index'}, - :if => Proc.new { User.current.admin? }, :caption => :label_custom_workflow_plural - - permission :manage_project_workflow, {}, :require => :member -end +end \ No newline at end of file