Mercurial > hg > soundsoftware-site
comparison vendor/plugins/redmine_bibliography/init.rb @ 1081:b56a4c5afa35 bug_531
Merge from branch cannam
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Thu, 22 Nov 2012 17:26:15 +0000 |
parents | fe32745aaa3d |
children | 5bd8c86cfa6a |
comparison
equal
deleted
inserted
replaced
1018:d78b06240b73 | 1081:b56a4c5afa35 |
---|---|
1 require 'redmine' | 1 require 'redmine' |
2 require 'dispatcher' | 2 require 'dispatcher' |
3 | 3 |
4 RAILS_DEFAULT_LOGGER.info 'Starting Bibliography Plugin for RedMine' | 4 require 'bibtex' |
5 require 'citeproc' | |
5 | 6 |
6 # Patches to the Redmine core. | 7 # Patches to the Redmine core. |
7 Dispatcher.to_prepare :redmine_model_dependencies do | 8 Dispatcher.to_prepare :redmine_model_dependencies do |
8 require_dependency 'project' | 9 require_dependency 'project' |
9 require_dependency 'user' | 10 require_dependency 'user' |
19 | 20 |
20 unless Mailer.included_modules.include? Bibliography::MailerPatch | 21 unless Mailer.included_modules.include? Bibliography::MailerPatch |
21 Mailer.send(:include, Bibliography::MailerPatch) | 22 Mailer.send(:include, Bibliography::MailerPatch) |
22 end | 23 end |
23 | 24 |
24 | 25 unless ProjectsHelper.included_modules.include?(Bibliography::ProjectsHelperPatch) |
26 ProjectsHelper.send(:include, Bibliography::ProjectsHelperPatch) | |
27 end | |
25 end | 28 end |
26 | 29 |
27 | 30 |
28 # Plugin Info | 31 # Plugin Info |
29 Redmine::Plugin.register :redmine_bibliography do | 32 Redmine::Plugin.register :redmine_bibliography do |
45 end | 48 end |
46 | 49 |
47 # extending the Project Menu | 50 # extending the Project Menu |
48 menu :project_menu, :publications, { :controller => 'publications', :action => 'index', :path => nil }, :after => :activity, :param => :project_id, :caption => Proc.new { Setting.plugin_redmine_bibliography['menu'] }, | 51 menu :project_menu, :publications, { :controller => 'publications', :action => 'index', :path => nil }, :after => :activity, :param => :project_id, :caption => Proc.new { Setting.plugin_redmine_bibliography['menu'] }, |
49 :if => Proc.new { !Setting.plugin_redmine_bibliography['menu'].blank? } | 52 :if => Proc.new { !Setting.plugin_redmine_bibliography['menu'].blank? } |
50 | 53 |
51 end | 54 end |