-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathinit.rb
32 lines (27 loc) · 1.12 KB
/
init.rb
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
28
29
30
31
32
require 'redmine'
require_dependency 'project_alias_hook'
Rails.logger.info 'Starting Project Alias 2 plugin for Redmine'
Rails.configuration.to_prepare do
unless String.method_defined?(:html_safe)
String.send(:include, AliasStringHTMLSafePatch)
end
unless Project.included_modules.include?(AliasProjectPatch)
Project.send(:include, AliasProjectPatch)
end
unless ApplicationHelper.included_modules.include?(AliasApplicationHelperPatch)
ApplicationHelper.send(:include, AliasApplicationHelperPatch)
end
end
Redmine::Plugin.register :redmine_project_alias_2 do
name 'Project Alias 2'
author 'Andriy Lesyuk, Tobias Fischer'
description 'Allows adding project identifier aliases or renaming of project identifiers.'
url 'https://github.com/paginagmbh/redmine_project-alias-2'
version '1.1.1'
requires_redmine :version_or_higher => '4.0'
menu :admin_menu, :project_aliases,
{ :controller => 'project_aliases', :action => 'index' },
:caption => :label_alias_plural,
:after => :projects,
html: { class: 'icon icon-project_aliases' }
end