lato 0.1.0
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 +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +95 -0
- data/Rakefile +8 -0
- data/app/assets/config/lato_manifest.js +5 -0
- data/app/assets/images/lato/user-150x150.jpg +0 -0
- data/app/assets/images/lato/user-300x300.jpg +0 -0
- data/app/assets/images/lato/user-600x600.jpg +0 -0
- data/app/assets/images/lato/user-900x900.jpg +0 -0
- data/app/assets/javascripts/lato/application.js +6 -0
- data/app/assets/javascripts/lato/controllers/application.js +9 -0
- data/app/assets/javascripts/lato/controllers/index.js +11 -0
- data/app/assets/javascripts/lato/controllers/lato_action_controller.js +92 -0
- data/app/assets/javascripts/lato/controllers/lato_aside_opener_controller.js +21 -0
- data/app/assets/javascripts/lato/controllers/lato_feedback_controller.js +13 -0
- data/app/assets/javascripts/lato/controllers/lato_form_controller.js +60 -0
- data/app/assets/javascripts/lato/controllers/lato_hello_controller.js +12 -0
- data/app/assets/javascripts/lato/controllers/lato_operation_controller.js +24 -0
- data/app/assets/stylesheets/lato/application.scss +73 -0
- data/app/controllers/concerns/lato/componentable.rb +52 -0
- data/app/controllers/concerns/lato/layoutable.rb +27 -0
- data/app/controllers/concerns/lato/sessionable.rb +45 -0
- data/app/controllers/lato/account_controller.rb +82 -0
- data/app/controllers/lato/application_controller.rb +21 -0
- data/app/controllers/lato/authentication_controller.rb +121 -0
- data/app/controllers/lato/operations_controller.rb +23 -0
- data/app/helpers/lato/application_helper.rb +5 -0
- data/app/helpers/lato/components_helper.rb +183 -0
- data/app/jobs/lato/application_job.rb +59 -0
- data/app/mailers/lato/application_mailer.rb +6 -0
- data/app/mailers/lato/user_mailer.rb +23 -0
- data/app/models/lato/application_record.rb +5 -0
- data/app/models/lato/operation.rb +96 -0
- data/app/models/lato/session.rb +36 -0
- data/app/models/lato/user.rb +164 -0
- data/app/views/lato/account/_alert-accepted-privacy-policy-version.html.erb +20 -0
- data/app/views/lato/account/_alert-accepted-terms-and-conditions-version.html.erb +20 -0
- data/app/views/lato/account/_form-destroy.html.erb +21 -0
- data/app/views/lato/account/_form-password.html.erb +28 -0
- data/app/views/lato/account/_form-user.html.erb +40 -0
- data/app/views/lato/account/index.html.erb +65 -0
- data/app/views/lato/authentication/_form-recover-password.html.erb +20 -0
- data/app/views/lato/authentication/_form-signin.html.erb +31 -0
- data/app/views/lato/authentication/_form-signup.html.erb +47 -0
- data/app/views/lato/authentication/_form-update-password.html.erb +30 -0
- data/app/views/lato/authentication/_form-verify-email.html.erb +22 -0
- data/app/views/lato/authentication/recover_password.html.erb +13 -0
- data/app/views/lato/authentication/signin.html.erb +13 -0
- data/app/views/lato/authentication/signout.html.erb +11 -0
- data/app/views/lato/authentication/signup.html.erb +13 -0
- data/app/views/lato/authentication/update_password.html.erb +13 -0
- data/app/views/lato/authentication/verify_email.html.erb +7 -0
- data/app/views/lato/components/_index.html.erb +89 -0
- data/app/views/lato/components/_navbar_nav_item.html.erb +5 -0
- data/app/views/lato/components/_operation.html.erb +68 -0
- data/app/views/lato/components/_page_head.html.erb +15 -0
- data/app/views/lato/components/_sidebar_nav_item.html.erb +5 -0
- data/app/views/lato/mailer/user/email_verification_mail.html.erb +9 -0
- data/app/views/lato/mailer/user/password_update_mail.html.erb +9 -0
- data/app/views/lato/operations/show.html.erb +3 -0
- data/app/views/layouts/lato/_action.html.erb +17 -0
- data/app/views/layouts/lato/_aside-opener.html.erb +7 -0
- data/app/views/layouts/lato/_content.html.erb +5 -0
- data/app/views/layouts/lato/_feedbacks.html.erb +16 -0
- data/app/views/layouts/lato/_footer.html.erb +11 -0
- data/app/views/layouts/lato/_mailer-foot_content.html.erb +2 -0
- data/app/views/layouts/lato/_mailer-head_content.html.erb +2 -0
- data/app/views/layouts/lato/_navbar-brand_content.html.erb +1 -0
- data/app/views/layouts/lato/_navbar-nav_content.html.erb +15 -0
- data/app/views/layouts/lato/_navbar.html.erb +16 -0
- data/app/views/layouts/lato/_sidebar-nav_content.html.erb +3 -0
- data/app/views/layouts/lato/_sidebar.html.erb +5 -0
- data/app/views/layouts/lato/application.html.erb +44 -0
- data/app/views/layouts/lato/mailer.html.erb +3 -0
- data/config/importmap.rb +8 -0
- data/config/locales/it.yml +235 -0
- data/config/routes.rb +35 -0
- data/db/migrate/20221022205744_create_lato_users.rb +14 -0
- data/db/migrate/20221118072130_create_lato_operations.rb +14 -0
- data/lib/lato/btstrap.rb +36 -0
- data/lib/lato/config.rb +39 -0
- data/lib/lato/engine.rb +13 -0
- data/lib/lato/version.rb +3 -0
- data/lib/lato.rb +27 -0
- data/lib/tasks/lato_tasks.rake +28 -0
- metadata +199 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<%= turbo_frame_tag "lato_index_#{key}_#{model_name_underscore}" do %>
|
|
2
|
+
|
|
3
|
+
<%= form_tag request.path, method: :get, data: { turbo_frame: '_self' } do %>
|
|
4
|
+
<%= hidden_field_tag :key, key %>
|
|
5
|
+
<%= hidden_field_tag :sort_by, params[:sort_by] %>
|
|
6
|
+
|
|
7
|
+
<div class="table-responsive">
|
|
8
|
+
<table class="table table-striped table-bordered">
|
|
9
|
+
<thead>
|
|
10
|
+
<% if custom_actions.any? || searchable_columns.any? %>
|
|
11
|
+
<tr>
|
|
12
|
+
<td colspan="<%= columns.length %>">
|
|
13
|
+
<div class="d-flex justify-content-between">
|
|
14
|
+
<% if searchable_columns.any? %>
|
|
15
|
+
<div class="input-group">
|
|
16
|
+
<input type="text" name="search" class="form-control" placeholder="Ricerca per: <%= searchable_columns.map { |c| collection.model.human_attribute_name(c) }.to_sentence %>" value="<%= params[:search] %>">
|
|
17
|
+
<button class="btn btn-outline-primary" type="submit"><i class="bi bi-search"></i></button>
|
|
18
|
+
</div>
|
|
19
|
+
<% else %>
|
|
20
|
+
<div></div>
|
|
21
|
+
<% end %>
|
|
22
|
+
|
|
23
|
+
<div class="btn-group ms-2">
|
|
24
|
+
<% if custom_actions.any? %>
|
|
25
|
+
<% custom_actions.each do |action_key, action_params| %>
|
|
26
|
+
<%= link_to action_params[:path], { class: 'btn btn-primary' }.merge(action_params) do %>
|
|
27
|
+
<i class="<%= action_params[:icon] %>"></i>
|
|
28
|
+
<% end %>
|
|
29
|
+
<% end %>
|
|
30
|
+
<% end %>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</td>
|
|
34
|
+
</tr>
|
|
35
|
+
<% end %>
|
|
36
|
+
<tr class="align-middle">
|
|
37
|
+
<% columns.each do |column| %>
|
|
38
|
+
<th scope="col">
|
|
39
|
+
<div class="d-flex align-items-center">
|
|
40
|
+
<span><%= collection.model.human_attribute_name column %></span>
|
|
41
|
+
<% if sortable_columns.include?(column) %>
|
|
42
|
+
<div class="btn-group ms-3">
|
|
43
|
+
<div class="position-relative btn btn-sm <%= params[:sort_by] == "#{column}|ASC" ? 'btn-primary' : 'btn-outline-primary' %>">
|
|
44
|
+
<input type="submit" name="sort_by" value="<%= column %>|ASC" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0">
|
|
45
|
+
<i class="bi bi-sort-up"></i>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div class="position-relative btn btn-sm <%= params[:sort_by] == "#{column}|DESC" ? 'btn-primary' : 'btn-outline-primary' %>">
|
|
49
|
+
<input type="submit" name="sort_by" value="<%= column %>|DESC" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0">
|
|
50
|
+
<i class="bi bi-sort-down"></i>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<% end %>
|
|
54
|
+
</div>
|
|
55
|
+
</th>
|
|
56
|
+
<% end %>
|
|
57
|
+
</tr>
|
|
58
|
+
</thead>
|
|
59
|
+
<tbody>
|
|
60
|
+
<% collection.each do |member| %>
|
|
61
|
+
<tr>
|
|
62
|
+
<% columns.each do |column| %>
|
|
63
|
+
<td>
|
|
64
|
+
<% viewer_function_name = "#{model_name_underscore}_#{column}" %>
|
|
65
|
+
<%= respond_to?(viewer_function_name) ? send(viewer_function_name, member) : member.send(column) %>
|
|
66
|
+
</td>
|
|
67
|
+
<% end %>
|
|
68
|
+
</tr>
|
|
69
|
+
<% end %>
|
|
70
|
+
</tbody>
|
|
71
|
+
<tfoot>
|
|
72
|
+
<tr>
|
|
73
|
+
<td colspan="<%= columns.length %>">
|
|
74
|
+
<div class="d-flex justify-content-between align-items-center">
|
|
75
|
+
<% if collection.respond_to?(:total_pages) %>
|
|
76
|
+
<div><%= paginate collection %></div>
|
|
77
|
+
<% else %>
|
|
78
|
+
<div></div>
|
|
79
|
+
<% end %>
|
|
80
|
+
<span class="text-muted"><%= collection.count %> risultati visualizzati
|
|
81
|
+
</div>
|
|
82
|
+
</td>
|
|
83
|
+
</tr>
|
|
84
|
+
</tfoot>
|
|
85
|
+
</table>
|
|
86
|
+
</div>
|
|
87
|
+
<% end %>
|
|
88
|
+
|
|
89
|
+
<% end %>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<%= turbo_frame_tag 'lato_operation' do %>
|
|
2
|
+
<div data-controller="lato-operation">
|
|
3
|
+
<% if operation.created_status? %>
|
|
4
|
+
<div class="text-center">
|
|
5
|
+
<h2>Operazione in corso</h2>
|
|
6
|
+
<p>Si prega di attendere..</p>
|
|
7
|
+
<div class="progress" style="height: 20px;">
|
|
8
|
+
<div class="progress-bar progress-bar-animated progress-bar-striped bg-primary" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
<% end %>
|
|
12
|
+
|
|
13
|
+
<% if operation.running_status? %>
|
|
14
|
+
<div class="text-center">
|
|
15
|
+
<h2>Operazione in corso</h2>
|
|
16
|
+
<p>Si prega di attendere..</p>
|
|
17
|
+
<% if operation.percentage.nil? %>
|
|
18
|
+
<div class="progress" style="height: 20px;">
|
|
19
|
+
<div class="progress-bar progress-bar-animated progress-bar-striped bg-primary" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
|
|
20
|
+
</div>
|
|
21
|
+
<% else %>
|
|
22
|
+
<div class="progress" style="height: 20px;">
|
|
23
|
+
<div class="progress-bar progress-bar-animated progress-bar-striped bg-primary" role="progressbar" style="width: <%= operation.percentage %>%;" aria-valuenow="<%= operation.percentage %>" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"><%= operation.percentage %>%</div>
|
|
24
|
+
</div>
|
|
25
|
+
<% end %>
|
|
26
|
+
</div>
|
|
27
|
+
<% end %>
|
|
28
|
+
|
|
29
|
+
<% if operation.completed_status? %>
|
|
30
|
+
<div class="text-center">
|
|
31
|
+
<div class="fs-1 text-success">
|
|
32
|
+
<i class="bi bi-check-circle"></i>
|
|
33
|
+
</div>
|
|
34
|
+
<h2>Operazione completata</h2>
|
|
35
|
+
<p>L'operazione è stata completata con successo</p>
|
|
36
|
+
|
|
37
|
+
<% if operation.output_file? %>
|
|
38
|
+
<%= link_to '', main_app.url_for(operation.output_file), download: true, class: 'd-none', data: { lato_operation_target: 'outputFile' } %>
|
|
39
|
+
<% end %>
|
|
40
|
+
|
|
41
|
+
<% if operation.output_message? %>
|
|
42
|
+
<p class="text-success fw-bold">
|
|
43
|
+
<%= operation.output_message %>
|
|
44
|
+
</p>
|
|
45
|
+
<% end %>
|
|
46
|
+
</div>
|
|
47
|
+
<% end %>
|
|
48
|
+
|
|
49
|
+
<% if operation.failed_status? %>
|
|
50
|
+
<div class="text-center">
|
|
51
|
+
<div class="fs-1 text-danger">
|
|
52
|
+
<i class="bi bi-x-circle"></i>
|
|
53
|
+
</div>
|
|
54
|
+
<h2>Operazione fallita</h2>
|
|
55
|
+
<p>L'operazione è fallita a causa di un errore</p>
|
|
56
|
+
<% if operation.output_error? %>
|
|
57
|
+
<p class="text-danger fw-bold">
|
|
58
|
+
<%= operation.output_error %>
|
|
59
|
+
</p>
|
|
60
|
+
<% end %>
|
|
61
|
+
</div>
|
|
62
|
+
<% end %>
|
|
63
|
+
|
|
64
|
+
<% unless operation.finished? %>
|
|
65
|
+
<%= link_to '', lato.operations_show_path(operation), class: 'd-none', data: { lato_operation_target: 'update', turbo_frame: '_self' } %>
|
|
66
|
+
<% end %>
|
|
67
|
+
</div>
|
|
68
|
+
<% end %>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<div class="border-bottom mb-3">
|
|
2
|
+
<% if breadcrumbs.any? %>
|
|
3
|
+
<ol class="breadcrumb mb-1">
|
|
4
|
+
<% breadcrumbs.each do |breadcrumb| %>
|
|
5
|
+
<li class="breadcrumb-item">
|
|
6
|
+
<%= breadcrumb[:path] ? link_to(breadcrumb[:label], breadcrumb[:path]) : content_tag(:span, breadcrumb[:label]) %>
|
|
7
|
+
</li>
|
|
8
|
+
<% end %>
|
|
9
|
+
</ol>
|
|
10
|
+
<% end %>
|
|
11
|
+
|
|
12
|
+
<h1><%= title %></h1>
|
|
13
|
+
|
|
14
|
+
<%= yield %>
|
|
15
|
+
</div>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Per avere accesso a tutte le funzionalità di <%= Lato.config.application_title %> devi confermare il tuo indirizzo email.
|
|
2
|
+
<br><br>
|
|
3
|
+
Clicca il seguente link per completare la procedura di configurazione:
|
|
4
|
+
<br><br>
|
|
5
|
+
<%= link_to lato.authentication_verify_email_url(id: @user.id, code: @code), lato.authentication_verify_email_url(id: @user.id, code: @code) %>
|
|
6
|
+
<br><br>
|
|
7
|
+
<small>
|
|
8
|
+
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>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
È stato richiesto un aggiornamento della password del tuo account <%= Lato.config.application_title %>.
|
|
2
|
+
<br><br>
|
|
3
|
+
Per completare l'aggiornamento inserisci il seguente codice nel form di aggiornamento:
|
|
4
|
+
<br><br>
|
|
5
|
+
<b><%= @code %></b>
|
|
6
|
+
<br><br>
|
|
7
|
+
<small>
|
|
8
|
+
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>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<% 10.times do %>
|
|
2
|
+
|
|
3
|
+
<div class="modal fade" data-lato-action-target="modal" tabindex="-1" aria-hidden="true">
|
|
4
|
+
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable" data-lato-action-target="modalDialog">
|
|
5
|
+
<div class="modal-content">
|
|
6
|
+
<div class="modal-header">
|
|
7
|
+
<h2 class="mb-0 mt-0 fs-4" data-lato-action-target="modalTitle"></h2>
|
|
8
|
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="modal-body" data-lato-action-target="modalBody">
|
|
11
|
+
...
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<% end %>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<div class="toast-container">
|
|
2
|
+
<% if notice %>
|
|
3
|
+
<div class="position-fixed bottom-0 end-0 p-3" style="z-index: 11">
|
|
4
|
+
<div data-controller="lato-feedback" id="feedbackNotice" class="toast hide" role="alert" aria-live="assertive" aria-atomic="true">
|
|
5
|
+
<div class="toast-header">
|
|
6
|
+
<i class="bi bi-check-circle-fill text-success me-2"></i>
|
|
7
|
+
<strong class="me-auto">Operazione completata</strong>
|
|
8
|
+
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="toast-body">
|
|
11
|
+
<%= notice %>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
<% end %>
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<div class="footer <%= Lato.btstrap.footer %>" style="font-size: 14px;">
|
|
2
|
+
<div class="<%= Lato.btstrap.footer_container %>">
|
|
3
|
+
<div>
|
|
4
|
+
© <%= Date.today.year %> - <%= link_to Lato.config.application_company_name, Lato.config.application_company_url, target: '_blank' %>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="mt-2 mt-md-0">
|
|
7
|
+
<%= link_to 'Privacy policy', Lato.config.legal_privacy_policy_url %> -
|
|
8
|
+
<%= link_to 'Termini e condizioni', Lato.config.legal_terms_and_conditions_url %>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<%= Lato.config.application_title %>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<% if @session.valid? %>
|
|
2
|
+
<%= lato_navbar_nav_item :account, lato.account_path do %>
|
|
3
|
+
Account
|
|
4
|
+
<% end %>
|
|
5
|
+
<%= lato_navbar_nav_item :authentication_logout, lato.authentication_signout_path do %>
|
|
6
|
+
Esci
|
|
7
|
+
<% end %>
|
|
8
|
+
<% else %>
|
|
9
|
+
<%= lato_navbar_nav_item :authentication_signin, lato.authentication_signin_path do %>
|
|
10
|
+
Accedi
|
|
11
|
+
<% end %>
|
|
12
|
+
<%= lato_navbar_nav_item :authentication_signup, lato.authentication_signup_path do %>
|
|
13
|
+
Registrati
|
|
14
|
+
<% end %>
|
|
15
|
+
<% end %>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<nav id="nav" class="navbar <%= Lato.btstrap.navbar %>">
|
|
2
|
+
<div class="<%= Lato.btstrap.navbar_container %>">
|
|
3
|
+
<%= link_to root_path, class: "navbar-brand" do %>
|
|
4
|
+
<%= render 'layouts/lato/navbar-brand_content' %>
|
|
5
|
+
<% end %>
|
|
6
|
+
|
|
7
|
+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarMenu" aria-controls="navbarMenu" aria-expanded="false" aria-label="Toggle navigation">
|
|
8
|
+
<span class="navbar-toggler-icon"></span>
|
|
9
|
+
</button>
|
|
10
|
+
<div class="collapse navbar-collapse <%= Lato.btstrap.navbar_collapse %>" id="navbarMenu">
|
|
11
|
+
<ul class="navbar-nav">
|
|
12
|
+
<%= render 'layouts/lato/navbar-nav_content' %>
|
|
13
|
+
</ul>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</nav>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
6
|
+
<title><%= Lato.config.application_title %></title>
|
|
7
|
+
<%= csrf_meta_tags %>
|
|
8
|
+
<%= csp_meta_tag %>
|
|
9
|
+
|
|
10
|
+
<%= stylesheet_link_tag "application", media: "all" %>
|
|
11
|
+
<%= javascript_importmap_tags %>
|
|
12
|
+
</head>
|
|
13
|
+
<body
|
|
14
|
+
class="controller-<%= controller_name %> action-<%= action_name %>"
|
|
15
|
+
data-controller="lato-action"
|
|
16
|
+
>
|
|
17
|
+
<header>
|
|
18
|
+
<%= render 'layouts/lato/navbar' %>
|
|
19
|
+
</header>
|
|
20
|
+
|
|
21
|
+
<div class="d-flex">
|
|
22
|
+
|
|
23
|
+
<% if @layout_sidebar %>
|
|
24
|
+
<aside>
|
|
25
|
+
<%= render 'layouts/lato/sidebar' %>
|
|
26
|
+
</aside>
|
|
27
|
+
<% end %>
|
|
28
|
+
|
|
29
|
+
<main>
|
|
30
|
+
<%= render 'layouts/lato/content' %>
|
|
31
|
+
</main>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
<footer>
|
|
37
|
+
<%= render 'layouts/lato/footer' %>
|
|
38
|
+
</footer>
|
|
39
|
+
|
|
40
|
+
<%= render 'layouts/lato/aside-opener' %>
|
|
41
|
+
<%= render 'layouts/lato/feedbacks' %>
|
|
42
|
+
<%= render 'layouts/lato/action' %>
|
|
43
|
+
</body>
|
|
44
|
+
</html>
|
data/config/importmap.rb
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
pin "lato/application", to: "lato/application.js"
|
|
2
|
+
pin_all_from Lato::Engine.root.join("app/assets/javascripts/lato/controllers"), under: "controllers", to: "lato/controllers"
|
|
3
|
+
|
|
4
|
+
pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
|
|
5
|
+
pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
|
|
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
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# Start from: https://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/it.yml
|
|
2
|
+
|
|
3
|
+
it:
|
|
4
|
+
activerecord:
|
|
5
|
+
attributes:
|
|
6
|
+
lato/user:
|
|
7
|
+
first_name: Nome
|
|
8
|
+
last_name: Cognome
|
|
9
|
+
password_confirmation: Conferma password
|
|
10
|
+
email: Indirizzo email
|
|
11
|
+
accepted_privacy_policy_version: Privacy policy
|
|
12
|
+
accepted_terms_and_conditions_version: Termini e condizioni
|
|
13
|
+
errors:
|
|
14
|
+
messages:
|
|
15
|
+
record_invalid: 'Validazione fallita: %{errors}'
|
|
16
|
+
restrict_dependent_destroy:
|
|
17
|
+
has_one: Il record non può essere cancellato perchè esiste un %{record} dipendente
|
|
18
|
+
has_many: Il record non può essere cancellato perchè esistono %{record} dipendenti
|
|
19
|
+
models:
|
|
20
|
+
lato/user:
|
|
21
|
+
attributes:
|
|
22
|
+
password_confirmation:
|
|
23
|
+
confirmation: non corrisponde alla password
|
|
24
|
+
email:
|
|
25
|
+
taken: già utilizzato da un altro account
|
|
26
|
+
accepted_privacy_policy_version:
|
|
27
|
+
inclusion: non accettata
|
|
28
|
+
accepted_terms_and_conditions_version:
|
|
29
|
+
inclusion: non accettati
|
|
30
|
+
date:
|
|
31
|
+
abbr_day_names:
|
|
32
|
+
- dom
|
|
33
|
+
- lun
|
|
34
|
+
- mar
|
|
35
|
+
- mer
|
|
36
|
+
- gio
|
|
37
|
+
- ven
|
|
38
|
+
- sab
|
|
39
|
+
abbr_month_names:
|
|
40
|
+
-
|
|
41
|
+
- gen
|
|
42
|
+
- feb
|
|
43
|
+
- mar
|
|
44
|
+
- apr
|
|
45
|
+
- mag
|
|
46
|
+
- giu
|
|
47
|
+
- lug
|
|
48
|
+
- ago
|
|
49
|
+
- set
|
|
50
|
+
- ott
|
|
51
|
+
- nov
|
|
52
|
+
- dic
|
|
53
|
+
day_names:
|
|
54
|
+
- domenica
|
|
55
|
+
- lunedì
|
|
56
|
+
- martedì
|
|
57
|
+
- mercoledì
|
|
58
|
+
- giovedì
|
|
59
|
+
- venerdì
|
|
60
|
+
- sabato
|
|
61
|
+
formats:
|
|
62
|
+
default: "%d/%m/%Y"
|
|
63
|
+
long: "%d %B %Y"
|
|
64
|
+
short: "%d %b"
|
|
65
|
+
month_names:
|
|
66
|
+
-
|
|
67
|
+
- gennaio
|
|
68
|
+
- febbraio
|
|
69
|
+
- marzo
|
|
70
|
+
- aprile
|
|
71
|
+
- maggio
|
|
72
|
+
- giugno
|
|
73
|
+
- luglio
|
|
74
|
+
- agosto
|
|
75
|
+
- settembre
|
|
76
|
+
- ottobre
|
|
77
|
+
- novembre
|
|
78
|
+
- dicembre
|
|
79
|
+
order:
|
|
80
|
+
- :day
|
|
81
|
+
- :month
|
|
82
|
+
- :year
|
|
83
|
+
datetime:
|
|
84
|
+
distance_in_words:
|
|
85
|
+
about_x_hours:
|
|
86
|
+
one: circa un'ora
|
|
87
|
+
other: circa %{count} ore
|
|
88
|
+
about_x_months:
|
|
89
|
+
one: circa un mese
|
|
90
|
+
other: circa %{count} mesi
|
|
91
|
+
about_x_years:
|
|
92
|
+
one: circa un anno
|
|
93
|
+
other: circa %{count} anni
|
|
94
|
+
almost_x_years:
|
|
95
|
+
one: quasi un anno
|
|
96
|
+
other: quasi %{count} anni
|
|
97
|
+
half_a_minute: mezzo minuto
|
|
98
|
+
less_than_x_seconds:
|
|
99
|
+
one: meno di un secondo
|
|
100
|
+
other: meno di %{count} secondi
|
|
101
|
+
less_than_x_minutes:
|
|
102
|
+
one: meno di un minuto
|
|
103
|
+
other: meno di %{count} minuti
|
|
104
|
+
over_x_years:
|
|
105
|
+
one: oltre un anno
|
|
106
|
+
other: oltre %{count} anni
|
|
107
|
+
x_seconds:
|
|
108
|
+
one: 1 secondo
|
|
109
|
+
other: "%{count} secondi"
|
|
110
|
+
x_minutes:
|
|
111
|
+
one: 1 minuto
|
|
112
|
+
other: "%{count} minuti"
|
|
113
|
+
x_days:
|
|
114
|
+
one: 1 giorno
|
|
115
|
+
other: "%{count} giorni"
|
|
116
|
+
x_months:
|
|
117
|
+
one: 1 mese
|
|
118
|
+
other: "%{count} mesi"
|
|
119
|
+
x_years:
|
|
120
|
+
one: 1 anno
|
|
121
|
+
other: "%{count} anni"
|
|
122
|
+
prompts:
|
|
123
|
+
second: Secondi
|
|
124
|
+
minute: Minuto
|
|
125
|
+
hour: Ora
|
|
126
|
+
day: Giorno
|
|
127
|
+
month: Mese
|
|
128
|
+
year: Anno
|
|
129
|
+
errors:
|
|
130
|
+
format: "%{attribute} %{message}"
|
|
131
|
+
messages:
|
|
132
|
+
accepted: deve essere accettata
|
|
133
|
+
blank: non può essere lasciato in bianco
|
|
134
|
+
confirmation: non coincide con %{attribute}
|
|
135
|
+
empty: non può essere vuoto
|
|
136
|
+
equal_to: deve essere uguale a %{count}
|
|
137
|
+
even: deve essere pari
|
|
138
|
+
exclusion: è riservato
|
|
139
|
+
greater_than: deve essere maggiore di %{count}
|
|
140
|
+
greater_than_or_equal_to: deve essere maggiore o uguale a %{count}
|
|
141
|
+
inclusion: non è compreso tra le opzioni disponibili
|
|
142
|
+
invalid: non è valido
|
|
143
|
+
less_than: deve essere minore di %{count}
|
|
144
|
+
less_than_or_equal_to: deve essere minore o uguale a %{count}
|
|
145
|
+
model_invalid: 'Validazione fallita: %{errors}'
|
|
146
|
+
not_a_number: non è un numero
|
|
147
|
+
not_an_integer: non è un numero intero
|
|
148
|
+
odd: deve essere dispari
|
|
149
|
+
other_than: devono essere di numero diverso da %{count}
|
|
150
|
+
present: deve essere lasciato in bianco
|
|
151
|
+
required: deve esistere
|
|
152
|
+
taken: è già presente
|
|
153
|
+
too_long:
|
|
154
|
+
one: è troppo lungo (il massimo è 1 carattere)
|
|
155
|
+
other: è troppo lungo (il massimo è %{count} caratteri)
|
|
156
|
+
too_short:
|
|
157
|
+
one: è troppo corto (il minimo è 1 carattere)
|
|
158
|
+
other: è troppo corto (il minimo è %{count} caratteri)
|
|
159
|
+
wrong_length:
|
|
160
|
+
one: è della lunghezza sbagliata (deve essere di 1 carattere)
|
|
161
|
+
other: è della lunghezza sbagliata (deve essere di %{count} caratteri)
|
|
162
|
+
template:
|
|
163
|
+
body: 'Ricontrolla i seguenti campi:'
|
|
164
|
+
header:
|
|
165
|
+
one: 'Non posso salvare questo %{model}: 1 errore'
|
|
166
|
+
other: 'Non posso salvare questo %{model}: %{count} errori.'
|
|
167
|
+
helpers:
|
|
168
|
+
select:
|
|
169
|
+
prompt: Seleziona...
|
|
170
|
+
submit:
|
|
171
|
+
create: Crea %{model}
|
|
172
|
+
submit: Invia %{model}
|
|
173
|
+
update: Aggiorna %{model}
|
|
174
|
+
number:
|
|
175
|
+
currency:
|
|
176
|
+
format:
|
|
177
|
+
delimiter: "."
|
|
178
|
+
format: "%n %u"
|
|
179
|
+
precision: 2
|
|
180
|
+
separator: ","
|
|
181
|
+
significant: false
|
|
182
|
+
strip_insignificant_zeros: false
|
|
183
|
+
unit: "€"
|
|
184
|
+
format:
|
|
185
|
+
delimiter: "."
|
|
186
|
+
precision: 2
|
|
187
|
+
separator: ","
|
|
188
|
+
significant: false
|
|
189
|
+
strip_insignificant_zeros: false
|
|
190
|
+
human:
|
|
191
|
+
decimal_units:
|
|
192
|
+
format: "%n %u"
|
|
193
|
+
units:
|
|
194
|
+
billion: Miliardi
|
|
195
|
+
million: Milioni
|
|
196
|
+
quadrillion: Biliardi
|
|
197
|
+
thousand: Mila
|
|
198
|
+
trillion: Bilioni
|
|
199
|
+
unit: ''
|
|
200
|
+
format:
|
|
201
|
+
delimiter: ''
|
|
202
|
+
precision: 3
|
|
203
|
+
significant: true
|
|
204
|
+
strip_insignificant_zeros: true
|
|
205
|
+
storage_units:
|
|
206
|
+
format: "%n %u"
|
|
207
|
+
units:
|
|
208
|
+
byte:
|
|
209
|
+
one: Byte
|
|
210
|
+
other: Byte
|
|
211
|
+
eb: EB
|
|
212
|
+
gb: GB
|
|
213
|
+
kb: KB
|
|
214
|
+
mb: MB
|
|
215
|
+
pb: PB
|
|
216
|
+
tb: TB
|
|
217
|
+
percentage:
|
|
218
|
+
format:
|
|
219
|
+
delimiter: ''
|
|
220
|
+
format: "%n%"
|
|
221
|
+
precision:
|
|
222
|
+
format:
|
|
223
|
+
delimiter: ''
|
|
224
|
+
support:
|
|
225
|
+
array:
|
|
226
|
+
last_word_connector: " e "
|
|
227
|
+
two_words_connector: " e "
|
|
228
|
+
words_connector: ", "
|
|
229
|
+
time:
|
|
230
|
+
am: am
|
|
231
|
+
formats:
|
|
232
|
+
default: "%a %d %b %Y, %H:%M:%S %z"
|
|
233
|
+
long: "%d %B %Y %H:%M"
|
|
234
|
+
short: "%d %b %H:%M"
|
|
235
|
+
pm: pm
|
data/config/routes.rb
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Lato::Engine.routes.draw do
|
|
2
|
+
root 'application#index'
|
|
3
|
+
|
|
4
|
+
# Authentication
|
|
5
|
+
##
|
|
6
|
+
|
|
7
|
+
scope :authentication do
|
|
8
|
+
get 'signin', to: 'authentication#signin', as: :authentication_signin
|
|
9
|
+
post 'signin_action', to: 'authentication#signin_action', as: :authentication_signin_action
|
|
10
|
+
get 'signup', to: 'authentication#signup', as: :authentication_signup
|
|
11
|
+
post 'signup_action', to: 'authentication#signup_action', as: :authentication_signup_action
|
|
12
|
+
get 'signout', to: 'authentication#signout', as: :authentication_signout
|
|
13
|
+
delete 'signout_action', to: 'authentication#signout_action', as: :authentication_signout_action
|
|
14
|
+
get 'verify_email', to: 'authentication#verify_email', as: :authentication_verify_email
|
|
15
|
+
patch 'verify_email_action', to: 'authentication#verify_email_action', as: :authentication_verify_email_action
|
|
16
|
+
get 'recover_password', to: 'authentication#recover_password', as: :authentication_recover_password
|
|
17
|
+
post 'recover_password_action', to: 'authentication#recover_password_action', as: :authentication_recover_password_action
|
|
18
|
+
get 'update_password', to: 'authentication#update_password', as: :authentication_update_password
|
|
19
|
+
patch 'update_password_action', to: 'authentication#update_password_action', as: :authentication_update_password_action
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
scope :account do
|
|
23
|
+
get '', to: 'account#index', as: :account
|
|
24
|
+
patch 'update_user_action', to: 'account#update_user_action', as: :account_update_user_action
|
|
25
|
+
patch 'request_verify_email_action', to: 'account#request_verify_email_action', as: :account_request_verify_email_action
|
|
26
|
+
patch 'update_password_action', to: 'account#update_password_action', as: :account_update_password_action
|
|
27
|
+
delete 'destroy_action', to: 'account#destroy_action', as: :account_destroy_action
|
|
28
|
+
patch 'update_accepted_privacy_policy_version_action', to: 'account#update_accepted_privacy_policy_version_action', as: :account_update_accepted_privacy_policy_version_action
|
|
29
|
+
patch 'update_accepted_terms_and_conditions_version_action', to: 'account#update_accepted_terms_and_conditions_version_action', as: :account_update_accepted_terms_and_conditions_version_action
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
scope :operations do
|
|
33
|
+
get 'show/:id', to: 'operations#show', as: :operations_show
|
|
34
|
+
end
|
|
35
|
+
end
|