Commit cfe84a0160da0dfb1d34b4f731ecdf2b0decc8e6
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'stable' of gitlab.com:participa/noosfero into stable
Showing
3 changed files
with
3 additions
and
0 deletions
Show diff stats
plugins/community_hub/lib/community_hub_plugin.rb
| @@ -13,6 +13,7 @@ class CommunityHubPlugin < Noosfero::Plugin | @@ -13,6 +13,7 @@ class CommunityHubPlugin < Noosfero::Plugin | ||
| 13 | end | 13 | end |
| 14 | 14 | ||
| 15 | def content_types | 15 | def content_types |
| 16 | + return [] if !context.kind_of?(CmsController) | ||
| 16 | if context.respond_to?(:params) && context.params | 17 | if context.respond_to?(:params) && context.params |
| 17 | types = [] | 18 | types = [] |
| 18 | types << CommunityHubPlugin::Hub if context.profile.community? | 19 | types << CommunityHubPlugin::Hub if context.profile.community? |
plugins/dspace/lib/dspace_plugin.rb
| @@ -9,6 +9,7 @@ class DspacePlugin < Noosfero::Plugin | @@ -9,6 +9,7 @@ class DspacePlugin < Noosfero::Plugin | ||
| 9 | end | 9 | end |
| 10 | 10 | ||
| 11 | def content_types | 11 | def content_types |
| 12 | + return [] if !context.kind_of?(CmsController) | ||
| 12 | if context.respond_to?(:params) && context.params | 13 | if context.respond_to?(:params) && context.params |
| 13 | types = [] | 14 | types = [] |
| 14 | parent_id = context.params[:parent_id] | 15 | parent_id = context.params[:parent_id] |
plugins/work_assignment/lib/work_assignment_plugin.rb
| @@ -18,6 +18,7 @@ class WorkAssignmentPlugin < Noosfero::Plugin | @@ -18,6 +18,7 @@ class WorkAssignmentPlugin < Noosfero::Plugin | ||
| 18 | end | 18 | end |
| 19 | 19 | ||
| 20 | def content_types | 20 | def content_types |
| 21 | + return [] if !context.kind_of?(CmsController) | ||
| 21 | [WorkAssignmentPlugin::WorkAssignment] if context.respond_to?(:profile) && context.profile.organization? | 22 | [WorkAssignmentPlugin::WorkAssignment] if context.respond_to?(:profile) && context.profile.organization? |
| 22 | end | 23 | end |
| 23 | 24 |