Sha256: 508b8648149e5f5921531e0482cdbca33a8c76e7e04112fcf9be203ef3b59aa6

Contents?: true

Size: 646 Bytes

Versions: 11

Compression:

Stored size: 646 Bytes

Contents

module UcbRails::LdapPersonSearchHelper
  
  def link_to_ldap_person_entry(entry)
    UcbRails::Renderer::LdapPersonSearchResultLink.new(self, entry).html
  end
  
  def ldap_entry_class(entry)
    Array['ldap-result'].tap do |result|
      result << 'ldap-result-exists' if ldap_already_include?(entry.uid)
    end
  end
  
  def ldap_already_include?(uid)
    ldap_person_search_existing_uids.include?(uid.to_s)
  end
  
  def ldap_person_search_existing_uids
    @ldap_person_search_existing_uids ||= (@lps_existing_uids || []).map(&:to_s)
  end
  
  def lps_matches
    @lps_entries.size.zero? ? '' : "Matches: #{@lps_entries.size}"
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ucb_rails-0.0.14 app/helpers/ucb_rails/ldap_person_search_helper.rb
ucb_rails-0.0.13 app/helpers/ucb_rails/ldap_person_search_helper.rb
ucb_rails-0.0.12 app/helpers/ucb_rails/ldap_person_search_helper.rb
ucb_rails-0.0.11 app/helpers/ucb_rails/ldap_person_search_helper.rb
ucb_rails-0.0.10 app/helpers/ucb_rails/ldap_person_search_helper.rb
ucb_rails-0.0.9 app/helpers/ucb_rails/ldap_person_search_helper.rb
ucb_rails-0.0.8 app/helpers/ucb_rails/ldap_person_search_helper.rb
ucb_rails-0.0.7 app/helpers/ucb_rails/ldap_person_search_helper.rb
ucb_rails-0.0.6 app/helpers/ucb_rails/ldap_person_search_helper.rb
ucb_rails-0.0.5 app/helpers/ucb_rails/ldap_person_search_helper.rb
ucb_rails-0.0.4 app/helpers/ucb_rails/ldap_person_search_helper.rb