Sha256: 0a9c46538451a503237ecb002c7cde4132270d4510711e8eab99e2b71faae76b

Contents?: true

Size: 837 Bytes

Versions: 15

Compression:

Stored size: 837 Bytes

Contents

module ProfilesHelper
  
  #Tells if the current subject accessing the profile is its owner or not
  def is_owner?
    if (current_subject.present?) and (@profile.present?) and (@profile.actor == current_subject.actor)
      return true
    else
      return false
    end
  end
  
  #Returns true if the "Personal Information" section is empty
  def is_personal_empty?
    if (@profile.organization?) or (@profile.birthday?) or (@profile.city?) or (@profile.description?)
      return false
    else
      return true
    end
  end
  
  #Returns true if the "Personal Information" section is empty
  def is_contact_empty?
    if (@profile.phone?) or (@profile.mobile?) or (@profile.fax?) or (@profile.address?)or 
       (@profile.website?) or (@profile.subject.email?)
      return false
    else
      return true
    end
  end
  
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
social_stream-base-0.7.2 app/helpers/profiles_helper.rb
social_stream-base-0.7.1 app/helpers/profiles_helper.rb
social_stream-base-0.7.0 app/helpers/profiles_helper.rb
social_stream-base-0.6.8 app/helpers/profiles_helper.rb
social_stream-base-0.6.6 app/helpers/profiles_helper.rb
social_stream-base-0.6.5 app/helpers/profiles_helper.rb
social_stream-base-0.6.3 app/helpers/profiles_helper.rb
social_stream-base-0.6.2 app/helpers/profiles_helper.rb
social_stream-base-0.6.1 app/helpers/profiles_helper.rb
social_stream-base-0.6.0 app/helpers/profiles_helper.rb
social_stream-base-0.5.2 app/helpers/profiles_helper.rb
social_stream-base-0.5.1 app/helpers/profiles_helper.rb
social_stream-base-0.5.0 app/helpers/profiles_helper.rb
social_stream-0.4.6 app/helpers/profiles_helper.rb
social_stream-0.4.5 app/helpers/profiles_helper.rb