Sha256: f646a6c210c8489ed41861dc166cda81bc490a97925923caea6424df242b8a5d

Contents?: true

Size: 436 Bytes

Versions: 3

Compression:

Stored size: 436 Bytes

Contents

module Chaltron::LdapHelper

  def display_entry_name(entry)
    if current_user.username == entry.username
      (entry.name + '&nbsp').html_safe +
        tag_label(I18n.t('chaltron.users.it_s_you'), :success)
    else
      entry.username
    end
  end

  def display_entry_email(entry)
    mail = entry.email
    if mail.blank?
      tag_label(I18n.t('chaltron.users.missing_field'), :danger)
    else
      mail
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
chaltron-0.1.2 app/helpers/chaltron/ldap_helper.rb
chaltron-0.1.1 app/helpers/chaltron/ldap_helper.rb
chaltron-0.1.0 app/helpers/chaltron/ldap_helper.rb