zutils 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/shared/_search_form.html.erb +46 -0
- data/lib/zutils/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 176587a0bde4bded17898e5355e7c28ac5583f4b4f72856cd7a0d1759d2a4500
|
4
|
+
data.tar.gz: 5b4f7b6bc3a89b519182ef1614b9bb4ad14e3cb4c2ba7686af9e4dda16bcc8dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9c6e9cdd5e020bd8bfba4eabbbe7e96b5880152bd5a0382e61d0e918efe348e1806727f73a171d9bc11a4e37d03501caa26c07d5cf52ccf02661979042ffc9e
|
7
|
+
data.tar.gz: 6818e5dc37b81b7c4b68be9fbb91c59766de41c4cffb6160c88cdf2e341537874e6bf9ac2bd6844dfa365963ff7e308dfd2f8de95cdf38ebdac60cc59a02bc40
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<% card_color ||= 'danger' %>
|
2
|
+
<% default_field = {name: :id_eq, attrs: {label: false, required: false, placeholder: 'ID', wrapper: false}} %>
|
3
|
+
<% received_field = defined?(main_field) ? main_field : {} %>
|
4
|
+
<% main_field = default_field.deep_merge(received_field) %>
|
5
|
+
<%= search_form_for @q, url: url do |f| %>
|
6
|
+
<div class="card card-outline card-<%= card_color %>" data-controller='filtering'>
|
7
|
+
<div class="card-header with-bormainder">
|
8
|
+
<div class="input-group">
|
9
|
+
<div class="input-group-prepend">
|
10
|
+
<button type="button" class="btn btn-<%= card_color %>" data-action="click->filtering#toggle">
|
11
|
+
<i class="fa fa-angle-right" data-filtering-target='icon'></i>
|
12
|
+
<span class="d-none d-sm-inline-block">
|
13
|
+
Filtrar
|
14
|
+
</span>
|
15
|
+
</button>
|
16
|
+
</div>
|
17
|
+
<%= f.input (main_field&.dig(:name) || :id_eq), main_field&.dig(:attrs) %>
|
18
|
+
<div class="input-group-append">
|
19
|
+
<%= button_tag type: "submit", class: "btn btn-#{card_color}" do %>
|
20
|
+
<i class="fa fa-search"></i>
|
21
|
+
<span class="d-none d-sm-inline-block">
|
22
|
+
Buscar
|
23
|
+
</span>
|
24
|
+
<% end %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
<div class="row">
|
28
|
+
<div class="col-md-12 active-filters" data-filtering-target='filters'></div>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
<div class="card-body" style='display: none;' data-filtering-target='body'>
|
32
|
+
<div class="row">
|
33
|
+
<% search_fields ||= [] %>
|
34
|
+
<% search_fields.each do |sf| %>
|
35
|
+
<% default_attrs = {required: false, wrapper_html: {class: "col-md-3"}} %>
|
36
|
+
<% received_attrs = sf.dig(:attrs) || {} %>
|
37
|
+
<% attrs = default_attrs.deep_merge(received_attrs) %>
|
38
|
+
<%= f.input sf.dig(:name), attrs %>
|
39
|
+
<% end %>
|
40
|
+
</div>
|
41
|
+
<%= button_tag type: "submit", class: "btn btn-#{card_color}" do %>
|
42
|
+
<i class="fa fa-search"></i> Buscar
|
43
|
+
<% end %>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
<% end %>
|
data/lib/zutils/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zutils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Viana
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- app/views/shared/_index.html.erb
|
77
77
|
- app/views/shared/_list.html.erb
|
78
78
|
- app/views/shared/_modal.html.erb
|
79
|
+
- app/views/shared/_search_form.html.erb
|
79
80
|
- app/views/shared/_show.html.erb
|
80
81
|
- bin/console
|
81
82
|
- bin/setup
|