diff --git a/plugins/sub_organizations/lib/related_organizations_block.rb b/plugins/sub_organizations/lib/related_organizations_block.rb index 7222c69..53622fa 100644 --- a/plugins/sub_organizations/lib/related_organizations_block.rb +++ b/plugins/sub_organizations/lib/related_organizations_block.rb @@ -39,16 +39,6 @@ class RelatedOrganizationsBlock < ProfileListBlock end end - def footer - profile = self.owner - type = self.organization_type - params = {:profile => profile.identifier, :controller => 'sub_organizations_plugin_profile', :action => display_type[:action]} - params[:type] = type if type == 'enterprise' || type == 'community' - proc do - link_to c_('View all'), params.merge(params) - end - end - def related_organizations profile = self.owner organizations = Organization.parents(profile) diff --git a/plugins/sub_organizations/views/blocks/footers/related_organizations.html.erb b/plugins/sub_organizations/views/blocks/footers/related_organizations.html.erb new file mode 100644 index 0000000..f51ed43 --- /dev/null +++ b/plugins/sub_organizations/views/blocks/footers/related_organizations.html.erb @@ -0,0 +1,8 @@ +<%= link_to c_('View all'), + { + profile: block.owner.identifier, + controller: 'sub_organizations_plugin_profile', + action: block.display_type[:action], + type: ((block.organization_type == 'enterprise' || block.organization_type == 'community') ? block.organization_type : nil) + } +%> -- libgit2 0.21.2