Chris@1115: Rails.logger.info 'Starting Example plugin for RedMine' Chris@0: Chris@0: Redmine::Plugin.register :sample_plugin do Chris@0: name 'Example plugin' Chris@0: author 'Author name' Chris@0: description 'This is a sample plugin for Redmine' Chris@0: version '0.0.1' Chris@0: settings :default => {'sample_setting' => 'value', 'foo'=>'bar'}, :partial => 'settings/sample_plugin_settings' Chris@0: Chris@0: # This plugin adds a project module Chris@0: # It can be enabled/disabled at project level (Project settings -> Modules) Chris@0: project_module :example_module do Chris@0: # A public action Chris@0: permission :example_say_hello, {:example => [:say_hello]}, :public => true Chris@0: # This permission has to be explicitly given Chris@0: # It will be listed on the permissions screen Chris@0: permission :example_say_goodbye, {:example => [:say_goodbye]} Chris@0: # This permission can be given to project members only Chris@0: permission :view_meetings, {:meetings => [:index, :show]}, :require => :member Chris@0: end Chris@0: Chris@0: # A new item is added to the project menu Chris@0: menu :project_menu, :sample_plugin, { :controller => 'example', :action => 'say_hello' }, :caption => 'Sample' Chris@1115: Chris@0: # Meetings are added to the activity view Chris@0: activity_provider :meetings Chris@0: end