annotate .svn/pristine/80/806fc15a74f68aa08e1189f7dd28e0b1f084bd22.svn-base @ 1298:4f746d8966dd redmine_2.3_integration

Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author Chris Cannam
date Fri, 14 Jun 2013 09:28:30 +0100
parents 622f24f53b42
children
rev   line source
Chris@1295 1 Rails.logger.info 'Starting Example plugin for RedMine'
Chris@1295 2
Chris@1295 3 Redmine::Plugin.register :sample_plugin do
Chris@1295 4 name 'Example plugin'
Chris@1295 5 author 'Author name'
Chris@1295 6 description 'This is a sample plugin for Redmine'
Chris@1295 7 version '0.0.1'
Chris@1295 8 settings :default => {'sample_setting' => 'value', 'foo'=>'bar'}, :partial => 'settings/sample_plugin_settings'
Chris@1295 9
Chris@1295 10 # This plugin adds a project module
Chris@1295 11 # It can be enabled/disabled at project level (Project settings -> Modules)
Chris@1295 12 project_module :example_module do
Chris@1295 13 # A public action
Chris@1295 14 permission :example_say_hello, {:example => [:say_hello]}, :public => true
Chris@1295 15 # This permission has to be explicitly given
Chris@1295 16 # It will be listed on the permissions screen
Chris@1295 17 permission :example_say_goodbye, {:example => [:say_goodbye]}
Chris@1295 18 # This permission can be given to project members only
Chris@1295 19 permission :view_meetings, {:meetings => [:index, :show]}, :require => :member
Chris@1295 20 end
Chris@1295 21
Chris@1295 22 # A new item is added to the project menu
Chris@1295 23 menu :project_menu, :sample_plugin, { :controller => 'example', :action => 'say_hello' }, :caption => 'Sample'
Chris@1295 24
Chris@1295 25 # Meetings are added to the activity view
Chris@1295 26 activity_provider :meetings
Chris@1295 27 end