lato 3.10.1 → 3.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/lato/components_helper.rb +2 -1
- data/app/views/lato/components/_index.html.erb +27 -7
- 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: f45b94061e1d1f1c1755637ff86f2ae9f20dab616ef82915ccc418c3dea27f8c
|
4
|
+
data.tar.gz: f2a0cc9193e80ea5295ddbafd954aa394f149204ca9117e20d9eaa097bef03dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21d76f318792b1542778fa0be09cf20b35b616175357e6e8924899e6b3cc3ec58f43660e5b0383596463d34c36d6f0ebf477652250f529c14f0edf948f2666e2
|
7
|
+
data.tar.gz: 0dc185834763c0b2a13e8ad21229f3128af0c68694c8cf4d2b474e18008495b32908c993f238f1c3bc86d9e4a94e195d3daa241272fbfc0083fff923874d0866
|
@@ -64,7 +64,8 @@ module Lato
|
|
64
64
|
model_name: model_name,
|
65
65
|
model_name_underscore: model_name_underscore,
|
66
66
|
pagination_options: pagination_options,
|
67
|
-
custom_actions: options[:custom_actions] || {}
|
67
|
+
custom_actions: options[:custom_actions] || {},
|
68
|
+
dropdown_actions: options[:dropdown_actions] || nil
|
68
69
|
)
|
69
70
|
end
|
70
71
|
|
@@ -13,8 +13,8 @@ collection_total = collection.respond_to?(:total_count) ? collection.total_count
|
|
13
13
|
<%= hidden_field_tag k, v %>
|
14
14
|
<% end %>
|
15
15
|
|
16
|
-
<% if custom_actions.any? || searchable_columns.any? %>
|
17
|
-
<div class="d-flex
|
16
|
+
<% if custom_actions.any? || searchable_columns.any? || dropdown_actions %>
|
17
|
+
<div class="d-flex mb-3">
|
18
18
|
<% if searchable_columns.any? %>
|
19
19
|
<div class="input-group">
|
20
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] %>">
|
@@ -23,16 +23,36 @@ collection_total = collection.respond_to?(:total_count) ? collection.total_count
|
|
23
23
|
<% else %>
|
24
24
|
<div></div>
|
25
25
|
<% end %>
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
|
27
|
+
<% if custom_actions.any? %>
|
28
|
+
<div class="btn-group ms-2">
|
29
29
|
<% custom_actions.each do |action_key, action_params| %>
|
30
30
|
<%= link_to action_params[:path], { class: 'btn btn-primary' }.merge(action_params) do %>
|
31
31
|
<i class="<%= action_params[:icon] %>"></i>
|
32
32
|
<% end %>
|
33
33
|
<% end %>
|
34
|
-
|
35
|
-
|
34
|
+
</div>
|
35
|
+
<% end %>
|
36
|
+
|
37
|
+
<% if dropdown_actions %>
|
38
|
+
<div class="dropdown ms-2">
|
39
|
+
<%= content_tag :button, { class: 'btn btn-primary dropdown-toggle', 'data-bs-toggle': 'dropdown' }.merge(dropdown_actions) do %>
|
40
|
+
<i class="<%= dropdown_actions[:icon] %>"></i>
|
41
|
+
<% end %>
|
42
|
+
<ul class="dropdown-menu">
|
43
|
+
<% dropdown_actions[:actions].each do |action| %>
|
44
|
+
<li>
|
45
|
+
<%= link_to action[:path], { class: 'dropdown-item' }.merge(action) do %>
|
46
|
+
<% if action[:icon] %>
|
47
|
+
<i class="<%= action[:icon] %> me-1"></i>
|
48
|
+
<% end %>
|
49
|
+
<%= action[:title] %>
|
50
|
+
<% end %>
|
51
|
+
</li>
|
52
|
+
<% end %>
|
53
|
+
</ul>
|
54
|
+
</div>
|
55
|
+
<% end %>
|
36
56
|
</div>
|
37
57
|
<% end %>
|
38
58
|
|
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: 3.10.
|
4
|
+
version: 3.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregorio Galante
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|