-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.rb
26 lines (22 loc) · 979 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
require 'redmine'
require 'embedded'
Redmine::Plugin.register :embedded do
name 'Embedded'
author 'Jean-Philippe Lang'
description 'Embed various documentations in your projects'
version '0.0.1'
settings :default => { 'path' => '/var/doc/{PROJECT}/html',
'index' => 'main.html overview-summary.html index.html',
'extensions' => 'html png gif',
'template' => '',
'encoding' => '',
'menu' => 'Embedded' },
:partial => 'settings/embedded'
project_module :embedded do
permission :view_embedded_doc, {:embedded => :index}
end
menu :project_menu, :embedded, { :controller => 'embedded', :action => 'index' },
:caption => Proc.new { Setting.plugin_embedded['menu'] },
:if => Proc.new { !Setting.plugin_embedded['menu'].blank? },
:param => :project_id
end