forked from ameya86/redmine_already_read
-
Notifications
You must be signed in to change notification settings - Fork 4
/
init.rb
26 lines (22 loc) · 1014 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_dependency 'already_read_lib'
Rails.application.config.to_prepare do
unless Issue.include?(AlreadyReadLib::IssuePatch)
Issue.send(:include, AlreadyReadLib::IssuePatch)
IssuesController.send(:include, AlreadyReadLib::IssuesControllerPatch)
User.send(:include, AlreadyReadLib::UserPatch)
IssueQuery.add_available_column(QueryColumn.new(:already_read))
IssueQuery.add_available_column(QueryColumn.new(:already_read_date))
IssueQuery.send(:include, AlreadyReadLib::IssueQueryPatch)
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/egisz/redmine_already_read'
#author_url 'http://blog.livedoor.jp/ameya86/'
# Nepadeda, nes neperduoda kazkodel projekto :(
# Redmine::AccessControl.permission(:view_issues).actions << "issues/bulk_set_read"
activity_provider :issues, :class_name => 'AlreadyRead', :default => false
end