To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / vendor / plugins / redmine_bibliography / init.rb @ 455:9761ee24f31d

History | View | Annotate | Download (1.28 KB)

1 298:a41158bde9e0 luis
require 'redmine'
2 454:2f1a308c4c11 luis
require 'dispatcher'
3
4 455:9761ee24f31d luis
RAILS_DEFAULT_LOGGER.info 'Starting Bibliography Plugin for RedMine'
5 454:2f1a308c4c11 luis
6
# Patches to the Redmine core.
7
Dispatcher.to_prepare :redmine_model_dependencies do
8
  require_dependency 'project'
9
10
  unless Project.included_modules.include? Bibliography::ProjectPublicationsPatch
11
    Project.send(:include, Bibliography::ProjectPublicationsPatch)
12
  end
13
end
14 298:a41158bde9e0 luis
15 455:9761ee24f31d luis
16
# Plugin Info
17 298:a41158bde9e0 luis
Redmine::Plugin.register :redmine_bibliography do
18
  name 'Redmine Bibliography plugin'
19
  author 'Chris Cannam, Luis Figueira'
20 455:9761ee24f31d luis
  description 'This is a bibliography management plugin for Redmine'
21 298:a41158bde9e0 luis
  version '0.0.1'
22
  url 'http://example.com/path/to/plugin'
23
  author_url 'http://example.com/about'
24 376:ad71d0604ac2 luis
25 455:9761ee24f31d luis
  settings :default => { 'menu' => 'Bibliography' }, :partial => 'settings/bibliography'
26 454:2f1a308c4c11 luis
27 455:9761ee24f31d luis
  project_module :redmine_bibliography do
28
    permission :publications, { :publications => :index }, :public => true
29
    permission :edit_redmine_bibliography, {:redmine_bibliography => [:index, :edit]}
30
  end
31 454:2f1a308c4c11 luis
32 455:9761ee24f31d luis
  # extending the Project Menu
33
  menu :project_menu, :publications, { :controller => 'publications', :action => 'index', :path => nil }, :after => :activity, :caption => Proc.new { Setting.plugin_redmine_bibliography['menu'] },
34
   :if => Proc.new { !Setting.plugin_redmine_bibliography['menu'].blank? }
35
36
end