Commit 1eeb5ddbc0adc58cb851990b02a4b97008499dbe

Authored by Daniela Feitosa
1 parent 5188eefd

Fix link to community when there are 2 environments

The link on search was being generated with link_to_homepage, that uses
=Profile['identifier']=, so when there were two communities with the
same identifier on two different environments, the link to the community
on both environments was pointing always to the same community, ignoring
the environment of the community clicked.
src/noosfero-spb/software_communities/views/search/_full_community.html.erb
... ... @@ -12,18 +12,18 @@
12 12  
13 13 <div class="search-software-item-column-right">
14 14 <div class="search-software-profile-img">
15   - <%= link_to_homepage(profile_image(community, :portrait), community.identifier) %>
  15 + <%= link_to(profile_image(community, :portrait), community.url) %>
16 16 </div>
17 17  
18 18 <div class="search-software-content-block">
19 19 <% link_name = software.acronym.blank? ? community.name : "#{software.acronym} - #{community.name}" %>
20 20 <h4>
21   - <%= link_to_homepage(link_name, community.identifier) %>
  21 + <%= link_to(link_name, community.url) %>
22 22 </h4>
23 23  
24 24 <div class="search-content-description">
25 25 <% body_stripped = strip_tags(software.finality) %>
26   - <%= link_to_homepage(excerpt(body_stripped, body_stripped.first(3), 200), community.identifier) if body_stripped %>
  26 + <%= link_to(excerpt(body_stripped, body_stripped.first(3), 200), community.url) if body_stripped %>
27 27 </div>
28 28  
29 29 <div class="search-software-categories">
... ...