forked from egisz/redmine_already_read
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
26 lines (22 loc) · 1.04 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
require_dependency 'redmine_already_read'
Rails.application.config.to_prepare do
Dir[File.dirname(__FILE__) +"/lib/redmine_already_read/*.rb"].each {|file| require file }
unless Issue.include?(RedmineAlreadyRead::IssuePatch)
Issue.send(:include, RedmineAlreadyRead::IssuePatch)
IssuesController.send(:include, RedmineAlreadyRead::IssuesControllerPatch)
User.send(:include, RedmineAlreadyRead::UserPatch)
IssueQuery.add_available_column(QueryColumn.new(:already_read))
IssueQuery.add_available_column(QueryColumn.new(:already_read_date))
IssueQuery.send(:include, RedmineAlreadyRead::IssueQueryPatch)
MyHelper.send(:include, RedmineAlreadyRead::MyHelperPatch)
end
end
Redmine::Plugin.register :redmine_already_read do
name 'Redmine Already Read plugin'
author 'OZAWA Yasuhiro'
description 'Markup read issues.'
version '0.0.5'
url 'https://github.com/exocad/redmine_already_read'
# Nepadeda, nes neperduoda kazkodel projekto :(
# Redmine::AccessControl.permission(:view_issues).actions << "issues/bulk_set_read"
end