To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / plugins / redmine_tags / init.rb @ 1360:45dbcd39b9e9

History | View | Annotate | Download (2.88 KB)

1
# This file is a part of redmine_tags
2
# redMine plugin, that adds tagging support.
3
#
4
# Copyright (c) 2010 Aleksey V Zapparov AKA ixti
5
#
6
# redmine_tags is free software: you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation, either version 3 of the License, or
9
# (at your option) any later version.
10
#
11
# redmine_tags is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
# GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with redmine_tags.  If not, see <http://www.gnu.org/licenses/>.
18

    
19
require 'redmine'
20
require 'redmine_tags'
21

    
22

    
23
Redmine::Plugin.register :redmine_tags do
24
  name        'redmine_tags'
25
  author      'Aleksey V Zapparov AKA "ixti"'
26
  description 'redMine tagging support'
27
  version     '2.0.1-dev'
28
  url         'https://github.com/ixti/redmine_tags/'
29
  author_url  'http://www.ixti.net/'
30

    
31
  requires_redmine :version_or_higher => '1.2.0'
32

    
33
  settings :default => {
34
    :issues_sidebar => 'none',
35
    :issues_show_count => 0,
36
    :issues_open_only => 0,
37
    :issues_sort_by => 'name',
38
    :issues_sort_order => 'asc'
39
  }, :partial => 'tags/settings'
40
end
41

    
42

    
43
ActionDispatch::Callbacks.to_prepare do
44
  require_dependency 'redmine_project_filtering'
45

    
46
  unless Project.included_modules.include?(RedmineTags::Patches::ProjectPatch)
47
    Project.send(:include, RedmineTags::Patches::ProjectPatch)
48
  end
49

    
50
  unless ProjectsHelper.included_modules.include?(RedmineTags::Patches::ProjectsHelperPatch)
51
    ProjectsHelper.send(:include, RedmineTags::Patches::ProjectsHelperPatch)
52
  end
53

    
54
  unless Issue.included_modules.include?(RedmineTags::Patches::IssuePatch)
55
    Issue.send(:include, RedmineTags::Patches::IssuePatch)
56
  end
57

    
58
  unless IssuesHelper.included_modules.include?(RedmineTags::Patches::IssuesHelperPatch)
59
    IssuesHelper.send(:include, RedmineTags::Patches::IssuesHelperPatch)
60
  end
61

    
62
  unless ProjectsController.included_modules.include?(RedmineTags::Patches::ProjectsControllerPatch)
63
    ProjectsController.send(:include, RedmineTags::Patches::ProjectsControllerPatch)
64
  end
65

    
66
  unless AutoCompletesController.included_modules.include?(RedmineTags::Patches::AutoCompletesControllerPatch)
67
    AutoCompletesController.send(:include, RedmineTags::Patches::AutoCompletesControllerPatch)
68
  end
69

    
70
  unless Query.included_modules.include?(RedmineTags::Patches::QueryPatch)
71
    Query.send(:include, RedmineTags::Patches::QueryPatch)
72
  end
73

    
74
  unless QueriesHelper.included_modules.include?(RedmineTags::Patches::QueriesHelperPatch)
75
    QueriesHelper.send(:include, RedmineTags::Patches::QueriesHelperPatch)
76
  end
77
end
78

    
79

    
80
require 'redmine_tags/hooks/model_issue_hook'
81
require 'redmine_tags/hooks/views_issues_hook'
82
require 'redmine_tags/hooks/views_projects_hook'
83