Commit 75101844a6762523d648105f0bebef5a99f1d788
Exists in
send_email_to_admins
and in
5 other branches
Merge branch 'refactor_sub_organizations' into 'master'
Refactor sub_organizations plugin Block The method footer was an instance of a model generating HTML and thus violating MVC. This has been refactored to use the new BoxesHelper structure for view rendering. Here follows a travis build: https://travis-ci.org/rafamanzo/noosfero/builds/126868220 See merge request !883
Showing
2 changed files
with
1 additions
and
10 deletions
Show diff stats
plugins/sub_organizations/lib/related_organizations_block.rb
| ... | ... | @@ -39,16 +39,6 @@ class RelatedOrganizationsBlock < ProfileListBlock |
| 39 | 39 | end |
| 40 | 40 | end |
| 41 | 41 | |
| 42 | - def footer | |
| 43 | - profile = self.owner | |
| 44 | - type = self.organization_type | |
| 45 | - params = {:profile => profile.identifier, :controller => 'sub_organizations_plugin_profile', :action => display_type[:action]} | |
| 46 | - params[:type] = type if type == 'enterprise' || type == 'community' | |
| 47 | - proc do | |
| 48 | - link_to c_('View all'), params.merge(params) | |
| 49 | - end | |
| 50 | - end | |
| 51 | - | |
| 52 | 42 | def related_organizations |
| 53 | 43 | profile = self.owner |
| 54 | 44 | organizations = Organization.parents(profile) | ... | ... |
plugins/sub_organizations/views/blocks/footers/related_organizations.slim
0 → 100644
| ... | ... | @@ -0,0 +1 @@ |
| 1 | += 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) | ... | ... |