-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinit.rb
26 lines (19 loc) · 877 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
Rails.logger.info 'Starting Announcememts plugin for RedMine'
require 'redmine'
Redmine::Plugin.register :redmine_announcements do
name 'Announcements'
author 'Sandeep Kumar / sandeepleo11'
description 'Site wide announcements plugin for Redmine'
version '1.0'
# This plugin adds a project module
# It can be enabled/disabled at project level (Project settings -> Modules)
project_module :announcements do
permission :announcements, :announcements => :index
end
# A new item is added to the project menu
menu :project_menu, :announcements, { :controller => 'announcements', :action => 'index' }, :caption => :label_announcements, :before => :settings, :param => :project_id
end
require 'application_helper_patch'
class RedmineAnnouncementsHook < Redmine::Hook::ViewListener
render_on :view_layouts_base_content, :partial => 'announcements'
end