Pull relationship action button from search results out into a partial.
Copyedit messages.
This commit is contained in:
parent
b0ca6ead26
commit
c1bf68068f
4 changed files with 27 additions and 43 deletions
|
|
@ -4,26 +4,8 @@
|
|||
|
||||
.stream_element{:id => person.id}
|
||||
.right
|
||||
- if person.owner_id == current_user.id
|
||||
= t('.thats_you')
|
||||
- elsif contact && !contact.pending
|
||||
= t('.already_connected')
|
||||
- elsif (contact && contact.pending) || (request && request.recipient == person)
|
||||
= t('.pending_request')
|
||||
- elsif request && request.sender == person
|
||||
= link_to t('people.show.incoming_request', :name => truncate(person.name, :length => 20, :separator => ' ', :omission => '')),
|
||||
{:controller => "contacts",
|
||||
:action => "new",
|
||||
:person_id => person.id},
|
||||
:class => 'share_with button',
|
||||
:rel => 'facebox'
|
||||
- else
|
||||
= link_to t('people.show.start_sharing'),
|
||||
{:controller => "contacts",
|
||||
:action => "new",
|
||||
:person_id => person.id},
|
||||
:class => 'button',
|
||||
:rel => 'facebox'
|
||||
= render :partial => 'people/relationship_action',
|
||||
:locals => { :person => person, :contact => contact, :request => request}
|
||||
|
||||
= person_image_link(person)
|
||||
|
||||
|
|
|
|||
|
|
@ -5,26 +5,8 @@
|
|||
.stream_element{:id => person.id}
|
||||
|
||||
.right{:style=>"display:inline;"}
|
||||
- if person.owner_id == current_user.id
|
||||
= t('.thats_you')
|
||||
- elsif contact && !contact.pending
|
||||
= t('.already_connected')
|
||||
- elsif (contact && contact.pending) || (request && request.recipient == person)
|
||||
= t('.pending_request')
|
||||
- elsif request && request.sender == person
|
||||
= link_to t('people.show.incoming_request', :name => truncate(person.name, :length => 20, :separator => ' ', :omission => '')),
|
||||
{:controller => "contacts",
|
||||
:action => "new",
|
||||
:person_id => person.id},
|
||||
:class => 'share_with button',
|
||||
:rel => 'facebox'
|
||||
- else
|
||||
= link_to t('people.show.start_sharing'),
|
||||
{:controller => "contacts",
|
||||
:action => "new",
|
||||
:id => person.id},
|
||||
:class => 'button',
|
||||
:rel => 'facebox'
|
||||
= render :partial => 'people/relationship_action',
|
||||
:locals => { :person => person, :contact => contact, :request => request}
|
||||
|
||||
= person_image_link(person)
|
||||
|
||||
|
|
|
|||
20
app/views/people/_relationship_action.haml
Normal file
20
app/views/people/_relationship_action.haml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
- if person.owner_id == current_user.id
|
||||
= t('people.person.thats_you')
|
||||
- elsif contact && !contact.pending
|
||||
= t('people.person.already_connected')
|
||||
- elsif (contact && contact.pending) || (request && request.recipient == person)
|
||||
= t('people.person.pending_request')
|
||||
- elsif request && request.sender == person
|
||||
= link_to t('people.show.incoming_request', :name => truncate(person.name, :length => 20, :separator => ' ', :omission => '')),
|
||||
{:controller => "contacts",
|
||||
:action => "new",
|
||||
:person_id => person.id},
|
||||
:class => 'share_with button',
|
||||
:rel => 'facebox'
|
||||
- else
|
||||
= link_to t('people.show.start_sharing'),
|
||||
{:controller => "contacts",
|
||||
:action => "new",
|
||||
:person_id => person.id},
|
||||
:class => 'button',
|
||||
:rel => 'facebox'
|
||||
|
|
@ -326,9 +326,9 @@ en:
|
|||
many: "%{count} people"
|
||||
other: "%{count} people"
|
||||
person:
|
||||
pending_request: "pending request"
|
||||
pending_request: "Pending request"
|
||||
already_connected: "Already connected"
|
||||
thats_you: "thats you!"
|
||||
thats_you: "That's you!"
|
||||
add_contact: "add contact"
|
||||
index:
|
||||
results_for: "search results for"
|
||||
|
|
|
|||
Loading…
Reference in a new issue