-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.rb
31 lines (25 loc) · 996 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
28
29
30
31
require 'redmine'
Redmine::Plugin.register :redmine_incoming_mail_log do
name 'Redmine Incoming Mail Log plugin'
author 'Alex Shulgin <[email protected]>'
description 'A plugin to record incoming mails and statuses of handling them.'
version '0.2.0'
url 'http://github.com/commandprompt/redmine_incoming_mail_log'
# author_url 'http://example.com/about'
menu :admin_menu, :incoming_mails,
{ :controller => 'incoming_mails', :action => 'index' },
:caption => :label_incoming_mail_plural,
:html => { :class => 'incoming_mails' }
settings :default => {},
:partial => 'settings/redmine_incoming_mail_log_settings'
end
prepare_block = Proc.new do
MailHandler.send(:include, RedmineIncomingMailLog::MailHandlerPatch)
Mailer.send(:include, RedmineIncomingMailLog::MailerPatch)
end
if Rails.env.development?
ActionDispatch::Reloader.to_prepare { prepare_block.call }
else
prepare_block.call
end
require_dependency 'redmine_incoming_mail_log/view_hooks'