forked from edavis10/redmine_blogs
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinit.rb
37 lines (29 loc) · 1.16 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
require 'redmine'
require 'redmine_acts_as_taggable_on/initialize'
require 'application_helper_global_patch'
require 'comment_patch'
require 'view_account_left_middle_hook'
# Patches to the Redmine core.
Rails.configuration.to_prepare do
require_dependency 'comment'
Comment.send(:include, RedmineBlogs::CommentPatch)
require_dependency 'application_helper'
ApplicationHelper.send(:include, RedmineBlogs::ApplicationHelperGlobalPatch)
end
Redmine::Plugin.register :redmine_blogs do
name 'Redmine Blogs plugin'
author 'A. Chaika, Kyanh, Eric Davis'
description 'Redmine Blog plugin'
version '0.5.0'
requires_redmine :version_or_higher => '2.2.0'
requires_acts_as_taggable_on
project_module :blogs do
permission :manage_blogs, {:blogs => [:new, :create, :edit, :destroy]}, :require => :member
permission :comment_blogs, {:blogs => [:add_comment, :destroy_comment]}
permission :view_blogs, {:blogs => [:index, :preview, :show, :history]}
end
menu :project_menu, :blogs, {:controller => 'blogs', :action => 'index'},
:caption => 'Blogs', :after => :news, :param => :project_id
activity_provider :blogs
Redmine::Search.register :blogs
end