diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1036a64..8f638c3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1424,7 +1424,7 @@ module ApplicationHelper def profile_suggestion_profile_connections(suggestion) profiles = suggestion.profile_connections.first(4).map do |profile| - link_to(profile_image(profile, :icon), profile.url, :class => 'profile-suggestion-connection-icon', :title => profile.name) + link_to(profile_image(profile, :icon, :title => profile.name), profile.url, :class => 'profile-suggestion-connection-icon') end controller_target = suggestion.suggestion_type == 'Person' ? :friends : :memberships @@ -1446,7 +1446,7 @@ module ApplicationHelper title = tags.join controller_target = suggestion.suggestion_type == 'Person' ? :friends : :memberships - tags << ' ' + link_to('...', {:controller => controller_target, :action => :connections, :id => suggestion.suggestion_id}, :class => 'more-tag-connections') if suggestion.tag_connections.count > 4 + tags << ' ' + link_to('...', {:controller => controller_target, :action => :connections, :id => suggestion.suggestion_id}, :class => 'more-tag-connections', :title => _('See all connections')) if suggestion.tag_connections.count > 4 if tags.present? content_tag(:div, tags.join, :class => 'tag-connections', :title => title) diff --git a/app/models/communities_block.rb b/app/models/communities_block.rb index 2e8a7b0..1f2b9cc 100644 --- a/app/models/communities_block.rb +++ b/app/models/communities_block.rb @@ -22,6 +22,7 @@ class CommunitiesBlock < ProfileListBlock def footer owner = self.owner suggestions = self.suggestions + return '' unless owner.kind_of?(Profile) || owner.kind_of?(Environment) proc do render :file => 'blocks/communities', :locals => { :owner => owner, :suggestions => suggestions } end diff --git a/app/views/blocks/communities.html.erb b/app/views/blocks/communities.html.erb index 08a74a1..45a467a 100644 --- a/app/views/blocks/communities.html.erb +++ b/app/views/blocks/communities.html.erb @@ -2,11 +2,9 @@ <%= link_to s_('communities|View all'), {:profile => owner.identifier, :controller => 'profile', :action => 'communities'}, :class => 'view-all' %> <% elsif owner.kind_of?(Environment) %> <%= link_to s_('communities|View all'), {:controller => 'search', :action => 'communities'}, :class => 'view-all' %> -<% else %> - '' <% end %> -<% if user == profile && suggestions && !suggestions.empty? %> +<% if user && user == profile && suggestions && !suggestions.empty? %>

<%= _('Some suggestions for you') %>

diff --git a/app/views/shared/_profile_connections.html.erb b/app/views/shared/_profile_connections.html.erb index 8ee0b09..9fa78e4 100644 --- a/app/views/shared/_profile_connections.html.erb +++ b/app/views/shared/_profile_connections.html.erb @@ -1,20 +1,23 @@ -

<%= _("Profiles in common:") if profiles.present? %>

-
-
    - <% profiles.each do |profile| %> -
  • - <%= link_to_profile profile_image(profile) + '
    ' + profile.short_name, - profile.identifier, :class => 'profile-link' %> -
  • - <% end %> -
-
- -
+<% if profiles.present? %> +

<%= _("Profiles in common:") %>

+
+
    + <% profiles.each do |profile| %> +
  • + <%= link_to_profile profile_image(profile) + '
    ' + profile.short_name, + profile.identifier, :class => 'profile-link' %> +
  • + <% end %> +
+
+
+<% end %> -

<%= _("Tags in common:") if tags.present? %>

+<% if tags.present? %> +

<%= _("Tags in common:") %>

+<% end %> diff --git a/app/views/shared/_profile_suggestions_list.html.erb b/app/views/shared/_profile_suggestions_list.html.erb index 104976e..d4737aa 100644 --- a/app/views/shared/_profile_suggestions_list.html.erb +++ b/app/views/shared/_profile_suggestions_list.html.erb @@ -10,14 +10,22 @@