-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinit.rb
More file actions
28 lines (24 loc) · 1010 Bytes
/
init.rb
File metadata and controls
28 lines (24 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require 'redmine'
require 'redmine_textilizable_custom_fields/hooks'
to_prepare = Proc.new do
unless CustomFieldsHelper.included_modules.include?(RedmineTextilizableCustomFields::CustomFieldsHelperPatch)
CustomFieldsHelper.send(:include, RedmineTextilizableCustomFields::CustomFieldsHelperPatch)
end
unless QueriesHelper.included_modules.include?(RedmineTextilizableCustomFields::QueriesHelperPatch)
QueriesHelper.send(:include, RedmineTextilizableCustomFields::QueriesHelperPatch)
end
end
if Redmine::VERSION::MAJOR >= 2
Rails.configuration.to_prepare(&to_prepare)
else
require 'dispatcher'
Dispatcher.to_prepare(:redmine_textilizable_custom_fields, &to_prepare)
end
Redmine::Plugin.register :redmine_textilizable_custom_fields do
name 'Redmine Textilizable Custom Fields plug-in'
author 'Anton Argirov'
author_url 'http://redmine.academ.org'
description 'Adds textilizable support to text and long text custom fields'
url "http://redmine.academ.org"
version '0.0.1'
end