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