zutils 3.0.1 → 3.0.2
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/_btn_action_links.html.erb +7 -4
- data/app/views/shared/_show.html.erb +5 -1
- data/lib/zutils/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7d2ca7875c5cbac73748c37b83b6585c114033acb1d53ebffe8ac023b6667c9
|
4
|
+
data.tar.gz: c44982f7748a5ce410e3a1a25d32d559ae39ef8038c6ffee24141c27d8a50e43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78e0a5f117208de343e28c7870b9de07f84747ef28e0d3f1717d1113993ff67cda831f5bec0c4e6b79eef9b01b45e914448c9a056b9700e8c35e02ccc5f6b84f
|
7
|
+
data.tar.gz: b474063b7effcbcd514cd12131d0b6bffa31565b14886d727b449ff50f56ccc1b987562e649869016dc8be65427240e969a76f59c1074230b7f3b1077398d2d2
|
@@ -1,6 +1,9 @@
|
|
1
1
|
<% size ||= "md" %>
|
2
2
|
<% labels ||= false %>
|
3
3
|
<% hide ||= [] %>
|
4
|
+
<% new_color ||= 'primary' %>
|
5
|
+
<% edit_color ||= 'warning' %>
|
6
|
+
<% delete_color ||= 'danger' %>
|
4
7
|
<div class="row">
|
5
8
|
<div class="col text-nowrap">
|
6
9
|
<% unless hide.include? "show" %>
|
@@ -16,7 +19,7 @@
|
|
16
19
|
<% end %>
|
17
20
|
<% unless hide.include? "new" %>
|
18
21
|
<%= link_to eval_with_rescue("new_#{[object].flatten.map{|x| x.class.to_s.underscore}.join("_")}_path"),
|
19
|
-
class: "mb-1 btn btn-#{size} btn
|
22
|
+
class: "mb-1 btn btn-#{size} btn-#{new_color}", data: { "bs-toggle": "tooltip", "bs-placement": "top", "bs-title": "Cadastrar" } do %>
|
20
23
|
<% if labels %>
|
21
24
|
<div class="d-none d-sm-inline-block">
|
22
25
|
Cadastrar
|
@@ -27,7 +30,7 @@
|
|
27
30
|
<% end %>
|
28
31
|
<% unless hide.include? "edit" %>
|
29
32
|
<%= link_to eval_with_rescue("edit_#{[object].flatten.map{|x| x.class.to_s.underscore}.join("_")}_path(#{object.id})"),
|
30
|
-
class: "mb-1 btn btn-#{size} btn
|
33
|
+
class: "mb-1 btn btn-#{size} btn-#{edit_color}", data: { "bs-toggle": "tooltip", "bs-placement": "top", "bs-title": "Editar" } do %>
|
31
34
|
<% if labels %>
|
32
35
|
<div class="d-none d-sm-inline-block">
|
33
36
|
Editar
|
@@ -50,7 +53,7 @@
|
|
50
53
|
<% unless hide.include? "delete" %>
|
51
54
|
<%= button_to object, method: :delete, form: { data: { turbo_confirm: 'Tem certeza?' }, class: 'd-inline'},
|
52
55
|
data: { "bs-toggle": "tooltip", "bs-placement": "top", "bs-title": "Apagar" },
|
53
|
-
class: "mb-1 btn btn-#{size} btn
|
56
|
+
class: "mb-1 btn btn-#{size} btn-#{delete_color}" do %>
|
54
57
|
<% if labels %>
|
55
58
|
<div class="d-none d-sm-inline-block">
|
56
59
|
Apagar
|
@@ -64,7 +67,7 @@
|
|
64
67
|
<div class="col col-auto text-right">
|
65
68
|
<%= button_to object, method: :delete, form: { data: { turbo_confirm: 'Tem certeza?' }, class: 'd-inline'},
|
66
69
|
data: { "bs-toggle": "tooltip", "bs-placement": "top", "bs-title": "Apagar" },
|
67
|
-
class: "mb-1 btn btn-#{size} btn
|
70
|
+
class: "mb-1 btn btn-#{size} btn-#{delete_color}" do %>
|
68
71
|
<% if labels %>
|
69
72
|
<div class="d-none d-sm-inline-block">
|
70
73
|
Apagar
|
@@ -9,6 +9,10 @@
|
|
9
9
|
<% hide ||= %w[show delete] %>
|
10
10
|
<% size ||= "xs" %>
|
11
11
|
|
12
|
+
<% new_color ||= 'primary' %>
|
13
|
+
<% edit_color ||= 'warning' %>
|
14
|
+
<% delete_color ||= 'danger' %>
|
15
|
+
|
12
16
|
<% if show_columns.empty? %>
|
13
17
|
<% form_fields ||= (object.class.respond_to?('form_fields') ? object.class.form_fields : {}) %>
|
14
18
|
<% form_ordered_fields ||= (form_fields.empty? ? object.class.column_names : form_fields.keys) %>
|
@@ -206,4 +210,4 @@
|
|
206
210
|
<% end %>
|
207
211
|
<% end %>
|
208
212
|
<% end %>
|
209
|
-
<%= render "shared/btn_action_links", object: object, labels: true, hide: hide %>
|
213
|
+
<%= render "shared/btn_action_links", object: object, labels: true, hide: hide, new_color: new_color, edit_color: edit_color, delete_color: delete_color %>
|
data/lib/zutils/version.rb
CHANGED