ucb_rails_user 9.1.1 → 9.1.2
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 +4 -4
- data/README.md +6 -4
- data/app/assets/stylesheets/ucb_rails_user/components/users_table.css +0 -15
- data/app/assets/stylesheets/ucb_rails_user/main.css +137 -1
- data/app/views/ucb_rails_user/impersonations/index.html.erb +5 -1
- data/app/views/ucb_rails_user/users/impersonate_search.html.erb +1 -1
- data/lib/ucb_rails_user/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d6f6798142d0f253da92420f6b10c2adbd69790c8682643e437855caea307171
|
|
4
|
+
data.tar.gz: 6851a695cdb144781ed576340f0d1ca317faeb3d7a0bcc26a2236e60a264ab7a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e4b98fce0775019211d1c1579060c03dd5d8cfae3ec82b19fb78b9bdcd6903af8d27916c0089d6be5b7d9f8abc7a61671175bac0349b881825607bb1600f8b80
|
|
7
|
+
data.tar.gz: 26795ee61da59b482020cb057e7d38072a475f919de3309a3f1238dcaa3276db9048e05f645c04ebb3c964908176d11c39a1af72259c648995c6aee1da870f01
|
data/README.md
CHANGED
|
@@ -77,11 +77,13 @@ bin/rake db:migrate
|
|
|
77
77
|
|
|
78
78
|
8. Update your assets files
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Import the admin screen styles, `ucb_rails_user/main`, the way your app loads its other stylesheets:
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
* Sass (dartsass-rails or sassc-rails): `@import "ucb_rails_user/main"`
|
|
83
|
+
* Sprockets `application.css`: `*= require ucb_rails_user/main`
|
|
84
|
+
* Propshaft without Sass: `<%= stylesheet_link_tag "ucb_rails_user/main" %>` in your layout
|
|
85
|
+
|
|
86
|
+
Every rule in it is scoped to the gem's own markup, so it won't restyle the rest of your app. The views use Bootstrap class names (`btn`, `table`, `form-control`, `alert`) and take their look from your app's Bootstrap.
|
|
85
87
|
|
|
86
88
|
No JavaScript from this gem is needed; remove any `ucb_rails_user` imports or requires.
|
|
87
89
|
|
|
@@ -39,21 +39,6 @@ table.ucb-rails-users-table tr:nth-child(even) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
h1 {
|
|
43
|
-
font-size: 2.5rem;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.btn {
|
|
47
|
-
@apply font-bold py-2 px-4 rounded;
|
|
48
|
-
}
|
|
49
|
-
.btn-blue {
|
|
50
|
-
@apply bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 border border-blue-700 rounded text-white;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.btn-danger {
|
|
54
|
-
@apply bg-blue-500 text-white;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
42
|
.ucb-rails-user > nav.pagy {
|
|
58
43
|
margin-top: 10px;
|
|
59
44
|
padding: 5px;
|
|
@@ -1 +1,137 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
* ucb_rails_user admin screen styles. Import this one file in your app:
|
|
3
|
+
* Sass: @import "ucb_rails_user/main"
|
|
4
|
+
* Sprockets: *= require ucb_rails_user/main
|
|
5
|
+
* Propshaft: stylesheet_link_tag "ucb_rails_user/main"
|
|
6
|
+
*
|
|
7
|
+
* GENERATED by bin/build-main-css from components/{impersonations,users_table}.css - edit those, then rerun it.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/* components/impersonations.css */
|
|
11
|
+
@media screen and (min-width: 768px) {
|
|
12
|
+
.impersonation-form {
|
|
13
|
+
width: 300px; } }
|
|
14
|
+
|
|
15
|
+
.recent-impersonations {
|
|
16
|
+
margin-top: 24px;
|
|
17
|
+
padding-bottom: 200px; }
|
|
18
|
+
.recent-impersonations ul {
|
|
19
|
+
padding-left: 0px; }
|
|
20
|
+
.recent-impersonations li {
|
|
21
|
+
list-style-type: none;
|
|
22
|
+
font-size: 110%; }
|
|
23
|
+
|
|
24
|
+
.impersonate_search_results_container {
|
|
25
|
+
margin-top: 10px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.impersonate_result_list {
|
|
29
|
+
list-style: none;
|
|
30
|
+
padding: 0;
|
|
31
|
+
margin-top: 10px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.impersonate_result_list_item {
|
|
35
|
+
padding: 8px;
|
|
36
|
+
border-bottom: 1px solid #eee;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.impersonate_no_results_found {
|
|
40
|
+
margin-top: 10px;
|
|
41
|
+
color: #999;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.impersonate_before_search {
|
|
45
|
+
margin-top: 10px;
|
|
46
|
+
color: #666;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* components/users_table.css */
|
|
50
|
+
.ucb-rails-users-table-header {
|
|
51
|
+
margin-top: 16px;
|
|
52
|
+
margin-bottom: 8px; }
|
|
53
|
+
|
|
54
|
+
.ucb-rails-users-table-header a {
|
|
55
|
+
margin-top: 0px; }
|
|
56
|
+
|
|
57
|
+
.ucb-rails-users-table-header form {
|
|
58
|
+
display: flex !important;
|
|
59
|
+
gap: 15px;
|
|
60
|
+
align-items: center;
|
|
61
|
+
flex-direction: row;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ucb-rails-users-table-header form span,
|
|
65
|
+
.ucb-rails-users-table-header form select,
|
|
66
|
+
.ucb-rails-users-table-header form input {
|
|
67
|
+
vertical-align: middle;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
table.ucb-rails-users-table {
|
|
71
|
+
border-spacing: 0px;
|
|
72
|
+
margin-top: 8px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
table.ucb-rails-users-table th {
|
|
76
|
+
border: 1px solid #dee2e6;
|
|
77
|
+
padding: 10px;
|
|
78
|
+
margin: 0px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
table.ucb-rails-users-table td {
|
|
82
|
+
text-align: center;
|
|
83
|
+
padding: 10px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
table.ucb-rails-users-table tr:nth-child(even) {
|
|
87
|
+
background-color: #00000011;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
.ucb-rails-user > nav.pagy {
|
|
92
|
+
margin-top: 10px;
|
|
93
|
+
padding: 5px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.ucb-rails-user > nav.pagy a {
|
|
97
|
+
padding: 5px;
|
|
98
|
+
border: 1px solid #99b;
|
|
99
|
+
padding-left: 10px;
|
|
100
|
+
padding-right: 10px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.user_sort {
|
|
104
|
+
text-decoration: none;
|
|
105
|
+
color: inherit;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.user_form_container {
|
|
109
|
+
margin-top: 10px;
|
|
110
|
+
overflow: auto;
|
|
111
|
+
margin-bottom: 10px;
|
|
112
|
+
vertical-align: middle;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.user_form_base_style {
|
|
116
|
+
display: flex;
|
|
117
|
+
gap: 10px;
|
|
118
|
+
align-items:
|
|
119
|
+
center; flex-grow: 1;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.user_form_return_count {
|
|
123
|
+
float: left;
|
|
124
|
+
padding-right: 15px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.user_form_search_box {
|
|
128
|
+
float: left;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.user_form_add_user_link {
|
|
132
|
+
float: right;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.user_turbo_frame_users {
|
|
136
|
+
margin-bottom: 10px;
|
|
137
|
+
}
|
|
@@ -32,7 +32,11 @@
|
|
|
32
32
|
<ul>
|
|
33
33
|
<% current_user.recent_impersonations.each do |imp| %>
|
|
34
34
|
<li>
|
|
35
|
-
|
|
35
|
+
<%# A real form, not a data-turbo-method link: Turbo ignores those links when the host turns Drive off. %>
|
|
36
|
+
<%= button_to full_name_with_uid(imp.target), admin_impersonations_path,
|
|
37
|
+
params: { ucb_rails_user_impersonation: { target_id: imp.target.id } },
|
|
38
|
+
form: { data: { turbo: false }, style: "display: inline;" },
|
|
39
|
+
style: "background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer;" %>
|
|
36
40
|
</li>
|
|
37
41
|
<% end %>
|
|
38
42
|
</ul>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<% elsif @query.present? && @query.length >= 2 %>
|
|
17
17
|
<div class="impersonate_no_results_found">
|
|
18
18
|
No users found matching "<%= @query %>"
|
|
19
|
-
</div
|
|
19
|
+
</div>
|
|
20
20
|
<% else %>
|
|
21
21
|
<div class="impersonate_before_search">
|
|
22
22
|
Type at least 2 characters to search for a user...
|