|
1 | NO CONTENT: file renamed from extra/sample_plugin/app/views/settings/_settings.rhtml to extra/sample_plugin/app/views/settings/_sample_plugin_settings.rhtml |
@@ -1,30 +1,30 | |||
|
1 | 1 | # Redmine sample plugin |
|
2 | 2 | require 'redmine' |
|
3 | 3 | |
|
4 | 4 | RAILS_DEFAULT_LOGGER.info 'Starting Example plugin for RedMine' |
|
5 | 5 | |
|
6 | 6 | Redmine::Plugin.register :sample_plugin do |
|
7 | 7 | name 'Example plugin' |
|
8 | 8 | author 'Author name' |
|
9 | 9 | description 'This is a sample plugin for Redmine' |
|
10 | 10 | version '0.0.1' |
|
11 | settings :default => {'sample_setting' => 'value', 'foo'=>'bar'}, :partial => 'settings/settings' | |
|
11 | settings :default => {'sample_setting' => 'value', 'foo'=>'bar'}, :partial => 'settings/sample_plugin_settings' | |
|
12 | 12 | |
|
13 | 13 | # This plugin adds a project module |
|
14 | 14 | # It can be enabled/disabled at project level (Project settings -> Modules) |
|
15 | 15 | project_module :example_module do |
|
16 | 16 | # A public action |
|
17 | 17 | permission :example_say_hello, {:example => [:say_hello]}, :public => true |
|
18 | 18 | # This permission has to be explicitly given |
|
19 | 19 | # It will be listed on the permissions screen |
|
20 | 20 | permission :example_say_goodbye, {:example => [:say_goodbye]} |
|
21 | 21 | # This permission can be given to project members only |
|
22 | 22 | permission :view_meetings, {:meetings => [:index, :show]}, :require => :member |
|
23 | 23 | end |
|
24 | 24 | |
|
25 | 25 | # A new item is added to the project menu |
|
26 | 26 | menu :project_menu, :sample_plugin, { :controller => 'example', :action => 'say_hello' }, :caption => 'Sample' |
|
27 | 27 | |
|
28 | 28 | # Meetings are added to the activity view |
|
29 | 29 | activity_provider :meetings |
|
30 | 30 | end |
General Comments 0
You need to be logged in to leave comments.
Login now