#406: hide email
This commit is contained in:
parent
4cad27ae53
commit
72bf0fba30
|
@ -20,13 +20,12 @@
|
|||
= link_to image_tag('gears.png'), edit_url if edit_url.present?
|
||||
.both
|
||||
- if user
|
||||
- show_email = current_user == user || !user.hide_email?
|
||||
- if show_email
|
||||
- unless user.hide_email?
|
||||
%p.info.first
|
||||
- message = "#{t 'activerecord.attributes.user.email'}: "
|
||||
= message
|
||||
= mail_to user.email, short_message(user.email, max_length - message.length), encode: 'javascript', title: user.email
|
||||
%p.info{ class: show_email ? '' : 'first' }
|
||||
%p.info{ class: user.hide_email? ? 'first' : '' }
|
||||
- message = "#{t 'activerecord.attributes.user.site'}: "
|
||||
= message
|
||||
= link_to short_message(user.site, max_length - message.length), user.site, title: user.site
|
||||
|
|
Loading…
Reference in New Issue