This repository has been archived by the owner on Jun 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit.rb
41 lines (36 loc) · 1.63 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
# Calendar Importer - plugin for redmine project management software
# Copyright (C) 2007-2012 Blend Interactive
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Empty redmine plguin
require 'redmine'
# TODO: Change this to use the name of your plugin
RAILS_DEFAULT_LOGGER.info 'Starting Calendar Import plugin for RedMine'
# TODO: Change the name
Redmine::Plugin.register :calendar_import do
name 'Calendar Import'
author 'Blend Interactive'
description 'This to allow users to create time entries and issues directly from the calendar system they are using.'
version '0.1.0'
menu(:top_menu, :calendar_imports, {:controller => "calendar_imports", :action => 'index'}, :caption => 'Calendar Import', :if => Proc.new{ User.current.logged? })
end
require 'dispatcher'
Dispatcher.to_prepare :calendar_import_plugin do
require_dependency 'principal'
require_dependency 'user'
require_dependency 'project'
User.send(:include,UserCalendarsPatch)
Project.send(:include,ProjectPatch)
end