forked from fanzai0403/rtx_notify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.rb
28 lines (25 loc) · 950 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
27
require 'redmine'
require_dependency 'rtx_issues_hook'
require_dependency 'account_rtx_login'
require_dependency 'user_rtx'
Redmine::Plugin.register :rtx_notify do
name 'Redmine RTX Notify plugin'
author 'Zhang Fan'
description 'Notify user by RTX(rtx.qq.com), when issues added / edited.'
version '0.1.0'
url 'http://web.4399.com'
author_url 'mailto:[email protected]'
requires_redmine :version_or_higher => '2.0.0'
menu :account_menu,
:login_by_rtx,
{ :controller => 'account', :action => 'login_by_rtx'},
:caption => 'RTX_Login',
:after => :login,
:if => Proc.new { RtxIssueHook.get_setting(:login_by_rtx) && !User.current.logged? }
settings :default => {
:add_notify => true,
:edit_notify => true,
:login_by_rtx => true,
:rtx_server_url => 'http://rtx.me4399.com:8012/'
}, :partial => 'settings/rtx_settings'
end