communities.html.erb
1.05 KB
<% if block.owner.kind_of?(Profile) || block.owner.kind_of?(Environment) %>
<% if block.owner.kind_of?(Profile) %>
<%= link_to s_('communities|View all'), {:profile => block.owner.identifier, :controller => 'profile', :action => 'communities'}, :class => 'view-all' %>
<% elsif block.owner.kind_of?(Environment) %>
<%= link_to s_('communities|View all'), {:controller => 'search', :action => 'communities'}, :class => 'view-all' %>
<% end %>
<% if user && user == profile && block.suggestions && !block.suggestions.empty? %>
<div class='suggestions-block common-profile-list-block'>
<h4 class='block-subtitle'><%= _('Some suggestions for you') %></h4>
<div class='profiles-suggestions'>
<%= render :partial => 'shared/profile_suggestions_list', :locals => { :suggestions => block.suggestions, :collection => :communities_suggestions, :per_page => 3 } %>
</div>
<div class='more-suggestions'>
<%= link_to _('See all suggestions'), profile.communities_suggestions_url %>
</div>
</div>
<% end %>
<% end %>