forked from jcppkkk/redmine_mail_reminder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.rb
46 lines (36 loc) · 1.51 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
require 'redmine'
require 'active_support/core_ext'
# This plugin should be reloaded in development mode.
if Rails.env == 'development'
ActiveSupport::Dependencies.autoload_once_paths.reject!{|x| x =~ /^#{Regexp.escape(File.dirname(__FILE__))}/}
end
# Tentative de faire fonctionner le plugin sous Rails 3
ActionDispatch::Callbacks.to_prepare do
# use require_dependency if you plan to utilize development mode
require 'boards_watchers_patches'
end
ActionMailer::Base.default :skip_premailer => true
Redmine::Plugin.register :redmine_issue_reminder do
name 'Redmine Issue Reminder plugin'
author 'Ascendro S.R.L'
description 'Issue reminder plugin for Redmine'
version '0.0.1'
url 'https://github.com/ascendro/redmine_issue_reminder'
author_url 'http://www.ascendro.ro/'
permission :view_issue_reminder, :issue_reminders => :index
settings( :default => { 'email_subject' => :default_email_subject},
:partial => 'reminder_settings/issue_reminder_settings')
project_module :issue_reminder do
permission :view_issue_reminder, :issue_reminders => :index
end
if_proc = Proc.new{|project| project.enabled_module_names.include?('issue_reminder')}
menu :project_menu,
:issue_reminder,
{ :controller => 'issue_reminders', :action => 'index' },
:caption => :issues_reminder,
:last => true,
#:after => :activity,
:param => :project_id,
:if => if_proc
# menu :application_menu, :issue_reminder, { :controller => 'reminders', :action => 'index' }, :caption => :usses_reminder
end