Sha256: 7805e81913a83daa74e2f4f87ffef8e487a73e3a05762ddfe0471179438d7686

Contents?: true

Size: 495 Bytes

Versions: 10

Compression:

Stored size: 495 Bytes

Contents

module Chaltron::LdapHelper

  def display_entry_name(entry)
    if User.exists?(username: entry.username)
      (entry.name + '&nbsp').html_safe +
        content_tag(:span, I18n.t('chaltron.users.already_present'), class: 'badge badge-danger')
    else
      entry.name
    end
  end

  def display_entry_email(entry)
    mail = entry.email
    if mail.blank?
      content_tag(:span, I18n.t('chaltron.users.missing_field'), class: 'badge badge-danger')
    else
      mail
    end
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
chaltron-1.0.9 app/helpers/chaltron/ldap_helper.rb
chaltron-1.0.8 app/helpers/chaltron/ldap_helper.rb
chaltron-1.0.7 app/helpers/chaltron/ldap_helper.rb
chaltron-1.0.6 app/helpers/chaltron/ldap_helper.rb
chaltron-1.0.5 app/helpers/chaltron/ldap_helper.rb
chaltron-1.0.4 app/helpers/chaltron/ldap_helper.rb
chaltron-1.0.3 app/helpers/chaltron/ldap_helper.rb
chaltron-1.0.2 app/helpers/chaltron/ldap_helper.rb
chaltron-1.0.1 app/helpers/chaltron/ldap_helper.rb
chaltron-1.0.0 app/helpers/chaltron/ldap_helper.rb