ucb_rails_user 8.0.3 → 8.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 918695706c657e124473ab9b924deba0613340af5fec3de9db28c8e67cbe5512
4
- data.tar.gz: a53245a84b4150f134b84bf72cece17e2da3b71d565ba4b1ad2e48424558e3d8
3
+ metadata.gz: 8d1e82725f375724e87fee2abd8ebd6a1eef2d9e99866e2f93c42ceae225e540
4
+ data.tar.gz: 9889577c25c659e93aa4ae9a4a1a4cbe8a672b325dd68d694d03b12078ef9120
5
5
  SHA512:
6
- metadata.gz: 126345f6c3015d8fe72e8f6ed957c8b34e2546ef171db042d3878652ef3381e52a4bef61f007eafa066c015e7b7cd18741bbaa4e1e49d75aa310cf0f954ff8cd
7
- data.tar.gz: ebcbb49bbfc56404249408beeea6ee80d2d999c712efbc23e6e32fd64d9079189235066edfdd9afc83efb2d67e632426b7a64393c4e8c7532cd71c0547932221
6
+ metadata.gz: c1e3e70e8637c5bcc38cd1916950d18137de5638963fdd58067665946aeb3e51fd54562cd8c14425aae85ee68574b8acabd29f34e0f4026e0a94e3d49e47c7ec
7
+ data.tar.gz: e7c74e99cc0cb2c0206fd7a507a3e18f152dedc756648058792f34610ce796a87985752a06ec89a83847686a0353463d54d2e08e22081197e4afbe1bbace1821
@@ -124,8 +124,7 @@ module UcbRailsUser::UsersControllerConcerns
124
124
  private
125
125
 
126
126
  def search_user_table(query)
127
- UcbRailsUser.user_class.where('lower(first_name) like lower(:q) or lower(last_name) like lower(:q) or ldap_uid like :q or employee_id like :q',
128
- q: '%' + query + '%')
127
+ UcbRailsUser.user_class.where('lower(first_name) like lower(:q) or lower(last_name) like lower(:q) or lower(email) like lower(:q) or lower(alternate_email) like lower(:q) or ldap_uid like :q or ldap_uid like :q or employee_id like :q', q: '%' + query + '%')
129
128
  end
130
129
 
131
130
  def user_params(extra_params = [])
@@ -1,9 +1,21 @@
1
1
  <div class="ucb-rails-users-table-header">
2
2
  <h1>Users</h1>
3
- <%= link_to "Add User", new_admin_user_path, class: "btn btn-primary", style: "float: right;" %>
4
3
  </div>
5
4
 
6
5
  <%= turbo_frame_tag "users" do %>
6
+ <% if flash[:notice] || flash[:error] || flash[:alert] %>
7
+ <div style="margin-bottom: 10px;">
8
+ <% if flash[:notice] %>
9
+ <div class="alert alert-info"><%= flash[:notice] %></div>
10
+ <% end %>
11
+ <% if flash[:error] %>
12
+ <div class="alert alert-danger"><%= flash[:error] %></div>
13
+ <% end %>
14
+ <% if flash[:alert] %>
15
+ <div class="alert alert-warning"><%= flash[:alert] %></div>
16
+ <% end %>
17
+ </div>
18
+ <% end %>
7
19
  <div style="margin-top: 10px; overflow: auto; margin-bottom: 10px; vertical-align: middle; ">
8
20
  <%= form_with url: "", method: :get, data: { turbo_frame: "users" }, style: "display: flex; gap: 10px; align-items: center; flex-grow: 1;" do |form| %>
9
21
  <%= form.hidden_field :sort, value: @sort %>
@@ -12,7 +24,7 @@
12
24
  Show <%= form.select :count, options_for_select([10, 25, 50, 100], selected: params[:count]), {}, { onchange: "this.form.requestSubmit()" } %>
13
25
  </div>
14
26
  <div style="float: left;">
15
- Search <%= form.search_field :query, value: params[:query], id: "user_search_field", placeholder: "Search users...", oninput: "
27
+ Search <%= form.search_field :query, value: params[:query], id: "user_search_field", placeholder: "Search users...", data: { turbo_permanent: true }, oninput: "
16
28
  clearTimeout(window.searchTimer);
17
29
  window.searchTimer = setTimeout(() => {
18
30
  this.form.requestSubmit();
@@ -20,6 +32,9 @@
20
32
  " %>
21
33
  </div>
22
34
  <% end %>
35
+ <div style="float: right;">
36
+ <%= link_to "Add User", new_admin_user_path, class: "btn btn-primary" %>
37
+ </div>
23
38
  </div>
24
39
  <div class="table-responsive ucb-rails-users-table-wrapper">
25
40
  <table class="table table-striped table-bordered table-hover ucb-rails-users-table">
@@ -1,22 +1,17 @@
1
- <div class="ucb-rails-users-table-header">
2
- <h1>Users</h1>
1
+ <%= turbo_frame_tag "users" do %>
3
2
  <h2>Add New User</h2>
4
- </div>
5
3
 
6
- <%= form_tag admin_user_search_path, method: :get, class: "form-inline user-search-form" do %>
7
- <%= text_field_tag :first_name, "", placeholder: "First name", class: "form-control" %>
8
- <%= text_field_tag :last_name, "", placeholder: "Last name", class: "form-control" %>
9
- <%= text_field_tag :employee_id, "", placeholder: "Employee ID", class: "form-control" %>
10
- <%= submit_tag "Search", class: "btn btn-primary" %>
11
- <%= link_to "Cancel", admin_users_path, class: "btn btn-default" %>
12
- <% end %>
13
-
14
- <div class="ucb-rails-user-loader" style="display: none;">
15
- Loading...
16
- </div>
17
-
18
- <div class="search-results">
19
- <% if @results %>
20
- <%= render "results" %>
4
+ <%= form_tag admin_user_search_path, method: :get, class: "form-inline user-search-form" do %>
5
+ <%= text_field_tag :first_name, "", placeholder: "First name", class: "form-control" %>
6
+ <%= text_field_tag :last_name, "", placeholder: "Last name", class: "form-control" %>
7
+ <%= text_field_tag :employee_id, "", placeholder: "Employee ID", class: "form-control" %>
8
+ <%= submit_tag "Search", class: "btn btn-primary", data: { turbo_submits_with: "Searching..." } %>
9
+ <%= link_to "Cancel", admin_users_path, class: "btn btn-default" %>
21
10
  <% end %>
22
- </div>
11
+
12
+ <div class="search-results">
13
+ <% if @results %>
14
+ <%= render "results" %>
15
+ <% end %>
16
+ </div>
17
+ <% end %>
@@ -1,16 +1,15 @@
1
- <div class="ucb-rails-users-table-header">
2
- <h1>Users</h1>
1
+ <%= turbo_frame_tag "users" do %>
3
2
  <h2>Add New User</h2>
4
- </div>
5
3
 
6
- <%= form_tag admin_user_search_path, method: :get, class: "form-inline user-search-form" do %>
7
- <%= text_field_tag :first_name, params[:first_name], placeholder: "First name", class: "form-control" %>
8
- <%= text_field_tag :last_name, params[:last_name], placeholder: "Last name", class: "form-control" %>
9
- <%= text_field_tag :employee_id, params[:employee_id], placeholder: "Employee ID", class: "form-control" %>
10
- <%= submit_tag "Search", class: "btn btn-primary" %>
11
- <%= link_to "Cancel", admin_users_path, class: "btn btn-default" %>
12
- <% end %>
4
+ <%= form_tag admin_user_search_path, method: :get, class: "form-inline user-search-form" do %>
5
+ <%= text_field_tag :first_name, params[:first_name], placeholder: "First name", class: "form-control" %>
6
+ <%= text_field_tag :last_name, params[:last_name], placeholder: "Last name", class: "form-control" %>
7
+ <%= text_field_tag :employee_id, params[:employee_id], placeholder: "Employee ID", class: "form-control" %>
8
+ <%= submit_tag "Search", class: "btn btn-primary" %>
9
+ <%= link_to "Cancel", admin_users_path, class: "btn btn-default" %>
10
+ <% end %>
13
11
 
14
- <div class="search-results">
15
- <%= render "search_results" %>
16
- </div>
12
+ <div class="search-results">
13
+ <%= render "search_results" %>
14
+ </div>
15
+ <% end %>
@@ -1,3 +1,3 @@
1
1
  module UcbRailsUser
2
- VERSION = '8.0.3'
2
+ VERSION = '8.0.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ucb_rails_user
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.3
4
+ version: 8.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Downey