Skip to content
Extraits de code Groupes Projets
Valider ec8aed12 rédigé par Raphael Sofaer's avatar Raphael Sofaer
Parcourir les fichiers

Limit similar contacts, need a see all page

parent 73d4bf43
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -11,7 +11,7 @@ class PeopleController < ApplicationController ...@@ -11,7 +11,7 @@ class PeopleController < ApplicationController
def index def index
@aspect = :search @aspect = :search
params[:q] ||= params[:term] params[:q] ||= params[:term]
if (params[:q][0] == 35 || params[:q][0] == '#') && params[:q].length > 1 if (params[:q][0] == 35 || params[:q][0] == '#') && params[:q].length > 1
redirect_to "/tags/#{params[:q].gsub("#", "")}" redirect_to "/tags/#{params[:q].gsub("#", "")}"
return return
...@@ -71,10 +71,12 @@ class PeopleController < ApplicationController ...@@ -71,10 +71,12 @@ class PeopleController < ApplicationController
if @contact if @contact
@aspects_with_person = @contact.aspects @aspects_with_person = @contact.aspects
@aspect_ids = @aspects_with_person.map(&:id) @aspect_ids = @aspects_with_person.map(&:id)
@contacts_of_contact = @contact.contacts @contacts_of_contact_count = @contact.contacts.count
@contacts_of_contact = @contact.contacts.limit(36)
else else
@contact ||= Contact.new @contact ||= Contact.new
@contacts_of_contact_count = 0
@contacts_of_contact = [] @contacts_of_contact = []
end end
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
%hr{:style=>"width:300px;"} %hr{:style=>"width:300px;"}
.section.contact_pictures .section.contact_pictures
%h4 %h4
= @contacts_of_contact.length = @contacts_of_contact_count
= t('.similar_contacts') = t('.similar_contacts')
- for person in @contacts_of_contact - for person in @contacts_of_contact
= person_image_link person = person_image_link person
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter