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 / vendor / plugins / redmine_tags / init.rb @ 729:291c4d7dc0b6

History | View | Annotate | Download (2.43 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
config.gem "acts-as-taggable-on", :version => '2.0.6'
20

    
21
require 'redmine'
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     '1.1.4'
28
  url         'http://www.ixti.ru/'
29
  author_url  'http://www.ixti.ru/'
30

    
31
  requires_redmine :version_or_higher => '1.0.0'
32

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

    
40

    
41
require 'dispatcher'
42

    
43
Dispatcher.to_prepare :redmine_tags do
44
  unless Project.included_modules.include?(RedmineTags::Patches::ProjectPatch)
45
    Project.send(:include, RedmineTags::Patches::ProjectPatch)
46
  end
47

    
48
  unless Issue.included_modules.include?(RedmineTags::Patches::IssuePatch)
49
    Issue.send(:include, RedmineTags::Patches::IssuePatch)
50
  end
51

    
52
  unless IssuesHelper.included_modules.include?(RedmineTags::Patches::IssuesHelperPatch)
53
    IssuesHelper.send(:include, RedmineTags::Patches::IssuesHelperPatch)
54
  end
55

    
56
  unless AutoCompletesController.included_modules.include?(RedmineTags::Patches::AutoCompletesControllerPatch)
57
    AutoCompletesController.send(:include, RedmineTags::Patches::AutoCompletesControllerPatch)
58
  end
59

    
60
  unless Query.included_modules.include?(RedmineTags::Patches::QueryPatch)
61
    Query.send(:include, RedmineTags::Patches::QueryPatch)
62
  end
63

    
64
  unless QueriesHelper.included_modules.include?(RedmineTags::Patches::QueriesHelperPatch)
65
    QueriesHelper.send(:include, RedmineTags::Patches::QueriesHelperPatch)
66
  end
67
end
68

    
69

    
70
require 'redmine_tags/hooks/model_issue_hook'
71
require 'redmine_tags/hooks/views_issues_hook'
72
require 'redmine_tags/hooks/views_projects_hook'
73