search results for people now look like the stream
This commit is contained in:
parent
08f833ba7a
commit
b5a2971302
4 changed files with 39 additions and 34 deletions
26
app/views/people/_person.html.haml
Normal file
26
app/views/people/_person.html.haml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
-# Copyright (c) 2010, Diaspora Inc. This file is
|
||||
-# licensed under the Affero General Public License version 3. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
|
||||
%li.message{:id => person.id}
|
||||
|
||||
= person_image_link(person)
|
||||
|
||||
.content
|
||||
%span.from
|
||||
= link_to person.real_name, person
|
||||
|
||||
.info
|
||||
= person.diaspora_handle
|
||||
|
||||
.right{ :style => "display:inline;top:0;" }
|
||||
- if person.id == current_user.person.id
|
||||
thats you!
|
||||
- elsif current_user.pending_requests.find_by_person_id(person.id)
|
||||
= link_to "pending request", aspects_manage_path
|
||||
- else
|
||||
= form_for Request.new do |f|
|
||||
= f.select(:aspect_id, @aspects_dropdown_array)
|
||||
= f.hidden_field :destination_url, :value => person.diaspora_handle
|
||||
= f.submit "add friend"
|
||||
|
|
@ -14,38 +14,12 @@
|
|||
- content_for :left_pane do
|
||||
\.
|
||||
|
||||
= (@people.count).to_s + search_or_index
|
||||
%table
|
||||
%tr
|
||||
%th real name
|
||||
%th diaspora handle
|
||||
%th url
|
||||
- for person in @people
|
||||
%tr
|
||||
- if current_user.friends.include? person
|
||||
%td= link_to person.real_name, person
|
||||
- else
|
||||
%td= person.real_name
|
||||
%h1
|
||||
search results for
|
||||
%u= params[:q]
|
||||
|
||||
%td= person.diaspora_handle
|
||||
%td= person.url
|
||||
|
||||
-if current_user.friends.include? person
|
||||
|
||||
- elsif person.id == current_user.person.id
|
||||
%td
|
||||
%td that's you!
|
||||
-elsif current_user.pending_requests.find_by_person_id(person.id)
|
||||
%td
|
||||
%td ^-you have a friend request from this person
|
||||
-elsif current_user.pending_requests.find_by_url(person.receive_url)
|
||||
%td
|
||||
%td friend request pending
|
||||
-else
|
||||
%td
|
||||
%td
|
||||
= form_for Request.new do |f|
|
||||
= f.select(:aspect_id, @aspects_dropdown_array)
|
||||
= f.hidden_field :destination_url, :value => person.diaspora_handle
|
||||
= f.submit "add friend"
|
||||
= will_paginate @people
|
||||
%ul#stream
|
||||
- for person in @people
|
||||
= render 'people/person', :person => person
|
||||
|
||||
= will_paginate @people
|
||||
|
|
|
|||
|
|
@ -145,6 +145,8 @@ ul#stream {
|
|||
border-bottom: 1px solid #eeeeee; }
|
||||
ul#stream > li:first-child {
|
||||
padding-top: 0; }
|
||||
ul#stream .right {
|
||||
top: 0; }
|
||||
|
||||
li.message {
|
||||
position: relative;
|
||||
|
|
|
|||
|
|
@ -186,6 +186,9 @@ ul#stream
|
|||
:padding
|
||||
:top 0
|
||||
|
||||
.right
|
||||
:top 0
|
||||
|
||||
li.message
|
||||
:position relative
|
||||
:line-height 140%
|
||||
|
|
|
|||
Loading…
Reference in a new issue