#406: hide email

This commit is contained in:
Vokhmin Alexey V 2014-06-26 12:46:08 +04:00
parent 4cad27ae53
commit 72bf0fba30
1 changed files with 2 additions and 3 deletions

View File

@ -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