Module: UcbRailsUser::UsersHelper

Defined in:
app/helpers/ucb_rails_user/users_helper.rb

Instance Method Summary collapse

Instance Method Details

#checkmark(bool, true_string = "✔".html_safe, false_string = ' '.html_safe) ⇒ Object



17
18
19
# File 'app/helpers/ucb_rails_user/users_helper.rb', line 17

def checkmark(bool, true_string="✔".html_safe, false_string=' '.html_safe)
  bool ? true_string : false_string
end

#full_name_with_uid(user) ⇒ Object



21
22
23
24
# File 'app/helpers/ucb_rails_user/users_helper.rb', line 21

def full_name_with_uid(user)
  return "" unless user.present?
  "#{user.full_name} (#{user.ldap_uid})"
end


4
5
6
7
8
9
10
11
12
13
14
15
# File 'app/helpers/ucb_rails_user/users_helper.rb', line 4

def link_to_new_user
  text = 'New User'
  # text = image_tag('ucb_rails/glyphicons_006_user_add.png', size: '14x14')
  button(text, :primary,
    class: 'ldap-person-search',
    data: {
      search_url: "",
      result_link_url: new_admin_user_path,
      result_link_http_method: 'post',
    }
  )
end