lato 0.1.25 → 0.1.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/assets/config/lato_manifest.js +2 -2
- data/app/controllers/lato/account_controller.rb +3 -3
- data/app/controllers/lato/application_controller.rb +22 -1
- data/app/controllers/lato/authentication_controller.rb +6 -6
- data/app/helpers/lato/application_helper.rb +7 -0
- data/app/helpers/lato/components_helper.rb +7 -1
- data/app/models/lato/user.rb +15 -11
- data/app/views/lato/account/_alert-accepted-privacy-policy-version.html.erb +5 -3
- data/app/views/lato/account/_alert-accepted-terms-and-conditions-version.html.erb +5 -3
- data/app/views/lato/account/_form-destroy.html.erb +2 -2
- data/app/views/lato/account/_form-password.html.erb +3 -3
- data/app/views/lato/account/_form-user.html.erb +3 -3
- data/app/views/lato/account/index.html.erb +7 -8
- data/app/views/lato/authentication/_form-recover-password.html.erb +1 -1
- data/app/views/lato/authentication/_form-signin.html.erb +2 -2
- data/app/views/lato/authentication/_form-signup.html.erb +3 -3
- data/app/views/lato/authentication/_form-update-password.html.erb +4 -4
- data/app/views/lato/authentication/recover_password.html.erb +2 -2
- data/app/views/lato/authentication/signin.html.erb +2 -2
- data/app/views/lato/authentication/signout.html.erb +3 -3
- data/app/views/lato/authentication/signup.html.erb +2 -2
- data/app/views/lato/authentication/update_password.html.erb +2 -2
- data/app/views/lato/components/_index.html.erb +50 -23
- data/app/views/lato/components/_navbar_nav_locales_item.html.erb +8 -0
- data/app/views/lato/mailer/user/email_verification_mail.html.erb +17 -1
- data/app/views/lato/mailer/user/password_update_mail.html.erb +17 -1
- data/app/views/layouts/lato/_feedbacks.html.erb +1 -1
- data/app/views/layouts/lato/_footer.html.erb +2 -2
- data/app/views/layouts/lato/_mailer-head_content.html.erb +7 -2
- data/app/views/layouts/lato/_navbar-nav_content.html.erb +6 -4
- data/app/views/layouts/lato/application.html.erb +3 -0
- data/config/importmap.rb +2 -5
- data/config/locales/en.yml +39 -1
- data/config/locales/it.yml +39 -1
- data/config/routes.rb +2 -0
- data/db/migrate/20221229233844_add_locale_to_lato_user.rb +5 -0
- data/lib/lato/btstrap.rb +1 -1
- data/lib/lato/config.rb +2 -2
- data/lib/lato/version.rb +1 -1
- data/lib/tasks/lato_tasks.rake +3 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6efff0dabd7587626cdb6a08a71312793654ddfed11b2a60fea58e58475eb8ac
|
4
|
+
data.tar.gz: ff65ff6ad27a5b14c02742de7bb692a24e87e9305136d0bcfb0e9c9406377c26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9acbbfba492ee88a0f8acf41265966e7904de8e1cf060331b115e12d06ac41f58782935a4ab7b60c20b18bf1a62aa9e7850e69ea66160530e98c7927c2c6d914
|
7
|
+
data.tar.gz: 532de791068976f1a0b4b693e14e0a10dd5ce88ebf7043065dd0c409fa2a7b1f3195799a00c74f64b36273260458a91e72394f27ee1b5eb83ebf307fba3e5270
|
data/README.md
CHANGED
@@ -59,12 +59,12 @@ import "lato/application";
|
|
59
59
|
// ....
|
60
60
|
```
|
61
61
|
|
62
|
-
Setup
|
62
|
+
Setup I18n on the **config/application.rb** file:
|
63
63
|
|
64
64
|
```ruby
|
65
65
|
module MyApplication
|
66
66
|
class Application < Rails::Application
|
67
|
-
config.i18n.available_locales = [:it]
|
67
|
+
config.i18n.available_locales = [:it, :en]
|
68
68
|
config.i18n.default_locale = :it
|
69
69
|
|
70
70
|
# ...
|
@@ -8,7 +8,7 @@ module Lato
|
|
8
8
|
def update_user_action
|
9
9
|
respond_to do |format|
|
10
10
|
if @session.user.update(params.require(:user).permit(:first_name, :last_name, :email))
|
11
|
-
format.html { redirect_to lato.account_path, notice: '
|
11
|
+
format.html { redirect_to lato.account_path, notice: I18n.t('lato.account_controller.update_user_action_notice') }
|
12
12
|
format.json { render json: @session.user }
|
13
13
|
else
|
14
14
|
format.html { render :index, status: :unprocessable_entity }
|
@@ -20,7 +20,7 @@ module Lato
|
|
20
20
|
def request_verify_email_action
|
21
21
|
respond_to do |format|
|
22
22
|
if @session.user.request_verify_email
|
23
|
-
format.html { redirect_to lato.account_path, notice: '
|
23
|
+
format.html { redirect_to lato.account_path, notice: I18n.t('lato.account_controller.request_verify_email_action_notice') }
|
24
24
|
format.json { render json: @session.user }
|
25
25
|
else
|
26
26
|
format.html { render :index, status: :unprocessable_entity }
|
@@ -32,7 +32,7 @@ module Lato
|
|
32
32
|
def update_password_action
|
33
33
|
respond_to do |format|
|
34
34
|
if @session.user.update(params.require(:user).permit(:password, :password_confirmation))
|
35
|
-
format.html { redirect_to lato.account_path, notice: '
|
35
|
+
format.html { redirect_to lato.account_path, notice: I18n.t('lato.account_controller.update_password_action_notice') }
|
36
36
|
format.json { render json: @session.user }
|
37
37
|
else
|
38
38
|
format.html { render :index, status: :unprocessable_entity }
|
@@ -4,18 +4,39 @@ module Lato
|
|
4
4
|
include Lato::Layoutable
|
5
5
|
include Lato::Componentable
|
6
6
|
|
7
|
+
before_action :set_default_locale
|
8
|
+
|
7
9
|
def index
|
8
10
|
session_root_path = Lato.config.session_root_path ? main_app.send(Lato.config.session_root_path) : lato.account_path
|
9
11
|
redirect_to @session.valid? ? session_root_path : lato.authentication_signin_path
|
10
12
|
end
|
11
13
|
|
14
|
+
def switch_locale
|
15
|
+
I18n.locale = params[:locale]
|
16
|
+
@session.user.update(locale: params[:locale]) if @session.valid?
|
17
|
+
respond_to_redirect_same_page
|
18
|
+
end
|
19
|
+
|
12
20
|
protected
|
13
21
|
|
14
|
-
def
|
22
|
+
def set_default_locale
|
23
|
+
return unless @session.valid?
|
24
|
+
|
25
|
+
I18n.locale = @session.user.locale || I18n.default_locale
|
26
|
+
end
|
27
|
+
|
28
|
+
def respond_to_with_not_found
|
15
29
|
respond_to do |format|
|
16
30
|
format.html { render plain: '', status: :not_found }
|
17
31
|
format.json { render json: {}, status: :not_found }
|
18
32
|
end
|
19
33
|
end
|
34
|
+
|
35
|
+
def respond_to_redirect_same_page(notice = nil)
|
36
|
+
respond_to do |format|
|
37
|
+
format.html { redirect_to request.referer, notice: notice }
|
38
|
+
format.json { render json: {} }
|
39
|
+
end
|
40
|
+
end
|
20
41
|
end
|
21
42
|
end
|
@@ -54,7 +54,7 @@ module Lato
|
|
54
54
|
|
55
55
|
respond_to do |format|
|
56
56
|
format.html { redirect_to lato.root_path }
|
57
|
-
format.json { render
|
57
|
+
format.json { render json: {} }
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
@@ -65,7 +65,7 @@ module Lato
|
|
65
65
|
def verify_email_action
|
66
66
|
respond_to do |format|
|
67
67
|
if @user.verify_email(params.require(:user).permit(:code))
|
68
|
-
format.html { redirect_to lato.root_path, notice: '
|
68
|
+
format.html { redirect_to lato.root_path, notice: I18n.t('lato.authentication_controller.verify_email_action_notice') }
|
69
69
|
format.json { render json: @user }
|
70
70
|
else
|
71
71
|
format.html { render :verify_email, status: :unprocessable_entity }
|
@@ -97,7 +97,7 @@ module Lato
|
|
97
97
|
def update_password_action
|
98
98
|
respond_to do |format|
|
99
99
|
if @user.update_password(params.require(:user).permit(:code, :password, :password_confirmation))
|
100
|
-
format.html { redirect_to lato.authentication_signin_path, notice: '
|
100
|
+
format.html { redirect_to lato.authentication_signin_path, notice: I18n.t('lato.authentication_controller.update_password_action_notice') }
|
101
101
|
format.json { render json: @user }
|
102
102
|
else
|
103
103
|
format.html { render :update_password, status: :unprocessable_entity }
|
@@ -110,19 +110,19 @@ module Lato
|
|
110
110
|
|
111
111
|
def find_user
|
112
112
|
@user = User.find_by(id: params[:id])
|
113
|
-
|
113
|
+
respond_to_with_not_found unless @user
|
114
114
|
end
|
115
115
|
|
116
116
|
def lock_signup_if_disabled
|
117
117
|
return unless Lato.config.auth_disable_signup
|
118
118
|
|
119
|
-
|
119
|
+
respond_to_with_not_found
|
120
120
|
end
|
121
121
|
|
122
122
|
def lock_recover_password_if_disabled
|
123
123
|
return unless Lato.config.auth_disable_recover_password
|
124
124
|
|
125
|
-
|
125
|
+
respond_to_with_not_found
|
126
126
|
end
|
127
127
|
end
|
128
128
|
end
|
@@ -12,6 +12,12 @@ module Lato
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
+
def lato_navbar_nav_locales_item(options = {})
|
16
|
+
flag = options[:flag] || false
|
17
|
+
|
18
|
+
render 'lato/components/navbar_nav_locales_item', flag: flag
|
19
|
+
end
|
20
|
+
|
15
21
|
# Sidebar
|
16
22
|
##
|
17
23
|
|
@@ -111,7 +117,7 @@ module Lato
|
|
111
117
|
end
|
112
118
|
|
113
119
|
content_tag :div, options do
|
114
|
-
concat content_tag(:span, "#{I18n.t('
|
120
|
+
concat content_tag(:span, "#{I18n.t('lato.there_are_some_errors')}:")
|
115
121
|
concat errors_list
|
116
122
|
concat button_tag('', type: 'button', class: 'btn-close', data: { bs_dismiss: 'alert' }) unless options[:fixed]
|
117
123
|
end
|
data/app/models/lato/user.rb
CHANGED
@@ -32,6 +32,10 @@ module Lato
|
|
32
32
|
self.email = email&.downcase&.strip
|
33
33
|
end
|
34
34
|
|
35
|
+
before_create do
|
36
|
+
self.locale ||= I18n.default_locale
|
37
|
+
end
|
38
|
+
|
35
39
|
before_save do
|
36
40
|
self.email_verified_at = nil if email_changed?
|
37
41
|
self.accepted_privacy_policy_version = Lato.config.legal_privacy_policy_version if accepted_privacy_policy_version_changed?
|
@@ -64,12 +68,12 @@ module Lato
|
|
64
68
|
|
65
69
|
user = Lato::User.find_by(email: params[:email])
|
66
70
|
unless user
|
67
|
-
errors.add(:email,
|
71
|
+
errors.add(:email, :not_correct)
|
68
72
|
return
|
69
73
|
end
|
70
74
|
|
71
75
|
unless user.authenticate(params[:password])
|
72
|
-
errors.add(:password,
|
76
|
+
errors.add(:password, :not_correct)
|
73
77
|
return
|
74
78
|
end
|
75
79
|
|
@@ -81,14 +85,14 @@ module Lato
|
|
81
85
|
|
82
86
|
def request_verify_email
|
83
87
|
if email_verification_semaphore.value
|
84
|
-
errors.add(:base,
|
88
|
+
errors.add(:base, :email_verification_limit)
|
85
89
|
return
|
86
90
|
end
|
87
91
|
|
88
92
|
code = SecureRandom.hex.upcase
|
89
93
|
delivery = Lato::UserMailer.email_verification_mail(id, code).deliver_now
|
90
94
|
unless delivery
|
91
|
-
errors.add(:base,
|
95
|
+
errors.add(:base, :email_sending_error)
|
92
96
|
return
|
93
97
|
end
|
94
98
|
|
@@ -100,12 +104,12 @@ module Lato
|
|
100
104
|
|
101
105
|
def verify_email(params)
|
102
106
|
unless email_verification_code.value
|
103
|
-
errors.add(:base,
|
107
|
+
errors.add(:base, :email_verification_code_expired)
|
104
108
|
return
|
105
109
|
end
|
106
110
|
|
107
111
|
unless email_verification_code.value == params[:code]
|
108
|
-
errors.add(:base,
|
112
|
+
errors.add(:base, :email_verification_code_invalid)
|
109
113
|
return
|
110
114
|
end
|
111
115
|
|
@@ -135,7 +139,7 @@ module Lato
|
|
135
139
|
code = SecureRandom.hex.upcase
|
136
140
|
delivery = Lato::UserMailer.password_update_mail(user.id, code).deliver_now
|
137
141
|
unless delivery
|
138
|
-
errors.add(:base,
|
142
|
+
errors.add(:base, :email_sending_error)
|
139
143
|
return
|
140
144
|
end
|
141
145
|
|
@@ -149,12 +153,12 @@ module Lato
|
|
149
153
|
|
150
154
|
def update_password(params)
|
151
155
|
unless password_update_code.value
|
152
|
-
errors.add(:base,
|
156
|
+
errors.add(:base, :password_update_code_expired)
|
153
157
|
return
|
154
158
|
end
|
155
159
|
|
156
160
|
unless password_update_code.value == params[:code]
|
157
|
-
errors.add(:base,
|
161
|
+
errors.add(:base, :password_update_code_invalid)
|
158
162
|
return
|
159
163
|
end
|
160
164
|
|
@@ -165,7 +169,7 @@ module Lato
|
|
165
169
|
|
166
170
|
def update_accepted_privacy_policy_version(params)
|
167
171
|
unless params[:confirm]
|
168
|
-
errors.add(:base,
|
172
|
+
errors.add(:base, :privacy_policy_invalid)
|
169
173
|
return
|
170
174
|
end
|
171
175
|
|
@@ -174,7 +178,7 @@ module Lato
|
|
174
178
|
|
175
179
|
def update_accepted_terms_and_conditions_version(params)
|
176
180
|
unless params[:confirm]
|
177
|
-
errors.add(:base,
|
181
|
+
errors.add(:base, :terms_and_conditions_invalid)
|
178
182
|
return
|
179
183
|
end
|
180
184
|
|
@@ -1,18 +1,20 @@
|
|
1
1
|
<%= turbo_frame_tag 'account_alert-accepted-privacy-policy-version' do %>
|
2
2
|
<% unless @session.user.valid_accepted_privacy_policy_version? %>
|
3
3
|
<div class="alert alert-info mb-4">
|
4
|
-
<h2 class="alert-heading"
|
4
|
+
<h2 class="alert-heading"><%= I18n.t('lato.privacy_policy_update_title') %></h2>
|
5
|
+
<% if I18n.locale == :it %>
|
5
6
|
<p>
|
6
7
|
Ciao <%= @session.user.first_name %>,<br>
|
7
8
|
Ti informiamo che è stato rilasciato un <b>aggiornamento della nostra privacy policy</b>.<br>
|
8
9
|
Per continuare a utilizzare <%= Lato.config.application_title %> è necessario prendere visione e accettare la nuova privacy policy.<br>
|
9
10
|
</p>
|
11
|
+
<% end %>
|
10
12
|
<%= form_with model: @session.user, url: lato.account_update_accepted_privacy_policy_version_action_path, data: { turbo_frame: '_self' } do |form| %>
|
11
13
|
<%= lato_form_errors @session.user, class: %w[mb-3] %>
|
12
|
-
<%= lato_form_item_input_check form, :confirm,
|
14
|
+
<%= lato_form_item_input_check form, :confirm, I18n.t('lato.privacy_policy_checkbox', link: link_to(I18n.t('lato.privacy_policy'), Lato.config.legal_privacy_policy_url)), checked: false, required: true %>
|
13
15
|
|
14
16
|
<div class="mt-3">
|
15
|
-
<%= lato_form_submit form, '
|
17
|
+
<%= lato_form_submit form, I18n.t('lato.confirm') %>
|
16
18
|
</div>
|
17
19
|
<% end %>
|
18
20
|
</div>
|
@@ -1,18 +1,20 @@
|
|
1
1
|
<%= turbo_frame_tag 'account_alert-accepted-terms-and-conditions-version' do %>
|
2
2
|
<% unless @session.user.valid_accepted_terms_and_conditions_version? %>
|
3
3
|
<div class="alert alert-info mb-4">
|
4
|
-
<h2 class="alert-heading"
|
4
|
+
<h2 class="alert-heading"><%= I18n.t('lato.terms_and_conditions_update_title') %></h2>
|
5
|
+
<% if I18n.locale == :it %>
|
5
6
|
<p>
|
6
7
|
Ciao <%= @session.user.first_name %>,<br>
|
7
8
|
Ti informiamo che è stato rilasciato un <b>aggiornamento dei nostri termini e condizioni</b> di utilizzo.<br>
|
8
9
|
Per continuare a utilizzare <%= Lato.config.application_title %> è necessario prendere visione e accettare i nuovi termini.<br>
|
9
10
|
</p>
|
11
|
+
<% end %>
|
10
12
|
<%= form_with model: @session.user, url: lato.account_update_accepted_terms_and_conditions_version_action_path, data: { turbo_frame: '_self' } do |form| %>
|
11
13
|
<%= lato_form_errors @session.user, class: %w[mb-3] %>
|
12
|
-
<%= lato_form_item_input_check form, :confirm,
|
14
|
+
<%= lato_form_item_input_check form, :confirm, I18n.t('lato.terms_and_conditions_checkbox', link: link_to(I18n.t('lato.terms_and_conditions'), Lato.config.legal_terms_and_conditions_url)), checked: false, required: true %>
|
13
15
|
|
14
16
|
<div class="mt-3">
|
15
|
-
<%= lato_form_submit form, '
|
17
|
+
<%= lato_form_submit form, I18n.t('lato.confirm') %>
|
16
18
|
</div>
|
17
19
|
<% end %>
|
18
20
|
</div>
|
@@ -10,12 +10,12 @@ user ||= Lato::User.new
|
|
10
10
|
<%= lato_form_errors user, class: %w[mb-3] %>
|
11
11
|
|
12
12
|
<div class="mb-3">
|
13
|
-
<%= lato_form_item_label form, :email_confirmation, '
|
13
|
+
<%= lato_form_item_label form, :email_confirmation, I18n.t('lato.signup_email') %>
|
14
14
|
<%= lato_form_item_input_email form, :email_confirmation, required: true %>
|
15
15
|
</div>
|
16
16
|
|
17
17
|
<div class="d-flex justify-content-end">
|
18
|
-
<%= lato_form_submit form, '
|
18
|
+
<%= lato_form_submit form, I18n.t('lato.account_delete_confirm'), class: %w[btn-danger] %>
|
19
19
|
</div>
|
20
20
|
<% end %>
|
21
21
|
<% end %>
|
@@ -11,18 +11,18 @@ user ||= Lato::User.new
|
|
11
11
|
|
12
12
|
<div class="row">
|
13
13
|
<div class="col col-12 col-lg-6 mb-3">
|
14
|
-
<%= lato_form_item_label form, :password, '
|
14
|
+
<%= lato_form_item_label form, :password, I18n.t('lato.new_password') %>
|
15
15
|
<%= lato_form_item_input_password form, :password, required: true %>
|
16
16
|
</div>
|
17
17
|
|
18
18
|
<div class="col col-12 col-lg-6 mb-3">
|
19
|
-
<%= lato_form_item_label form, :password_confirmation, '
|
19
|
+
<%= lato_form_item_label form, :password_confirmation, I18n.t('lato.confirm_new_password') %>
|
20
20
|
<%= lato_form_item_input_password form, :password_confirmation, required: true %>
|
21
21
|
</div>
|
22
22
|
</div>
|
23
23
|
|
24
24
|
<div class="d-flex justify-content-end">
|
25
|
-
<%= lato_form_submit form, '
|
25
|
+
<%= lato_form_submit form, I18n.t('lato.update'), class: %w[btn-success] %>
|
26
26
|
</div>
|
27
27
|
<% end %>
|
28
28
|
<% end %>
|
@@ -25,16 +25,16 @@ user ||= Lato::User.new
|
|
25
25
|
<div class="input-group mb-3">
|
26
26
|
<%= lato_form_item_input_email form, :email, required: true %>
|
27
27
|
<% if user.email_verified_at %>
|
28
|
-
<button class="btn btn-outline-success" style="pointer-events: none"
|
28
|
+
<button class="btn btn-outline-success" style="pointer-events: none"><%= I18n.t('lato.email_verified') %></span>
|
29
29
|
<% else %>
|
30
|
-
<%= link_to '
|
30
|
+
<%= link_to I18n.t('lato.verify_email'), account_request_verify_email_action_path, class: 'btn btn-warning', data: { turbo_method: :patch, turbo_frame: '_self' } %>
|
31
31
|
<% end %>
|
32
32
|
</div>
|
33
33
|
</div>
|
34
34
|
</div>
|
35
35
|
|
36
36
|
<div class="d-flex justify-content-end">
|
37
|
-
<%= lato_form_submit form, '
|
37
|
+
<%= lato_form_submit form, I18n.t('lato.update'), class: %w[btn-success] %>
|
38
38
|
</div>
|
39
39
|
<% end %>
|
40
40
|
<% end %>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<%= lato_page_head '
|
1
|
+
<%= lato_page_head I18n.t('lato.account') %>
|
2
2
|
|
3
3
|
<%= render 'lato/account/alert-accepted-privacy-policy-version' %>
|
4
4
|
<%= render 'lato/account/alert-accepted-terms-and-conditions-version' %>
|
5
5
|
|
6
6
|
<div class="card mb-4">
|
7
7
|
<div class="card-header">
|
8
|
-
<h2 class="fs-4 mb-0"
|
8
|
+
<h2 class="fs-4 mb-0"><%= I18n.t('lato.account_informations') %></h2>
|
9
9
|
</div>
|
10
10
|
<div class="card-body">
|
11
11
|
<%= render 'lato/account/form-user', user: @session.user %>
|
@@ -25,7 +25,7 @@
|
|
25
25
|
|
26
26
|
<div class="card mb-4">
|
27
27
|
<div class="card-header">
|
28
|
-
<h2 class="fs-4 mb-0"
|
28
|
+
<h2 class="fs-4 mb-0"><%= I18n.t('lato.update_password') %></h2>
|
29
29
|
</div>
|
30
30
|
<div class="card-body">
|
31
31
|
<%= render 'lato/account/form-password', user: @session.user %>
|
@@ -46,17 +46,16 @@
|
|
46
46
|
|
47
47
|
<div class="card mb-4">
|
48
48
|
<div class="card-header">
|
49
|
-
<h2 class="fs-4 mb-0"
|
49
|
+
<h2 class="fs-4 mb-0"><%= I18n.t('lato.account_delete') %></h2>
|
50
50
|
</div>
|
51
51
|
<div class="card-body">
|
52
52
|
<div class="alert alert-warning">
|
53
|
-
<h4 class="alert-heading"
|
53
|
+
<h4 class="alert-heading"><%= I18n.t('lato.warning') %></h4>
|
54
54
|
<p>
|
55
|
-
|
56
|
-
Confermando l'eliminazione non ci sarà più modo di recuperare le informazioni perse.
|
55
|
+
<%= raw I18n.t('lato.account_delete_details') %>
|
57
56
|
</p>
|
58
57
|
<p class="mb-0">
|
59
|
-
|
58
|
+
<%= raw I18n.t('lato.account_delete_guide') %>
|
60
59
|
</p>
|
61
60
|
</div>
|
62
61
|
|
@@ -20,11 +20,11 @@ user ||= Lato::User.new
|
|
20
20
|
</div>
|
21
21
|
|
22
22
|
<div>
|
23
|
-
<%= lato_form_submit form, I18n.t('
|
23
|
+
<%= lato_form_submit form, I18n.t('lato.signin'), class: %w[d-block w-100] %>
|
24
24
|
</div>
|
25
25
|
<% unless Lato.config.auth_disable_signup %>
|
26
26
|
<div class="text-center mt-3 mb-3">
|
27
|
-
<%= I18n.t('
|
27
|
+
<%= I18n.t('lato.or').downcase %> <%= link_to I18n.t('lato.create_free_account').downcase, lato.authentication_signup_path %>
|
28
28
|
</div>
|
29
29
|
<% end %>
|
30
30
|
<% end %>
|
@@ -36,12 +36,12 @@ user ||= Lato::User.new
|
|
36
36
|
</div>
|
37
37
|
|
38
38
|
<div class="mb-3 text-muted" style="font-size: 14px;">
|
39
|
-
<%= lato_form_item_input_check form, :accepted_privacy_policy_version, I18n.t('
|
40
|
-
<%= lato_form_item_input_check form, :accepted_terms_and_conditions_version, I18n.t('
|
39
|
+
<%= lato_form_item_input_check form, :accepted_privacy_policy_version, I18n.t('lato.privacy_policy_checkbox', link: link_to(I18n.t('lato.privacy_policy'), Lato.config.legal_privacy_policy_url)), required: true %>
|
40
|
+
<%= lato_form_item_input_check form, :accepted_terms_and_conditions_version, I18n.t('lato.terms_and_conditions_checkbox', link: link_to(I18n.t('lato.terms_and_conditions'), Lato.config.legal_terms_and_conditions_url)), required: true %>
|
41
41
|
</div>
|
42
42
|
|
43
43
|
<div class="d-flex justify-content-end">
|
44
|
-
<%= lato_form_submit form, I18n.t('
|
44
|
+
<%= lato_form_submit form, I18n.t('lato.signup') %>
|
45
45
|
</div>
|
46
46
|
<% end %>
|
47
47
|
<% end %>
|
@@ -9,22 +9,22 @@ user ||= Lato::User.new
|
|
9
9
|
<%= lato_form_errors user, class: %w[mb-3] %>
|
10
10
|
|
11
11
|
<div class="mb-3">
|
12
|
-
<%= lato_form_item_label form, :code, '
|
12
|
+
<%= lato_form_item_label form, :code, I18n.t('lato.recover_password_code') %>
|
13
13
|
<%= lato_form_item_input_text form, :code, required: true %>
|
14
14
|
</div>
|
15
15
|
|
16
16
|
<div class="mb-3">
|
17
|
-
<%= lato_form_item_label form, :password, '
|
17
|
+
<%= lato_form_item_label form, :password, I18n.t('lato.new_password') %>
|
18
18
|
<%= lato_form_item_input_password form, :password, required: true %>
|
19
19
|
</div>
|
20
20
|
|
21
21
|
<div class="mb-3">
|
22
|
-
<%= lato_form_item_label form, :password_confirmation, '
|
22
|
+
<%= lato_form_item_label form, :password_confirmation, I18n.t('lato.confirm_new_password') %>
|
23
23
|
<%= lato_form_item_input_password form, :password_confirmation, required: true %>
|
24
24
|
</div>
|
25
25
|
|
26
26
|
<div class="d-flex justify-content-end">
|
27
|
-
<%= lato_form_submit form, I18n.t('
|
27
|
+
<%= lato_form_submit form, I18n.t('lato.confirm') %>
|
28
28
|
</div>
|
29
29
|
<% end %>
|
30
30
|
<% end %>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<div class="w-100 h-100 d-flex justify-content-center align-items-center" style="min-height: calc(100vh - 54px - 2rem)">
|
2
2
|
<div class="card w-100" style="max-width: 400px">
|
3
3
|
<div class="card-header">
|
4
|
-
<h1 class="fs-3 mb-0 text-center"><%= I18n.t('
|
4
|
+
<h1 class="fs-3 mb-0 text-center"><%= I18n.t('lato.recover_password') %></h1>
|
5
5
|
</div>
|
6
6
|
<div class="card-body">
|
7
7
|
<%= render 'lato/authentication/form-recover-password', user: @user %>
|
8
8
|
</div>
|
9
9
|
<div class="card-footer text-center">
|
10
|
-
<%= link_to I18n.t('
|
10
|
+
<%= link_to I18n.t('lato.back_to_login'), lato.authentication_signin_path, class: 'text-muted' %>
|
11
11
|
</div>
|
12
12
|
</div>
|
13
13
|
</div>
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<div class="w-100 h-100 d-flex justify-content-center align-items-center" style="min-height: calc(100vh - 54px - 2rem)">
|
2
2
|
<div class="card w-100" style="max-width: 400px">
|
3
3
|
<div class="card-header">
|
4
|
-
<h1 class="fs-3 mb-0 text-center"><%= I18n.t('
|
4
|
+
<h1 class="fs-3 mb-0 text-center"><%= I18n.t('lato.signin') %></h1>
|
5
5
|
</div>
|
6
6
|
<div class="card-body">
|
7
7
|
<%= render 'lato/authentication/form-signin', user: @user %>
|
8
8
|
</div>
|
9
9
|
<% unless Lato.config.auth_disable_recover_password %>
|
10
10
|
<div class="card-footer text-center">
|
11
|
-
<%= link_to I18n.t('
|
11
|
+
<%= link_to I18n.t('lato.forgot_your_password?'), lato.authentication_recover_password_path, class: 'text-muted' %>
|
12
12
|
</div>
|
13
13
|
<% end %>
|
14
14
|
</div>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<div class="w-100 h-100 d-flex justify-content-center align-items-center" style="min-height: calc(100vh - 54px - 2rem)">
|
2
2
|
<div class="card w-100" style="max-width: 350px">
|
3
3
|
<div class="card-body text-center">
|
4
|
-
<p><%= @session.user.first_name
|
4
|
+
<p><%= I18n.t 'lato.signout_confirmation_request', user: @session.user.first_name %></p>
|
5
5
|
<div>
|
6
|
-
<%= link_to '
|
7
|
-
<%= link_to '
|
6
|
+
<%= link_to I18n.t('lato.cancel'), lato.root_path, class: %w[btn btn-primary me-2] %>
|
7
|
+
<%= link_to I18n.t('lato.confirm'), lato.authentication_signout_action_path, class: %w[btn btn-danger ms-2], data: { turbo_method: :delete } %>
|
8
8
|
</div>
|
9
9
|
</div>
|
10
10
|
</div>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<div class="w-100 h-100 d-flex justify-content-center align-items-center" style="min-height: calc(100vh - 54px - 2rem)">
|
2
2
|
<div class="card w-100" style="max-width: 550px">
|
3
3
|
<div class="card-header">
|
4
|
-
<h1 class="fs-3 mb-0 text-center"><%= I18n.t('
|
4
|
+
<h1 class="fs-3 mb-0 text-center"><%= I18n.t('lato.signup') %></h1>
|
5
5
|
</div>
|
6
6
|
<div class="card-body">
|
7
7
|
<%= render 'lato/authentication/form-signup', user: @user %>
|
8
8
|
</div>
|
9
9
|
<div class="card-footer">
|
10
|
-
<%= link_to I18n.t('
|
10
|
+
<%= link_to I18n.t('lato.already_have_an_account?'), lato.authentication_signin_path, class: 'text-muted' %>
|
11
11
|
</div>
|
12
12
|
</div>
|
13
13
|
</div>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<div class="w-100 h-100 d-flex justify-content-center align-items-center" style="min-height: calc(100vh - 54px - 2rem)">
|
2
2
|
<div class="card w-100" style="max-width: 400px">
|
3
3
|
<div class="card-header">
|
4
|
-
<h1 class="fs-3 mb-0 text-center"><%= I18n.t('
|
4
|
+
<h1 class="fs-3 mb-0 text-center"><%= I18n.t('lato.update_password') %></h1>
|
5
5
|
</div>
|
6
6
|
<div class="card-body">
|
7
7
|
<%= render 'lato/authentication/form-update-password', user: @user %>
|
8
8
|
</div>
|
9
9
|
<div class="card-footer text-center">
|
10
|
-
<%= link_to I18n.t('
|
10
|
+
<%= link_to I18n.t('lato.back_to_login'), lato.authentication_signin_path, class: 'text-muted' %>
|
11
11
|
</div>
|
12
12
|
</div>
|
13
13
|
</div>
|
@@ -6,32 +6,59 @@
|
|
6
6
|
<%= hidden_field_tag k, v %>
|
7
7
|
<% end %>
|
8
8
|
|
9
|
-
<% if
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
</div>
|
20
|
-
<% else %>
|
21
|
-
<div></div>
|
22
|
-
<% end %>
|
9
|
+
<% if custom_actions.any? || searchable_columns.any? %>
|
10
|
+
<div class="d-flex justify-content-between mb-3">
|
11
|
+
<% if searchable_columns.any? %>
|
12
|
+
<div class="input-group">
|
13
|
+
<input type="text" name="search" class="form-control" placeholder="<%= I18n.t('lato.search_for') %>: <%= searchable_columns.map { |c| collection.model.human_attribute_name(c) }.to_sentence %>" value="<%= params[:search] %>">
|
14
|
+
<button class="btn btn-outline-primary" type="submit"><i class="bi bi-search"></i></button>
|
15
|
+
</div>
|
16
|
+
<% else %>
|
17
|
+
<div></div>
|
18
|
+
<% end %>
|
23
19
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
<% end %>
|
20
|
+
<div class="btn-group ms-2">
|
21
|
+
<% if custom_actions.any? %>
|
22
|
+
<% custom_actions.each do |action_key, action_params| %>
|
23
|
+
<%= link_to action_params[:path], { class: 'btn btn-primary' }.merge(action_params) do %>
|
24
|
+
<i class="<%= action_params[:icon] %>"></i>
|
30
25
|
<% end %>
|
31
26
|
<% end %>
|
32
|
-
|
27
|
+
<% end %>
|
33
28
|
</div>
|
34
|
-
|
29
|
+
</div>
|
30
|
+
<% end %>
|
31
|
+
|
32
|
+
<% if browser.device.mobile? %>
|
33
|
+
|
34
|
+
<ul class="list-group list-group-flush">
|
35
|
+
<% collection.each do |member| %>
|
36
|
+
<li class="list-group-item p-0 border-0">
|
37
|
+
<table class="table table-bordered">
|
38
|
+
<tbody>
|
39
|
+
<% columns.each do |column| %>
|
40
|
+
<tr>
|
41
|
+
<th><%= collection.model.human_attribute_name column %></th>
|
42
|
+
<td class="lato-index-col-<%= column %>">
|
43
|
+
<% viewer_function_name = "#{model_name_underscore}_#{column}" %>
|
44
|
+
<%= respond_to?(viewer_function_name) ? send(viewer_function_name, member) : member.send(column) %>
|
45
|
+
</td>
|
46
|
+
</tr>
|
47
|
+
<% end %>
|
48
|
+
</tbody>
|
49
|
+
</table>
|
50
|
+
</li>
|
51
|
+
<% end %>
|
52
|
+
</ul>
|
53
|
+
|
54
|
+
<div class="d-flex flex-column align-items-center">
|
55
|
+
<span class="text-muted"><%= collection.count %> <%= I18n.t('lato.viewed_results').downcase %>
|
56
|
+
<% if collection.respond_to?(:total_pages) %>
|
57
|
+
<div class="mt-3"><%= paginate collection %></div>
|
58
|
+
<% end %>
|
59
|
+
</div>
|
60
|
+
|
61
|
+
<% else %>
|
35
62
|
|
36
63
|
<div class="table-responsive">
|
37
64
|
<table class="table table-striped table-bordered">
|
@@ -80,7 +107,7 @@
|
|
80
107
|
<% else %>
|
81
108
|
<div></div>
|
82
109
|
<% end %>
|
83
|
-
<span class="text-muted"><%= collection.count %> <%= I18n.t('
|
110
|
+
<span class="text-muted"><%= collection.count %> <%= I18n.t('lato.viewed_results').downcase %>
|
84
111
|
</div>
|
85
112
|
</td>
|
86
113
|
</tr>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<li class="nav-item dropdown">
|
2
|
+
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false"><%= flag ? locale_to_flag(I18n.locale) : I18n.locale.upcase %></a>
|
3
|
+
<ul class="dropdown-menu dropdown-menu-lg-end" style="min-width: auto;">
|
4
|
+
<% I18n.available_locales.each do |locale| %>
|
5
|
+
<li><%= link_to (flag ? locale_to_flag(locale) : locale.upcase), lato.switch_locale_path(locale: locale), class: 'dropdown-item', data: { turbo_method: :post } %></li>
|
6
|
+
<% end %>
|
7
|
+
</ul>
|
8
|
+
</li>
|
@@ -1,3 +1,17 @@
|
|
1
|
+
<% if @user.locale == 'en' %>
|
2
|
+
|
3
|
+
To have access to all the features of <%= Lato.config.application_title %> you must confirm your email address.
|
4
|
+
<br><br>
|
5
|
+
Click the following link to confirm your email address:
|
6
|
+
<br><br>
|
7
|
+
<%= link_to lato.authentication_verify_email_url(id: @user.id, code: @code), lato.authentication_verify_email_url(id: @user.id, code: @code) %>
|
8
|
+
<br><br>
|
9
|
+
<small>
|
10
|
+
We remind you that the link is valid for 30 minutes. If the link is expired you can request a new one from the management page of your <%= Lato.config.application_title %> account.
|
11
|
+
</small>
|
12
|
+
|
13
|
+
<% else %>
|
14
|
+
|
1
15
|
Per avere accesso a tutte le funzionalità di <%= Lato.config.application_title %> devi confermare il tuo indirizzo email.
|
2
16
|
<br><br>
|
3
17
|
Clicca il seguente link per completare la procedura di configurazione:
|
@@ -6,4 +20,6 @@ Clicca il seguente link per completare la procedura di configurazione:
|
|
6
20
|
<br><br>
|
7
21
|
<small>
|
8
22
|
Ti ricordiamo che il link è valido per 30 minuti. Se il link risulta scaduto puoi richiederne uno nuovo dalla pagina di gestione del tuo account <%= Lato.config.application_title %>.
|
9
|
-
</small>
|
23
|
+
</small>
|
24
|
+
|
25
|
+
<% end %>
|
@@ -1,3 +1,17 @@
|
|
1
|
+
<% if @user.locale == 'en' %>
|
2
|
+
|
3
|
+
An update to your <%= Lato.config.application_title %> account password has been requested.
|
4
|
+
<br><br>
|
5
|
+
To complete the password update, enter the following code in the update form:
|
6
|
+
<br><br>
|
7
|
+
<b><%= @code %></b>
|
8
|
+
<br><br>
|
9
|
+
<small>
|
10
|
+
We remind you that the code is valid for 30 minutes. If you have not made any password update request ignore this email and do not share the code with anyone.
|
11
|
+
</small>
|
12
|
+
|
13
|
+
<% else %>
|
14
|
+
|
1
15
|
È stato richiesto un aggiornamento della password del tuo account <%= Lato.config.application_title %>.
|
2
16
|
<br><br>
|
3
17
|
Per completare l'aggiornamento inserisci il seguente codice nel form di aggiornamento:
|
@@ -6,4 +20,6 @@ Per completare l'aggiornamento inserisci il seguente codice nel form di aggiorna
|
|
6
20
|
<br><br>
|
7
21
|
<small>
|
8
22
|
Ti ricordiamo che il codice è valido per 30 minuti. Se non hai effettuato alcuna richiesta di aggiornamento password ignora questa email e non condividere il codice con nessuno.
|
9
|
-
</small>
|
23
|
+
</small>
|
24
|
+
|
25
|
+
<% end %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div data-controller="lato-feedback" id="feedbackNotice" class="toast hide" role="alert" aria-live="assertive" aria-atomic="true">
|
5
5
|
<div class="toast-header">
|
6
6
|
<i class="bi bi-check-circle-fill text-success me-2"></i>
|
7
|
-
<strong class="me-auto"
|
7
|
+
<strong class="me-auto"><%= I18n.t('lato.operation_completed') %></strong>
|
8
8
|
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
|
9
9
|
</div>
|
10
10
|
<div class="toast-body">
|
@@ -4,8 +4,8 @@
|
|
4
4
|
© <%= Date.today.year %> - <%= link_to Lato.config.application_company_name, Lato.config.application_company_url, target: '_blank' %>
|
5
5
|
</div>
|
6
6
|
<div class="mt-2 mt-md-0">
|
7
|
-
<%= link_to I18n.t('
|
8
|
-
<%= link_to I18n.t('
|
7
|
+
<%= link_to I18n.t('lato.privacy_policy'), Lato.config.legal_privacy_policy_url %> -
|
8
|
+
<%= link_to I18n.t('lato.terms_and_conditions'), Lato.config.legal_terms_and_conditions_url %>
|
9
9
|
</div>
|
10
10
|
</div>
|
11
11
|
</div>
|
@@ -1,15 +1,17 @@
|
|
1
1
|
<% if @session.valid? %>
|
2
2
|
<%= lato_navbar_nav_item :account, lato.account_path do %>
|
3
|
-
<%= I18n.t('
|
3
|
+
<%= I18n.t('lato.account') %>
|
4
4
|
<% end %>
|
5
5
|
<%= lato_navbar_nav_item :authentication_logout, lato.authentication_signout_path do %>
|
6
|
-
<%= I18n.t('
|
6
|
+
<%= I18n.t('lato.signout') %>
|
7
7
|
<% end %>
|
8
8
|
<% else %>
|
9
9
|
<%= lato_navbar_nav_item :authentication_signin, lato.authentication_signin_path do %>
|
10
|
-
<%= I18n.t('
|
10
|
+
<%= I18n.t('lato.signin') %>
|
11
11
|
<% end %>
|
12
12
|
<%= lato_navbar_nav_item :authentication_signup, lato.authentication_signup_path do %>
|
13
|
-
<%= I18n.t('
|
13
|
+
<%= I18n.t('lato.signup') %>
|
14
14
|
<% end %>
|
15
15
|
<% end %>
|
16
|
+
|
17
|
+
<%= lato_navbar_nav_locales_item(flag: true) %>
|
@@ -7,6 +7,9 @@
|
|
7
7
|
<%= csrf_meta_tags %>
|
8
8
|
<%= csp_meta_tag %>
|
9
9
|
|
10
|
+
<!-- TEMPORARY FIX: Popper js not working using bootstrap-gem -->
|
11
|
+
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
|
12
|
+
|
10
13
|
<%= stylesheet_link_tag Lato.config.assets_stylesheet_entry, media: "all" %>
|
11
14
|
<%= javascript_importmap_tags %>
|
12
15
|
</head>
|
data/config/importmap.rb
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
pin "lato/application", to: "lato/application.js"
|
2
2
|
pin_all_from Lato::Engine.root.join("app/assets/javascripts/lato/controllers"), under: "controllers", to: "lato/controllers"
|
3
3
|
|
4
|
-
pin "
|
5
|
-
pin "@
|
6
|
-
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
|
7
|
-
pin "bootstrap", to: "bootstrap.min.js", preload: true
|
8
|
-
pin "@popperjs/core", to: "popper.js", preload: true
|
4
|
+
pin "bootstrap", to: "bootstrap.js", preload: true
|
5
|
+
# pin "@popperjs/core", to: "popper.js", preload: true
|
data/config/locales/en.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
en:
|
2
|
-
|
2
|
+
lato:
|
3
3
|
account: Account
|
4
4
|
signout: Logout
|
5
5
|
signin: Login
|
@@ -14,12 +14,39 @@ en:
|
|
14
14
|
terms_and_conditions_checkbox: I accept the %{link}
|
15
15
|
recover_password: Recover password
|
16
16
|
next: Next
|
17
|
+
cancel: Cancel
|
17
18
|
back_to_login: Back to login
|
18
19
|
there_are_some_errors: There are some errors
|
19
20
|
update_password: Update password
|
20
21
|
confirm: Confirm
|
21
22
|
search_for: Search for
|
22
23
|
viewed_results: Results viewed
|
24
|
+
account_informations: Account informations
|
25
|
+
verify_email: Verify email
|
26
|
+
email_verified: Verified
|
27
|
+
update: Update
|
28
|
+
new_password: New password
|
29
|
+
confirm_new_password: Confirm new password
|
30
|
+
account_delete: Delete account
|
31
|
+
warning: Warning
|
32
|
+
account_delete_details: Deleting your account <b>will automatically delete all data associated</b> with it. By confirming the deletion there will be no way to recover the lost information.
|
33
|
+
account_delete_guide: Type in your registration email address and press "Delete Account" to proceed with the operation.
|
34
|
+
account_delete_confirm: Delete account
|
35
|
+
signup_email: Account email address
|
36
|
+
signout_confirmation_request: "%{user}, Are you sure to leave?"
|
37
|
+
recover_password_code: Code received by email
|
38
|
+
operation_completed: Operation completed
|
39
|
+
privacy_policy_update_title: Privacy policy update
|
40
|
+
terms_and_conditions_update_title: Terms and conditions update
|
41
|
+
|
42
|
+
account_controller:
|
43
|
+
update_user_action_notice: Account information properly updated
|
44
|
+
request_verify_email_action_notice: We have sent you an email with the steps to follow to complete the procedure
|
45
|
+
update_password_action_notice: Passwords updated successfully
|
46
|
+
authentication_controller:
|
47
|
+
verify_email_action_notice: Successfully verified email address
|
48
|
+
update_password_action_notice: Your password has been successfully updated
|
49
|
+
|
23
50
|
activerecord:
|
24
51
|
attributes:
|
25
52
|
lato/user:
|
@@ -33,6 +60,17 @@ en:
|
|
33
60
|
models:
|
34
61
|
lato/user:
|
35
62
|
attributes:
|
63
|
+
base:
|
64
|
+
email_sending_error: Unable to send mail
|
65
|
+
email_verification_limit: Wait at least 2 minutes to try a new email verification attempt
|
66
|
+
email_verification_code_expired: Email verification code has expired
|
67
|
+
email_verification_code_invalid: Email verification code is invalid
|
68
|
+
password_update_code_expired: Verification code has expired
|
69
|
+
password_update_code_invalid: Verification code is invalid
|
70
|
+
privacy_policy_invalid: To accept the privacy policy you must select the confirmation checkbox
|
71
|
+
terms_and_conditions_invalid: To accept the terms and conditions you must select the confirmation checkbox
|
72
|
+
password:
|
73
|
+
not_correct: not correct
|
36
74
|
email:
|
37
75
|
taken: already used with another account
|
38
76
|
not_registered: not registered
|
data/config/locales/it.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Start from: https://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/it.yml
|
2
2
|
|
3
3
|
it:
|
4
|
-
|
4
|
+
lato:
|
5
5
|
account: Account
|
6
6
|
signout: Esci
|
7
7
|
signin: Accedi
|
@@ -16,12 +16,39 @@ it:
|
|
16
16
|
terms_and_conditions_checkbox: Dichiaro di aver letto e accettato i %{link} di utilizzo
|
17
17
|
recover_password: Recupero password
|
18
18
|
next: Prosegui
|
19
|
+
cancel: Annulla
|
19
20
|
back_to_login: Torna al login
|
20
21
|
there_are_some_errors: Si sono verificati i seguenti errori
|
21
22
|
update_password: Aggiornamento password
|
22
23
|
confirm: Conferma
|
23
24
|
search_for: Ricerca per
|
24
25
|
viewed_results: Risultati visualizzati
|
26
|
+
account_informations: Informazioni account
|
27
|
+
verify_email: Verifica email
|
28
|
+
email_verified: Verificato
|
29
|
+
update: Aggiorna
|
30
|
+
new_password: Nuova password
|
31
|
+
confirm_new_password: Conferma nuova password
|
32
|
+
account_delete: Cancellazione account
|
33
|
+
warning: Attenzione
|
34
|
+
account_delete_details: Cancellando il tuo account <b>saranno automaticamente eliminati definitivamente tutti i dati</b> ad esso associati.<br>Confermando l'eliminazione non ci sarà più modo di recuperare le informazioni perse.
|
35
|
+
account_delete_guide: Digita il tuo indirizzo email di registrazione e premi "Elimina account" per procedere con l'operazione.
|
36
|
+
account_delete_confirm: Elimina account
|
37
|
+
signup_email: Indirizzo email di registrazione
|
38
|
+
signout_confirmation_request: "%{user}, Sei sicuro di voler uscire dal tuo account?"
|
39
|
+
recover_password_code: Codice ricevuto via email
|
40
|
+
operation_completed: Operazione completata
|
41
|
+
privacy_policy_update_title: Aggiornamento privacy policy
|
42
|
+
terms_and_conditions_update_title: Aggiornamento termini e condizioni
|
43
|
+
|
44
|
+
account_controller:
|
45
|
+
update_user_action_notice: Informazioni account aggiornate correttamente
|
46
|
+
request_verify_email_action_notice: Ti abbiamo inviato una email con i passaggi da seguire per completare la procedura
|
47
|
+
update_password_action_notice: Password aggiornate correttamente
|
48
|
+
authentication_controller:
|
49
|
+
verify_email_action_notice: Indirizzo email verificato correttamente
|
50
|
+
update_password_action_notice: La tua password è stata aggiornata correttamente
|
51
|
+
|
25
52
|
activerecord:
|
26
53
|
attributes:
|
27
54
|
lato/user:
|
@@ -40,6 +67,17 @@ it:
|
|
40
67
|
models:
|
41
68
|
lato/user:
|
42
69
|
attributes:
|
70
|
+
base:
|
71
|
+
email_sending_error: Impossibile inviare mail
|
72
|
+
email_verification_limit: Attendi almeno 2 minuti per provare un nuovo tentativo di verifica email
|
73
|
+
email_verification_code_expired: Il codice di verifica email risulta scaduto
|
74
|
+
email_verification_code_invalid: Il codice di verifica email non risulta valido
|
75
|
+
password_update_code_expired: Il codice di verifica risulta scaduto
|
76
|
+
password_update_code_invalid: Il codice di verifica non risulta valido
|
77
|
+
privacy_policy_invalid: Per accettare la privacy policy devi selezionare la checkbox di conferma
|
78
|
+
terms_and_conditions_invalid: Per accettare i termini e condizioni devi selezionare la checkbox di conferma
|
79
|
+
password:
|
80
|
+
not_correct: non corretta
|
43
81
|
password_confirmation:
|
44
82
|
confirmation: non corrisponde alla password
|
45
83
|
email:
|
data/config/routes.rb
CHANGED
data/lib/lato/btstrap.rb
CHANGED
@@ -17,7 +17,7 @@ module Lato
|
|
17
17
|
|
18
18
|
def initialize
|
19
19
|
# Navbar defaults
|
20
|
-
@navbar = 'navbar-
|
20
|
+
@navbar = 'navbar-dark navbar-expand-lg fixed-top bg-primary shadow-sm px-md-3'
|
21
21
|
@navbar_container = 'container-fluid'
|
22
22
|
@navbar_collapse = 'justify-content-end'
|
23
23
|
|
data/lib/lato/config.rb
CHANGED
@@ -37,9 +37,9 @@ module Lato
|
|
37
37
|
@email_from = 'lato@example.com'
|
38
38
|
|
39
39
|
@legal_privacy_policy_url = '#'
|
40
|
-
@legal_privacy_policy_version =
|
40
|
+
@legal_privacy_policy_version = 1
|
41
41
|
@legal_terms_and_conditions_url = '#'
|
42
|
-
@legal_terms_and_conditions_version =
|
42
|
+
@legal_terms_and_conditions_version = 1
|
43
43
|
end
|
44
44
|
end
|
45
45
|
end
|
data/lib/lato/version.rb
CHANGED
data/lib/tasks/lato_tasks.rake
CHANGED
@@ -27,7 +27,9 @@ namespace :lato do
|
|
27
27
|
FileUtils.copy(src_file_path, dest_file_path) unless File.exist? dest_file_path
|
28
28
|
end
|
29
29
|
|
30
|
-
# Copy "lato_user_application.rb" model concern from
|
30
|
+
# Copy "lato_user_application.rb" model concern from gem to main application
|
31
|
+
##
|
32
|
+
|
31
33
|
gem_concern_path = Lato::Engine.root.join('app', 'models', 'concerns', 'lato_user_application.rb').to_s
|
32
34
|
app_concern_path = Rails.root.join('app', 'models', 'concerns', 'lato_user_application.rb').to_s
|
33
35
|
FileUtils.copy(gem_concern_path, app_concern_path) unless File.exist? app_concern_path
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregorio Galante
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -155,6 +155,7 @@ files:
|
|
155
155
|
- app/views/lato/authentication/verify_email.html.erb
|
156
156
|
- app/views/lato/components/_index.html.erb
|
157
157
|
- app/views/lato/components/_navbar_nav_item.html.erb
|
158
|
+
- app/views/lato/components/_navbar_nav_locales_item.html.erb
|
158
159
|
- app/views/lato/components/_operation.html.erb
|
159
160
|
- app/views/lato/components/_page_head.html.erb
|
160
161
|
- app/views/lato/components/_sidebar_nav_item.html.erb
|
@@ -181,6 +182,7 @@ files:
|
|
181
182
|
- config/routes.rb
|
182
183
|
- db/migrate/20221022205744_create_lato_users.rb
|
183
184
|
- db/migrate/20221118072130_create_lato_operations.rb
|
185
|
+
- db/migrate/20221229233844_add_locale_to_lato_user.rb
|
184
186
|
- lib/lato.rb
|
185
187
|
- lib/lato/btstrap.rb
|
186
188
|
- lib/lato/config.rb
|