lato 3.11.14 โ†’ 3.13.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6344a4bb1956aad2d8b4fc41b138fe394d15dc7efc4ef1deba5e661e75c8452c
4
- data.tar.gz: e2ce9f8e63ace943eb51c153628a200e0ae492e42c03ffa89fbf8a32167778ae
3
+ metadata.gz: dd51e6200f38ef058645aae3e2684f967d2bcdd2965d7bdfd36b8f73ab6b5007
4
+ data.tar.gz: 1cee6903435fac581f18be2c0e7c6fda2fc6a2d1f141cea02bacf4f6f58f315c
5
5
  SHA512:
6
- metadata.gz: c496cfc23cc1a484e69d8ec2c29952f484624a57fb6e3e5f08289f68488aa7ab1c1727d5da34790a88a4ed20a0cc280bb1b942200ad3c6c12452de3c25a72508
7
- data.tar.gz: a75aab815db09a3d20ed0d0666cdc529dd703c4e7c14a8e4378aae380f68900ed7d80f34fdd6d49e72d51e03c2eb391f4ec081a04ff1fbc862da284c7631efd9
6
+ metadata.gz: 8629876c8baa8092aa4ba662ddb5e492b68b11a75c985684e10d4fb04b24c9f13db65d542a47bda39cb454638a665a41e3df4764ec17c71d1ed3d5eddd367e07
7
+ data.tar.gz: 2920b2de9e327a6bcc2e6ff24ccf9cf9e2a5dbd4ee7d4cecdac1e8d9fa5e2db2ea3a1719de37cdaa102190a67849e93af3d6335a96116c4abd9bd5ed756d9f02
data/README.md CHANGED
@@ -17,7 +17,7 @@ The gem is ready to be used with the **latest Rails 7+** features like **[ESM im
17
17
 
18
18
  <img src="./preview.gif" alt="Lato preview" width="100%">
19
19
 
20
- ## Full documentation (๐Ÿ‡ฎ๐Ÿ‡น Italian only)
20
+ ## Full documentation
21
21
 
22
22
  The full documentation is available at: ๐Ÿ‘‰ ๐Ÿ‘‰ [THIS LINK](http://lato.gregoriogalante.com/) ๐Ÿ‘ˆ ๐Ÿ‘ˆ
23
23
 
@@ -16,11 +16,11 @@ module Lato
16
16
  }
17
17
 
18
18
  # manage default sort by parameter
19
- params[:sort_by] = default_sort_by if params[:sort_by].blank? && default_sort_by
19
+ params["#{key}_sort_by"] = default_sort_by if params["#{key}_sort_by"].blank? && default_sort_by
20
20
 
21
21
  # manage sort by parameter
22
- unless params[:sort_by].blank?
23
- sort_by_splitted = params[:sort_by].split('|')
22
+ unless params["#{key}_sort_by"].blank?
23
+ sort_by_splitted = params["#{key}_sort_by"].split('|')
24
24
  sort_by_column = sort_by_splitted.first
25
25
  sort_by_order = sort_by_splitted.last
26
26
 
@@ -32,8 +32,8 @@ module Lato
32
32
  end
33
33
 
34
34
  # manage search by parameter
35
- unless params[:search].blank?
36
- search = params[:search].to_s
35
+ unless params["#{key}_search"].blank?
36
+ search = params["#{key}_search"].to_s
37
37
  if collection.respond_to?(:lato_index_search)
38
38
  collection = collection.lato_index_search(search)
39
39
  else
@@ -49,9 +49,9 @@ module Lato
49
49
  end
50
50
 
51
51
  # manage pagination
52
- if pagination || params[:page] || params[:per_page]
53
- page = params[:page]&.to_i || 1
54
- per_page = params[:per_page]&.to_i || (pagination.is_a?(Integer) ? pagination : 25)
52
+ if pagination || params["#{key}_page"] || params["#{key}_per_page"]
53
+ page = params["#{key}_page"]&.to_i || 1
54
+ per_page = params["#{key}_per_page"]&.to_i || (pagination.is_a?(Integer) ? pagination : 25)
55
55
  per_page = 100 if per_page > 100
56
56
  collection = collection.page(page).per(per_page)
57
57
  end
@@ -17,7 +17,7 @@ collection_total = collection.respond_to?(:total_count) ? collection.total_count
17
17
  <div class="d-flex mb-3">
18
18
  <% if searchable_columns.any? %>
19
19
  <div class="input-group">
20
- <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] %>" data-action="keyup->lato-index#onSearchKeyUp" aria-label="<%= I18n.t('lato.search') %>">
20
+ <input type="text" name="<%= "#{key}_search" %>" class="form-control" placeholder="<%= I18n.t('lato.search_for') %>: <%= searchable_columns.map { |c| collection.model.human_attribute_name(c) }.to_sentence %>" value="<%= params["#{key}_search"] %>" data-action="keyup->lato-index#onSearchKeyUp" aria-label="<%= I18n.t('lato.search') %>">
21
21
  <button
22
22
  class="btn btn-outline-primary"
23
23
  type="submit"
@@ -114,13 +114,13 @@ collection_total = collection.respond_to?(:total_count) ? collection.total_count
114
114
  }) %></span>
115
115
  <% if sortable_columns.include?(column) %>
116
116
  <div class="btn-group ms-3 lato-index-col-sort">
117
- <div class="position-relative btn btn-sm <%= params[:sort_by] == "#{column}|ASC" ? 'btn-primary' : 'btn-outline-primary' %>">
118
- <input type="submit" name="sort_by" value="<%= column %>|ASC" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0">
117
+ <div class="position-relative btn btn-sm <%= params["#{key}_sort_by"] == "#{column}|ASC" ? 'btn-primary' : 'btn-outline-primary' %>">
118
+ <input type="submit" name="<%= "#{key}_sort_by" %>" value="<%= column %>|ASC" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0">
119
119
  <i class="bi bi-sort-up"></i>
120
120
  </div>
121
121
 
122
- <div class="position-relative btn btn-sm <%= params[:sort_by] == "#{column}|DESC" ? 'btn-primary' : 'btn-outline-primary' %>">
123
- <input type="submit" name="sort_by" value="<%= column %>|DESC" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0">
122
+ <div class="position-relative btn btn-sm <%= params["#{key}_sort_by"] == "#{column}|DESC" ? 'btn-primary' : 'btn-outline-primary' %>">
123
+ <input type="submit" name="<%= "#{key}_sort_by" %>" value="<%= column %>|DESC" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0">
124
124
  <i class="bi bi-sort-down"></i>
125
125
  </div>
126
126
  </div>
@@ -152,16 +152,16 @@ collection_total = collection.respond_to?(:total_count) ? collection.total_count
152
152
  <td colspan="<%= columns.length %>">
153
153
  <div class="d-flex justify-content-between align-items-center">
154
154
  <% if collection.respond_to?(:total_pages) %>
155
- <div><%= paginate collection %></div>
155
+ <div><%= paginate collection, param_name: "#{key}_page" %></div>
156
156
  <% else %>
157
157
  <div></div>
158
158
  <% end %>
159
159
  <div class="d-flex justify-content-end align-items-center">
160
160
  <span class="text-muted"><%= collection_total %> <%= I18n.t('lato.total_results').downcase %></span>
161
161
  <% if pagination_options %>
162
- <select name="per_page" class="ms-3 form-select form-select-sm w-auto" data-action="change->lato-form#submit" aria-label="<%= I18n.t('lato.per_page_description') %>">
162
+ <select name="<%= "#{key}_per_page" %>" class="ms-3 form-select form-select-sm w-auto" data-action="change->lato-form#submit" aria-label="<%= I18n.t('lato.per_page_description') %>">
163
163
  <% pagination_options.each do |option| %>
164
- <option value="<%= option %>" <%= option == params[:per_page].to_i ? 'selected' : '' %>>
164
+ <option value="<%= option %>" <%= option == params["#{key}_per_page"].to_i ? 'selected' : '' %>>
165
165
  <%= option %> <%= I18n.t('lato.per_page').downcase %>
166
166
  </option>
167
167
  <% end %>
@@ -2,8 +2,8 @@
2
2
  <div data-controller="lato-operation">
3
3
  <% if operation.created_status? %>
4
4
  <div class="text-center">
5
- <h2>Operazione in corso</h2>
6
- <p>Si prega di attendere..</p>
5
+ <h2><%= I18n.t('lato.operation_title') %></h2>
6
+ <p><%= I18n.t('lato.operation_subtitle') %></p>
7
7
  <div class="progress" style="height: 20px;">
8
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
9
  </div>
@@ -12,8 +12,8 @@
12
12
 
13
13
  <% if operation.running_status? %>
14
14
  <div class="text-center">
15
- <h2>Operazione in corso</h2>
16
- <p>Si prega di attendere..</p>
15
+ <h2><%= I18n.t('lato.operation_title') %></h2>
16
+ <p><%= I18n.t('lato.operation_subtitle') %></p>
17
17
  <% if operation.percentage.nil? %>
18
18
  <div class="progress" style="height: 20px;">
19
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>
@@ -31,8 +31,8 @@
31
31
  <div class="fs-1 text-success">
32
32
  <i class="bi bi-check-circle"></i>
33
33
  </div>
34
- <h2>Operazione completata</h2>
35
- <p>L'operazione รจ stata completata con successo</p>
34
+ <h2><%= I18n.t('lato.operation_completed_title') %></h2>
35
+ <p><%= I18n.t('lato.operation_completed_subtitle') %></p>
36
36
 
37
37
  <% if operation.output_file? %>
38
38
  <%= link_to '', main_app.url_for(operation.output_file), download: true, class: 'd-none', data: { lato_operation_target: 'outputFile' } %>
@@ -51,8 +51,8 @@
51
51
  <div class="fs-1 text-danger">
52
52
  <i class="bi bi-x-circle"></i>
53
53
  </div>
54
- <h2>Operazione fallita</h2>
55
- <p>L'operazione รจ fallita a causa di un errore</p>
54
+ <h2><%= I18n.t('lato.operation_failed_title') %></h2>
55
+ <p><%= I18n.t('lato.operation_failed_subtitle') %></p>
56
56
  <% if operation.output_error? %>
57
57
  <p class="text-danger fw-bold">
58
58
  <%= operation.output_error %>
@@ -64,6 +64,12 @@ en:
64
64
  confirm_title: Confirm
65
65
  confirm_yes: Yes, confirm
66
66
  confirm_no: No, cancel
67
+ operation_title: Running operation
68
+ operation_subtitle: Please wait..
69
+ operation_completed_title: Operation completed
70
+ operation_completed_subtitle: The operation has been completed successfully
71
+ operation_failed_title: Operation failed
72
+ operation_failed_subtitle: The operation has failed because of an error
67
73
 
68
74
  invitation_mailer:
69
75
  invite_mail_subject: You received an invitation
@@ -66,6 +66,12 @@ it:
66
66
  confirm_title: Conferma
67
67
  confirm_yes: Sรฌ, procedi
68
68
  confirm_no: No, annulla
69
+ operation_title: Operazione in corso
70
+ operation_subtitle: Si prega di attendere..
71
+ operation_completed_title: Operazione completata
72
+ operation_completed_subtitle: L'operazione รจ stata completata con successo
73
+ operation_failed_title: Operazione fallita
74
+ operation_failed_subtitle: Si รจ verificato un errore durante l'operazione
69
75
 
70
76
  invitation_mailer:
71
77
  invite_mail_subject: Hai ricevuto un invito
data/lib/lato/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lato
2
- VERSION = "3.11.14"
2
+ VERSION = "3.13.0"
3
3
  end
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: 3.11.14
4
+ version: 3.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregorio Galante
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-06 00:00:00.000000000 Z
11
+ date: 2025-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails