Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 68 lines (54 sloc) 2.267 kb
c47e124 @edmagne changed Copyright
edmagne authored
1 # Copyright 2011/2013 Dextra Sistemas
1447146 @edmagne license
edmagne authored
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
e1aa7fc @edmagne adding project on github
edmagne authored
15 require 'redmine'
16
46cbf3c @edmagne Upgrade to support redmine 2.*
edmagne authored
17 ActionDispatch::Callbacks.to_prepare do
58a6648 @edmagne renamed
edmagne authored
18 require_dependency 'issues_poll_hook'
082da1c @edmagne added support to redmine 2.3.1 fixed #18
edmagne authored
19
20 require_dependency 'user'
21 unless User.included_modules.include? IssuesPollUserPatch
22 User.send(:include, IssuesPollUserPatch)
23 end
24
25 require_dependency 'project'
26 unless Project.included_modules.include? IssuesPollProjectPatch
27 Project.send(:include, IssuesPollProjectPatch)
28 end
29
30 require_dependency 'issue'
31 unless Issue.included_modules.include? IssuesPollIssuePatch
32 Issue.send(:include, IssuesPollIssuePatch)
33 end
34
35 if (Redmine::VERSION::MAJOR > 2) || (Redmine::VERSION::MAJOR == 2 && Redmine::VERSION::MINOR >= 3)
36 require_dependency "issue_query"
37 unless IssueQuery.included_modules.include?(IssuesPollQueryPatch)
38 IssueQuery.send(:include, IssuesPollQueryPatch)
39 end
40 else
41 require_dependency "query"
42 unless Query.included_modules.include?(IssuesPollQueryPatch)
43 Query.send(:include, IssuesPollQueryPatch)
44 end
45 end
e1aa7fc @edmagne adding project on github
edmagne authored
46 end
47
58a6648 @edmagne renamed
edmagne authored
48 Redmine::Plugin.register :redmine_issues_poll do
49 name 'Redmine Issues Poll'
e1aa7fc @edmagne adding project on github
edmagne authored
50 author 'Dextra Sistemas'
f3b93bf @edmagne tests
edmagne authored
51 description 'This is a plugin for Redmine to elect issues'
082da1c @edmagne added support to redmine 2.3.1 fixed #18
edmagne authored
52 version '0.2.0'
58a6648 @edmagne renamed
edmagne authored
53 url 'https://github.com/dextra/redmine_issues_poll'
e1aa7fc @edmagne adding project on github
edmagne authored
54 author_url 'http://www.dextra.com.br'
55
58a6648 @edmagne renamed
edmagne authored
56 project_module :issues_poll do
57 permission :issues_poll_config, :polls => [:index, :set_votes, :set_statuses, :update_votes]
58 permission :issues_poll_bet, :polls => [:bet, :cancel_bet]
e1aa7fc @edmagne adding project on github
edmagne authored
59 end
60
48f91f1 @edmagne Update init.rb
edmagne authored
61 menu :project_menu, :issues_poll_menu, { :controller => 'polls', :action => 'index' }, :caption => :issue_polls_caption, :after => :activity, :param => :project_id
c36a673 @edmagne corrections
edmagne authored
62
63 activity_provider :bets
64
e1aa7fc @edmagne adding project on github
edmagne authored
65 end
66
67
Something went wrong with that request. Please try again.