forked from Lamar/redmine_vote
-
Notifications
You must be signed in to change notification settings - Fork 5
/
init.rb
26 lines (23 loc) · 838 Bytes
/
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
require 'redmine'
require 'dispatcher'
require 'issue_vote_patch'
require 'query_vote_patch'
Dispatcher.to_prepare do
Issue.send(:include, IssueVotePatch)
Query.send(:include, QueryVotePatch)
end
require_dependency 'issues_vote_hook'
Redmine::Plugin.register :redmine_vote do
name 'Redmine Vote plugin'
author 'Andrew Chaika'
description 'Issue Vote Plugin'
version '0.0.3'
project_module :issue_voting do
permission :vote_issue, {:issues => :vote}, :require => :loggedin
permission :view_votes, {:issues => :view_votes}, :require => :loggedin
permission :view_voter, {:issues => :view_voter}, :require => :loggedin
end
end
class RedmineVoteListener < Redmine::Hook::ViewListener
render_on :view_layouts_base_html_head, :inline => "<%= stylesheet_link_tag 'stylesheet', :plugin => 'redmine_vote' %>"
end