Skip to content

Commit a9e12f1

Browse files
committed
Revert "RDQ2: Temporarily turning off custom workflows."
This reverts commit 822e58ab080414d191297c594d605de02beb17cb.
1 parent 6340352 commit a9e12f1

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

init.rb

+36-36
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
# require 'redmine'
2-
# require 'redmine_custom_workflows/hooks'
3-
#
4-
# to_prepare = Proc.new do
5-
# unless Project.include?(RedmineCustomWorkflows::ProjectPatch)
6-
# Project.send(:include, RedmineCustomWorkflows::ProjectPatch)
7-
# end
8-
# unless ProjectsHelper.include?(RedmineCustomWorkflows::ProjectsHelperPatch)
9-
# ProjectsHelper.send(:include, RedmineCustomWorkflows::ProjectsHelperPatch)
10-
# end
11-
# unless Issue.include?(RedmineCustomWorkflows::IssuePatch)
12-
# Issue.send(:include, RedmineCustomWorkflows::IssuePatch)
13-
# end
14-
# unless ActionView::Base.include?(RedmineCustomWorkflows::Helper)
15-
# ActionView::Base.send(:include, RedmineCustomWorkflows::Helper)
16-
# end
17-
# end
18-
#
19-
# if Redmine::VERSION::MAJOR >= 2
20-
# Rails.configuration.to_prepare(&to_prepare)
21-
# else
22-
# require 'dispatcher'
23-
# Dispatcher.to_prepare(:redmine_custom_workflows, &to_prepare)
24-
# end
25-
#
26-
# Redmine::Plugin.register :redmine_custom_workflows do
27-
# name 'Redmine Custom Workflow plugin'
28-
# author 'Anton Argirov'
29-
# description 'Allows to create custom workflows for issues, defined in the plain Ruby language'
30-
# version '0.0.4'
31-
# url 'http://redmine.academ.org'
32-
#
33-
# menu :admin_menu, :custom_workflows, {:controller => 'custom_workflows', :action => 'index'}, :caption => :label_custom_workflow_plural
34-
#
35-
# permission :manage_project_workflow, {}, :require => :member
36-
# end
1+
require 'redmine'
2+
require 'redmine_custom_workflows/hooks'
3+
4+
to_prepare = Proc.new do
5+
unless Project.include?(RedmineCustomWorkflows::ProjectPatch)
6+
Project.send(:include, RedmineCustomWorkflows::ProjectPatch)
7+
end
8+
unless ProjectsHelper.include?(RedmineCustomWorkflows::ProjectsHelperPatch)
9+
ProjectsHelper.send(:include, RedmineCustomWorkflows::ProjectsHelperPatch)
10+
end
11+
unless Issue.include?(RedmineCustomWorkflows::IssuePatch)
12+
Issue.send(:include, RedmineCustomWorkflows::IssuePatch)
13+
end
14+
unless ActionView::Base.include?(RedmineCustomWorkflows::Helper)
15+
ActionView::Base.send(:include, RedmineCustomWorkflows::Helper)
16+
end
17+
end
18+
19+
if Redmine::VERSION::MAJOR >= 2
20+
Rails.configuration.to_prepare(&to_prepare)
21+
else
22+
require 'dispatcher'
23+
Dispatcher.to_prepare(:redmine_custom_workflows, &to_prepare)
24+
end
25+
26+
Redmine::Plugin.register :redmine_custom_workflows do
27+
name 'Redmine Custom Workflow plugin'
28+
author 'Anton Argirov'
29+
description 'Allows to create custom workflows for issues, defined in the plain Ruby language'
30+
version '0.0.4'
31+
url 'http://redmine.academ.org'
32+
33+
menu :admin_menu, :custom_workflows, {:controller => 'custom_workflows', :action => 'index'}, :caption => :label_custom_workflow_plural
34+
35+
permission :manage_project_workflow, {}, :require => :member
36+
end

0 commit comments

Comments
 (0)