-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
_contact.html.haml
34 lines (30 loc) · 1.59 KB
/
_contact.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
- gravatar_size = @current_user.preference[:contacts_outline] == "brief" ? "16x16" : "30x30"
%li[contact]{ highlightable(dom_id(contact, :tools)) }
= gravatar_for(contact, :size => gravatar_size)
.tools{ invisible, :id => dom_id(contact, :tools) }
= hook(:contact_tools_before, self, :contact => contact)
= link_to_edit(contact) + " | "
= link_to_discard(contact) + " | " if shown_on_landing_page?
= link_to_delete(contact)
.indentslim
= link_to(h(contact.full_name(@current_user.preference[:contacts_naming])), contact)
%tt
- if contact.title? && contact.department?
= h(contact.title) << ", " << h(contact.department)
- else
= h(contact.title) if contact.title?
- if contact.account && contact.account.name?
== #{t :at} #{link_to h(contact.account.name), account_path(contact.account)}
- if contact.lead and contact.lead.referred_by?
–
= #{t :referred_by_small} #{contact.lead.referred_by}"
- unless @current_user.preference[:contacts_outline] == "brief"
%dt{ :style => "padding: 2px 0px 0px 0px" }
= link_to_email(contact.email) << " | " if contact.email.present?
= "#{t :phone_small}: <b>".html_safe + h(contact.phone) << "</b> | ".html_safe if contact.phone.present?
= "#{t :mobile_small}: <b>".html_safe + h(contact.mobile) << "</b> | ".html_safe if contact.mobile.present?
= t(:added_ago, time_ago_in_words(contact.created_at))
- if contact.tag_list.present?
%dt
.tags= tags_for_index(contact)
= hook(:contact_bottom, self, :contact => contact)