3 # Patches to the Redmine core.
6 Dispatcher.to_prepare :redmine_publications do
7 require_dependency 'issue'
9 #Guards against including the module multiple time (like in tests)
10 # and registering multiple callbacks
11 unless Issue.included_modules.include? RedminePublications::IssuePatch
12 Issue.send(:include, RedminePublications::IssuePatch)
15 unless Change.included_modules.include? RedminePublications::ChangePatch
16 Change.send(:include, RedminePublications::ChangePatch)
20 require_dependency 'issue_publication_hook'
22 Redmine::Plugin.register :redmine_publications do
23 name 'Publications managment plugin'
24 author 'Łukasz Rekucki'
25 description 'This plugn helps manage issues related to a publication.'
28 # permission :view_issues_for_publication, :publications => :issues
30 settings :partial => 'settings/publications_settings',
31 :default => { :tracker => '1', :pattern => '.*/[a-z_].xml', :editorurl => 'http://localhost/:pubid'}
33 menu :application_menu, :publications, { :controller => 'publications', :action => 'index' }, :caption => 'Publikacje'
35 # requires_redmine :version_or_higher => '0.8.0'