thecore_ui_rails_admin 3.1.5 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -28
- data/app/views/rails_admin/main/change_password.html.erb +32 -0
- data/config/initializers/after_initialize.rb +1 -0
- data/config/initializers/concern_user.rb +2 -2
- data/config/locales/en.main.yml +19 -5
- data/config/locales/en.rails_admin.yml +11 -32
- data/config/locales/it.rails_admin.yml +6 -0
- data/lib/member_actions/change_password.rb +27 -0
- data/lib/thecore_ui_rails_admin/version.rb +1 -2
- metadata +4 -4
- data/config/locales/en.index_cards.custom.yml +0 -8
- data/config/locales/it.index_cards.custom.yml +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 780e74c963f949fbc4f0600a0eeb68d1090c78205f8f481da5dbde8d45ca5f1d
|
4
|
+
data.tar.gz: 92c87402538dd7b41a173d0b21a8c22f3660c0b221f79f3c3d565d5265afbc00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ae757f51afe65c51e0021df64e4557b2d5f0297779c418800583a8116c7251e623d66ab41e7d0c4fdf93875463d0469749275fc3b9300a3fd01e091119d0396
|
7
|
+
data.tar.gz: 45164b9d4b3c310739b7b497d8f2768f5c80505859fd484f5a3484a947bde98e20e5025f28d0aa2cea007fcf64877eb7d123de0313bb3d95232f5104c5fc163c
|
data/README.md
CHANGED
@@ -1,28 +1 @@
|
|
1
|
-
|
2
|
-
Short description and motivation.
|
3
|
-
|
4
|
-
## Usage
|
5
|
-
How to use my plugin.
|
6
|
-
|
7
|
-
## Installation
|
8
|
-
Add this line to your application's Gemfile:
|
9
|
-
|
10
|
-
```ruby
|
11
|
-
gem "thecore_ui_rails_admin"
|
12
|
-
```
|
13
|
-
|
14
|
-
And then execute:
|
15
|
-
```bash
|
16
|
-
$ bundle
|
17
|
-
```
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
```bash
|
21
|
-
$ gem install thecore_ui_rails_admin
|
22
|
-
```
|
23
|
-
|
24
|
-
## Contributing
|
25
|
-
Contribution directions go here.
|
26
|
-
|
27
|
-
## License
|
28
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
1
|
+
This is part of Thecore framework: https://github.com/gabrieletassoni/thecore/tree/release/3
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<%= form_for(@object, url: change_password_path, html: { method: :patch }, class: "main") do |f| %>
|
2
|
+
|
3
|
+
<fieldset>
|
4
|
+
<div class="control-group row mb-3 string_type password_field " id="user_password_field">
|
5
|
+
<label class="col-sm-2 col-form-label text-md-end" for="user_password">Password</label>
|
6
|
+
<div class="col-sm-10 controls">
|
7
|
+
<input class="form-control" required="required" size="50" type="password" name="user[password]" id="user_password">
|
8
|
+
<div class="form-text"><%=t('admin.form.required')%></div>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
<div class="control-group row mb-3 string_type password_confirmation_field " id="user_password_confirmation_field">
|
12
|
+
<label class="col-sm-2 col-form-label text-md-end" for="user_password_confirmation">Password Confirmation</label>
|
13
|
+
<div class="col-sm-10 controls">
|
14
|
+
<input class="form-control" required="required" size="50" type="password" name="user[password_confirmation]" id="user_password_confirmation">
|
15
|
+
<div class="form-text"><%=t('admin.form.required')%></div>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</fieldset>
|
19
|
+
<div class="form-actions row justify-content-end my-3">
|
20
|
+
<div class="col-sm-10">
|
21
|
+
<input name="return_to" type="hidden" value="<%=edit_path(@abstract_model, @object.id)%>">
|
22
|
+
<button class="btn btn-primary" data-disable-with="Save" name="_save" type="submit">
|
23
|
+
<i class="fas fa-check"></i>
|
24
|
+
Save
|
25
|
+
</button>
|
26
|
+
<button class="btn btn-light" data-disable-with="Cancel" formnovalidate="true" name="_continue" type="submit">
|
27
|
+
<i class="fas fa-times"></i>
|
28
|
+
Cancel
|
29
|
+
</button>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
<% end %>
|
data/config/locales/en.main.yml
CHANGED
@@ -1,17 +1,31 @@
|
|
1
1
|
en:
|
2
2
|
export: Export
|
3
3
|
export_all: Export All
|
4
|
-
export_found: Export
|
4
|
+
export_found: Export Filtered
|
5
5
|
export_selected: Export Selected
|
6
6
|
delete_selected: Delete Selected
|
7
7
|
yes: "Yes"
|
8
8
|
no: "No"
|
9
9
|
error: Error
|
10
10
|
question: Question
|
11
|
-
root_actions:
|
11
|
+
root_actions: Actions
|
12
12
|
admin:
|
13
13
|
misc:
|
14
14
|
root_navigation: Actions
|
15
|
+
flash:
|
16
|
+
error: "Unable to perform action %{action} (%{name})"
|
17
|
+
model_not_found: Unable to find model '%{model}'
|
18
|
+
noaction: Unable to perform action
|
19
|
+
object_not_found: "Unable to find model %{model} with id '%{id}'"
|
20
|
+
successful: "Action executed successfully: %{action} (%{name})"
|
21
|
+
actions:
|
22
|
+
thecore_blazer_bi:
|
23
|
+
menu: Business Intelligence
|
24
|
+
breadcrumb: Business Intelligence
|
25
|
+
title: Business Intelligence
|
26
|
+
index:
|
27
|
+
link: Show All Items
|
28
|
+
label: Settings
|
15
29
|
advanced:
|
16
30
|
label: Advanced
|
17
31
|
logging:
|
@@ -21,10 +35,10 @@ en:
|
|
21
35
|
operations:
|
22
36
|
label: Operations
|
23
37
|
master_data_set:
|
24
|
-
label:
|
38
|
+
label: Data
|
25
39
|
js:
|
26
|
-
true:
|
27
|
-
false:
|
40
|
+
true: True
|
41
|
+
false: False
|
28
42
|
is_present: Is present
|
29
43
|
is_blank: Is blank
|
30
44
|
date: Date ...
|
@@ -1,40 +1,19 @@
|
|
1
1
|
en:
|
2
2
|
admin:
|
3
|
+
misc:
|
4
|
+
reset_filters: Remove Filters
|
3
5
|
actions:
|
6
|
+
index:
|
7
|
+
no_records: No records to show
|
4
8
|
active_job_monitor:
|
5
9
|
menu: Async Worker Monitor
|
6
10
|
title: Async Worker Monitor
|
7
11
|
breadcrumb: Async Worker Monitor
|
8
|
-
|
9
|
-
|
12
|
+
change_password:
|
13
|
+
title: Change Password
|
14
|
+
breadcrumb: Change Password
|
15
|
+
menu: Change Password
|
16
|
+
success: Your password has been changed successfully
|
17
|
+
error: An error occurred while changing your password
|
10
18
|
scopes:
|
11
|
-
_all:
|
12
|
-
all: All
|
13
|
-
order_by_name: Order By Name
|
14
|
-
order_by_insert_date: Order By Date
|
15
|
-
starts_with_a: Starts with A
|
16
|
-
starts_with_b: Starts with B
|
17
|
-
starts_with_c: Starts with C
|
18
|
-
starts_with_d: Starts with D
|
19
|
-
starts_with_e: Starts with E
|
20
|
-
starts_with_f: Starts with F
|
21
|
-
starts_with_g: Starts with G
|
22
|
-
starts_with_h: Starts with H
|
23
|
-
starts_with_i: Starts with I
|
24
|
-
starts_with_j: Starts with J
|
25
|
-
starts_with_k: Starts with K
|
26
|
-
starts_with_l: Starts with L
|
27
|
-
starts_with_m: Starts with M
|
28
|
-
starts_with_n: Starts with N
|
29
|
-
starts_with_o: Starts with O
|
30
|
-
starts_with_p: Starts with P
|
31
|
-
starts_with_q: Starts with Q
|
32
|
-
starts_with_r: Starts with R
|
33
|
-
starts_with_s: Starts with S
|
34
|
-
starts_with_t: Starts with T
|
35
|
-
starts_with_u: Starts with U
|
36
|
-
starts_with_v: Starts with V
|
37
|
-
starts_with_w: Starts with W
|
38
|
-
starts_with_x: Starts with X
|
39
|
-
starts_with_y: Starts with Y
|
40
|
-
starts_with_z: Starts with Z
|
19
|
+
_all: All
|
@@ -9,5 +9,11 @@ it:
|
|
9
9
|
menu: Async Worker Monitor
|
10
10
|
title: Async Worker Monitor
|
11
11
|
breadcrumb: Async Worker Monitor
|
12
|
+
change_password:
|
13
|
+
title: Cambia Password
|
14
|
+
breadcrumb: Cambia Password
|
15
|
+
menu: Cambia Password
|
16
|
+
success: La tua password è stata cambiata con successo
|
17
|
+
error: Si è verificato un errore durante il cambio della password
|
12
18
|
scopes:
|
13
19
|
_all: Tutti
|
@@ -0,0 +1,27 @@
|
|
1
|
+
RailsAdmin::Config::Actions.add_action "change_password", :base, :member do
|
2
|
+
|
3
|
+
link_icon 'fas fa-shield'
|
4
|
+
|
5
|
+
http_methods [:get, :patch]
|
6
|
+
|
7
|
+
# Visible only for the User model
|
8
|
+
visible do
|
9
|
+
bindings[:object].is_a?(::User)
|
10
|
+
end
|
11
|
+
# Adding the controller which is needed to compute calls from the ui
|
12
|
+
controller do
|
13
|
+
proc do
|
14
|
+
# if it's a form submission, then update the password
|
15
|
+
if request.patch?
|
16
|
+
if ::User.find(@object.id).update(password: params[:user][:password], password_confirmation: params[:user][:password_confirmation])
|
17
|
+
flash[:success] = I18n.t("admin.actions.change_password.success")
|
18
|
+
else
|
19
|
+
# Add errors to the object
|
20
|
+
flash[:error] = I18n.t("admin.actions.change_password.error")
|
21
|
+
end
|
22
|
+
# Redirect to the object
|
23
|
+
redirect_to index_path(model_name: @abstract_model.to_param)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thecore_ui_rails_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_ui_commons
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- app/views/rails_admin/main/_dashboard_block.html.erb
|
84
84
|
- app/views/rails_admin/main/_form_boolean.html.erb
|
85
85
|
- app/views/rails_admin/main/active_job_monitor.html.erb
|
86
|
+
- app/views/rails_admin/main/change_password.html.erb
|
86
87
|
- app/views/rails_admin/main/dashboard.html.erb
|
87
88
|
- config/initializers/abilities.rb
|
88
89
|
- config/initializers/add_to_db_migrations.rb
|
@@ -99,15 +100,14 @@ files:
|
|
99
100
|
- config/initializers/concern_settings.rb
|
100
101
|
- config/initializers/concern_target.rb
|
101
102
|
- config/initializers/concern_user.rb
|
102
|
-
- config/locales/en.index_cards.custom.yml
|
103
103
|
- config/locales/en.main.yml
|
104
104
|
- config/locales/en.rails_admin.yml
|
105
105
|
- config/locales/en.rollincode.yml
|
106
|
-
- config/locales/it.index_cards.custom.yml
|
107
106
|
- config/locales/it.main.yml
|
108
107
|
- config/locales/it.rails_admin.yml
|
109
108
|
- config/locales/it.rollincode.yml
|
110
109
|
- db/seeds.rb
|
110
|
+
- lib/member_actions/change_password.rb
|
111
111
|
- lib/root_actions/active_job_monitor.rb
|
112
112
|
- lib/tasks/thecore_ui_rails_admin_tasks.rake
|
113
113
|
- lib/thecore_ui_rails_admin.rb
|
@@ -1,20 +0,0 @@
|
|
1
|
-
it:
|
2
|
-
admin:
|
3
|
-
actions:
|
4
|
-
new:
|
5
|
-
menu: ""
|
6
|
-
index:
|
7
|
-
menu: ""
|
8
|
-
export:
|
9
|
-
menu: ""
|
10
|
-
export:
|
11
|
-
found: ➦
|
12
|
-
misc:
|
13
|
-
# order_by: ⇅
|
14
|
-
# scopes: ⋔
|
15
|
-
# add_filter: ⋔
|
16
|
-
# add_new: ⋔
|
17
|
-
refresh: Cerca
|
18
|
-
# bulk_menu_title: ☑
|
19
|
-
# select:
|
20
|
-
# toggle: ☒
|