diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 8a8f8d2..9a155a6 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1420,12 +1420,19 @@ module ApplicationHelper end def profile_suggestion_profile_connections(suggestion) - suggestion.profile_connections.map do |cat| + profiles = suggestion.profile_connections.first(4).map do |profile| + link_to(profile_image(profile, :icon), profile.url, :class => 'profile-suggestion-connection-icon') end.join + extra = suggestion.profile_connections.count > 4 ? " +#{suggestion.profile_connections.count - 4}" : '' + content_tag(:p, profiles + extra) end def profile_suggestion_tag_connections(suggestion) - suggestion.tag_connections.map do |cat| - end.join + tags = suggestion.tag_connections.map do |tag| + tag.name + ', ' + end + last_tag = tags.pop + tags << last_tag.strip.chop if last_tag.present? + content_tag(:p, tags.join) end end diff --git a/app/views/shared/_profile_suggestions_list.html.erb b/app/views/shared/_profile_suggestions_list.html.erb index 2338cbd..f637e21 100644 --- a/app/views/shared/_profile_suggestions_list.html.erb +++ b/app/views/shared/_profile_suggestions_list.html.erb @@ -18,7 +18,8 @@ s.suggestion.add_url, :class => 'accept-suggestion' %> <% end %>
- <%= profile_suggestion_categories(s) %> + <%= profile_suggestion_profile_connections(s) %> + <%= profile_suggestion_tag_connections(s) %>
<% if collection == :friends_suggestions %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index cf5309e..0bb5d18 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -4085,6 +4085,16 @@ h1#agenda-title { margin: 0px; } +#content .profiles-suggestions .profile-list .extra_info .profile-suggestion-connection-icon { + position: relative; +} + +.profiles-suggestions .profile-list .extra_info big { + font-size: 14px; + font-weight: bold; + vertical-align: text-bottom; +} + .profiles-suggestions .profile-list .extra_info span { background-position: 4px 50%; background-repeat: no-repeat; -- libgit2 0.21.2