Sha256: 4d0a78153a9b087237a6dfec683f376089d6bc3b785d15a07f51743517baf08e

Contents?: true

Size: 437 Bytes

Versions: 15

Compression:

Stored size: 437 Bytes

Contents

module Chaltron::LdapHelper

  def display_entry_name(entry)
    if User.exists?(username: entry.username)
      (entry.name + '&nbsp').html_safe +
        tag_label(I18n.t('chaltron.users.already_present'), :danger)
    else
      entry.name
    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

15 entries across 15 versions & 1 rubygems

Version Path
chaltron-0.2.10 app/helpers/chaltron/ldap_helper.rb
chaltron-0.2.9 app/helpers/chaltron/ldap_helper.rb
chaltron-0.2.8 app/helpers/chaltron/ldap_helper.rb
chaltron-0.2.7 app/helpers/chaltron/ldap_helper.rb
chaltron-0.2.6 app/helpers/chaltron/ldap_helper.rb
chaltron-0.2.5 app/helpers/chaltron/ldap_helper.rb
chaltron-0.2.4 app/helpers/chaltron/ldap_helper.rb
chaltron-0.2.3 app/helpers/chaltron/ldap_helper.rb
chaltron-0.2.2 app/helpers/chaltron/ldap_helper.rb
chaltron-0.2.1 app/helpers/chaltron/ldap_helper.rb
chaltron-0.2.0 app/helpers/chaltron/ldap_helper.rb
chaltron-0.1.6 app/helpers/chaltron/ldap_helper.rb
chaltron-0.1.5 app/helpers/chaltron/ldap_helper.rb
chaltron-0.1.4 app/helpers/chaltron/ldap_helper.rb
chaltron-0.1.3 app/helpers/chaltron/ldap_helper.rb