Commit ee8510cb1fdf394809925e881408cd387e08067a
1 parent
f3f08e74
Exists in
profile_api_improvements
and in
1 other branch
custom_domain: Add profile to some plugins' control panel
Showing
4 changed files
with
7 additions
and
3 deletions
Show diff stats
lib/noosfero/plugin.rb
plugins/analytics/lib/analytics_plugin/base.rb
| ... | ... | @@ -42,7 +42,7 @@ class AnalyticsPlugin::Base < Noosfero::Plugin |
| 42 | 42 | { |
| 43 | 43 | title: I18n.t('analytics_plugin.lib.plugin.panel_button'), |
| 44 | 44 | icon: 'analytics-access', |
| 45 | - url: {controller: 'analytics_plugin/stats', action: :index} | |
| 45 | + url: {controller: 'analytics_plugin/stats', profile: profile.identifier, action: :index} | |
| 46 | 46 | } |
| 47 | 47 | end |
| 48 | 48 | ... | ... |
plugins/custom_forms/lib/custom_forms_plugin.rb
| ... | ... | @@ -13,7 +13,7 @@ class CustomFormsPlugin < Noosfero::Plugin |
| 13 | 13 | end |
| 14 | 14 | |
| 15 | 15 | def control_panel_buttons |
| 16 | - {:title => _('Manage Forms'), :icon => 'custom-forms', :url => {:controller => 'custom_forms_plugin_myprofile'}} | |
| 16 | + {title: _('Manage Forms'), icon: 'custom-forms', url: {profile: profile.identifier, controller: 'custom_forms_plugin_myprofile'}} | |
| 17 | 17 | end |
| 18 | 18 | |
| 19 | 19 | end | ... | ... |
plugins/sub_organizations/lib/sub_organizations_plugin.rb
| ... | ... | @@ -20,7 +20,7 @@ class SubOrganizationsPlugin < Noosfero::Plugin |
| 20 | 20 | |
| 21 | 21 | def control_panel_buttons |
| 22 | 22 | if context.profile.organization? && Organization.parents(context.profile).blank? |
| 23 | - { :title => _('Manage sub-groups'), :icon => 'groups', :url => {:controller => 'sub_organizations_plugin_myprofile'} } | |
| 23 | + { title: _('Manage sub-groups'), icon: 'groups', url: {profile: profile.identifier, controller: :sub_organizations_plugin_myprofile} } | |
| 24 | 24 | end |
| 25 | 25 | end |
| 26 | 26 | ... | ... |