Commit 310baab65ae4c2908b2cb3ae26568f366b10e1ce

Authored by Gabriela Navarro
Committed by Arthur Esposte
1 parent a014bdb7

Last changes on software communities to remove institution. Ran all tests.

Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
lib/ext/communities_block.rb
@@ -5,15 +5,15 @@ class CommunitiesBlock @@ -5,15 +5,15 @@ class CommunitiesBlock
5 def profile_list 5 def profile_list
6 result = get_visible_profiles 6 result = get_visible_profiles
7 7
8 - list_without_software_and_institution = [] 8 + list_without_software = []
9 9
10 result.each do |profile| 10 result.each do |profile|
11 - if profile.class == Community && !profile.software? && !profile.institution?  
12 - list_without_software_and_institution << profile 11 + if profile.class == Community && !profile.software?
  12 + list_without_software << profile
13 end 13 end
14 end 14 end
15 15
16 - result = list_without_software_and_institution 16 + result = list_without_software
17 17
18 result.slice(0..get_limit-1) 18 result.slice(0..get_limit-1)
19 end 19 end
@@ -46,4 +46,4 @@ class CommunitiesBlock @@ -46,4 +46,4 @@ class CommunitiesBlock
46 end 46 end
47 end 47 end
48 48
49 -end  
50 \ No newline at end of file 49 \ No newline at end of file
  50 +end
lib/software_communities_plugin.rb
@@ -53,7 +53,6 @@ class SoftwareCommunitiesPlugin &lt; Noosfero::Plugin @@ -53,7 +53,6 @@ class SoftwareCommunitiesPlugin &lt; Noosfero::Plugin
53 { 53 {
54 SoftwaresBlock => { :type => [Environment, Person] }, 54 SoftwaresBlock => { :type => [Environment, Person] },
55 SoftwareInformationBlock => { :type => [Community] }, 55 SoftwareInformationBlock => { :type => [Community] },
56 - InstitutionsBlock => { :type => [Environment, Person] },  
57 DownloadBlock => { :type => [Community] }, 56 DownloadBlock => { :type => [Community] },
58 RepositoryBlock => { :type => [Community] }, 57 RepositoryBlock => { :type => [Community] },
59 CategoriesAndTagsBlock => { :type => [Community] }, 58 CategoriesAndTagsBlock => { :type => [Community] },