forked from incas3/redmine_doc_pu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
executable file
·34 lines (27 loc) · 1.25 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
# DocPu plugin
require 'redmine'
# Patches to the Redmine core. Will not work in development mode
require_dependency 'wiki_page_patch'
RAILS_DEFAULT_LOGGER.info "Loading DocPu plugin..."
TEMPLATE_DIR = "./vendor/plugins/redmine_doc_pu/templates"
Redmine::Plugin.register :redmine_doc_pu do
name "Redmine DocPu plugin"
author "Christian Raschko"
description "A wiki export and document publishing tool, sponsored by: ATV-Elektronik"
version "0.0.2"
url "http://atv-elektronik.co.at/"
# Settings
settings :default => {"latex_bin" => "pdflatex", "makeindex_bin" => "makeindex", "template_dir" => TEMPLATE_DIR},
:partial => "settings/doc_pu_settings"
# Redmine version
requires_redmine :version_or_higher => "0.9.0"
# Create project module
project_module :doc_pu do
permission :doc_pu_view, {:doc_pu => [:index, :open], :doc_pu_wiki => [:index]}
permission :doc_pu_build, :doc_pu => [:build, :build_remote, :clean, :clean_remote, :code]
permission :doc_pu_edit, {:doc_pu => [:new, :edit, :delete, :template], :doc_pu_wiki => [:new, :edit, :delete, :edit_order]}
end
# Add a new item to the project menu
menu :project_menu, :doc_pu_menu, {:controller => "doc_pu", :action => "index"},
:caption => :menu_publish, :after => :wiki, :param => :project_id
end