lato 0.1.36 → 0.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/views/lato/components/_index.html.erb +11 -10
- data/config/locales/en.yml +1 -1
- data/config/locales/it.yml +1 -1
- data/lib/lato/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8947dc920c2ff430381a61dc716793c6f84041524b6e16ac377bc9107e515a1
|
4
|
+
data.tar.gz: 2e79a46022a54971859448b29484305b41d8c9f9b19dc6a45c4dcb09f526ac42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41fff5e87a6194c695752b447fb93c402461fed8bf0195ed481e7bd7e499f0ba5d5146d899ba0d03aca02883d3122639ee379f25abe2a8f71d314acb9b35c75f
|
7
|
+
data.tar.gz: 95fbbcf0a7f6d424a81969ad5eb0b60885af056e3350eda753dcef8cfc85cc6f4945cfef1e2084745c0c3118a89e6950c8652eaa2e87f7479686a135fe6eeda6
|
@@ -1,10 +1,11 @@
|
|
1
1
|
<%
|
2
2
|
|
3
3
|
collection_test_istance = collection.model.new
|
4
|
+
collection_total = collection.respond_to?(:total_count) ? collection.total_count : collection.count
|
4
5
|
|
5
6
|
%>
|
6
7
|
|
7
|
-
<%= turbo_frame_tag "lato_index_#{key}_#{model_name_underscore}", class: 'lato-index' do %>
|
8
|
+
<%= turbo_frame_tag "lato_index_#{key}_#{model_name_underscore}", class: "lato-index #{browser.device.mobile? ? 'lato-index-mob' : 'lato-index-desk'}" do %>
|
8
9
|
|
9
10
|
<%= form_tag request.path, method: :get, data: { turbo_frame: '_self' } do %>
|
10
11
|
<%= hidden_field_tag :key, key %>
|
@@ -39,17 +40,17 @@ collection_test_istance = collection.model.new
|
|
39
40
|
|
40
41
|
<ul class="list-group list-group-flush">
|
41
42
|
<% collection.each do |member| %>
|
42
|
-
<li class="list-group-item p-
|
43
|
-
<table class="table
|
43
|
+
<li class="list-group-item p-2 border-0 bg-light mb-3 rounded">
|
44
|
+
<table class="table">
|
44
45
|
<tbody>
|
45
46
|
<% columns.each do |column| %>
|
46
|
-
<tr>
|
47
|
-
<th><%= collection_test_istance.respond_to?(column) ? collection.model.human_attribute_name(column) : lato_index_dynamic_label({
|
47
|
+
<tr class="lato-index-mob-row lato-index-mob-row-<%= column %>">
|
48
|
+
<th class="lato-index-mob-label lato-index-mob-label-<%= column %>"><%= collection_test_istance.respond_to?(column) ? collection.model.human_attribute_name(column) : lato_index_dynamic_label({
|
48
49
|
key: key,
|
49
50
|
model_name: model_name,
|
50
51
|
column: column
|
51
52
|
}) %></th>
|
52
|
-
<td class="lato-index-
|
53
|
+
<td class="lato-index-mob-value lato-index-mob-value-<%= column %>">
|
53
54
|
<% viewer_function_name = "#{model_name_underscore}_#{column}" %>
|
54
55
|
<%= respond_to?(viewer_function_name) ? send(viewer_function_name, member) : (collection_test_istance.respond_to?(column) ? member.send(column) : lato_index_dynamic_value({
|
55
56
|
key: key,
|
@@ -67,7 +68,7 @@ collection_test_istance = collection.model.new
|
|
67
68
|
</ul>
|
68
69
|
|
69
70
|
<div class="d-flex flex-column align-items-center">
|
70
|
-
<span class="text-muted"><%=
|
71
|
+
<span class="text-muted"><%= collection_total %> <%= I18n.t('lato.total_results').downcase %></span>
|
71
72
|
<% if collection.respond_to?(:total_pages) %>
|
72
73
|
<div class="mt-3"><%= paginate collection %></div>
|
73
74
|
<% end %>
|
@@ -80,7 +81,7 @@ collection_test_istance = collection.model.new
|
|
80
81
|
<thead>
|
81
82
|
<tr class="align-middle">
|
82
83
|
<% columns.each do |column| %>
|
83
|
-
<th scope="col" class="lato-index-col-<%= column %>">
|
84
|
+
<th scope="col" class="lato-index-desk-col-label lato-index-desk-col-label-<%= column %>">
|
84
85
|
<div class="d-flex align-items-center">
|
85
86
|
<span><%= collection_test_istance.respond_to?(column) ? collection.model.human_attribute_name(column) : lato_index_dynamic_label({
|
86
87
|
key: key,
|
@@ -109,7 +110,7 @@ collection_test_istance = collection.model.new
|
|
109
110
|
<% collection.each do |member| %>
|
110
111
|
<tr>
|
111
112
|
<% columns.each do |column| %>
|
112
|
-
<td class="lato-index-col-<%= column %>">
|
113
|
+
<td class="lato-index-desk-col-value lato-index-desk-col-value-<%= column %>">
|
113
114
|
<% viewer_function_name = "#{model_name_underscore}_#{column}" %>
|
114
115
|
<%= respond_to?(viewer_function_name) ? send(viewer_function_name, member) : (collection_test_istance.respond_to?(column) ? member.send(column) : lato_index_dynamic_value({
|
115
116
|
key: key,
|
@@ -131,7 +132,7 @@ collection_test_istance = collection.model.new
|
|
131
132
|
<% else %>
|
132
133
|
<div></div>
|
133
134
|
<% end %>
|
134
|
-
<span class="text-muted"><%=
|
135
|
+
<span class="text-muted"><%= collection_total %> <%= I18n.t('lato.total_results').downcase %></span>
|
135
136
|
</div>
|
136
137
|
</td>
|
137
138
|
</tr>
|
data/config/locales/en.yml
CHANGED
data/config/locales/it.yml
CHANGED
@@ -22,7 +22,7 @@ it:
|
|
22
22
|
update_password: Aggiornamento password
|
23
23
|
confirm: Conferma
|
24
24
|
search_for: Ricerca per
|
25
|
-
|
25
|
+
total_results: Risultati totali
|
26
26
|
account_informations: Informazioni account
|
27
27
|
verify_email: Verifica email
|
28
28
|
email_verified: Verificato
|
data/lib/lato/version.rb
CHANGED
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.38
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregorio Galante
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|