only show profile fields if they are filled out.

This commit is contained in:
maxwell 2010-12-17 17:40:08 -08:00
parent 13407f700e
commit 96b907122b

View file

@ -38,15 +38,21 @@
-if (contact && !contact.pending?) || person == current_user.person || @incoming_request -if (contact && !contact.pending?) || person == current_user.person || @incoming_request
%ul#profile_information %ul#profile_information
%li %li
%h3 #{t('.bio')} - unless person.profile.bio.blank?
%h3
=t('.bio')
= markdownify(person.profile.bio, :newlines => true) = markdownify(person.profile.bio, :newlines => true)
%li.span-8.last %li.span-8.last
.span-4 .span-4
%h3 #{t('.gender')} - unless person.profile.gender.blank?
%h3
=t('.gender')
= person.profile.gender = person.profile.gender
.span-4.last .span-4.last
%h3 #{t('.born')} - unless person.profile.birthday.blank?
%h3
=t('.born')
= t('ago', :time => time_ago_in_words(person.profile.birthday)) if @person.profile.birthday = t('ago', :time => time_ago_in_words(person.profile.birthday)) if @person.profile.birthday