zutils 0.2.6 → 0.2.7
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/shared/_index.html.erb +5 -5
- data/app/views/shared/_list.html.erb +2 -1
- data/app/views/shared/_show.html.erb +11 -5
- data/lib/zutils/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: 0e2d69c2da15caf145355c2c8c65eaa556ad46dc8e8d9e2bf7bd9b3830d3d95f
|
4
|
+
data.tar.gz: 3db052d159a7be184cb124a890d53ce9a23492fa64ac73f8bce6ec51ab0794c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ced26faf4d38770bd0a40b6ebb677ce7de8795f50099680446d527a6e277d41786a521bd7c255bedb0e3ccba7326f2ed1c4b86b51836fa62893898c8e1c56e0a
|
7
|
+
data.tar.gz: ada509e3eb65c4321f3fa82f541b4df864fde2401bcfeedce8fe666113f8a848110eab179df361a1679a9e74e579d471a38e7c8ecef82e64ab52196eed1fb106
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<div class='box box-<%= box_class %>'>
|
11
11
|
<div class="box-header with-border">
|
12
12
|
<h3 class="box-title">
|
13
|
-
<%=
|
13
|
+
<%= list.proxy_association.klass.model_name.human.pluralize %>
|
14
14
|
</h3>
|
15
15
|
</div>
|
16
16
|
<div class="box-body">
|
@@ -56,13 +56,13 @@
|
|
56
56
|
<% if can? :new, controller_name.singularize %>
|
57
57
|
<% if nested_resource == true %>
|
58
58
|
<% if parent_resource %>
|
59
|
-
<%= link_to eval("new_#{parent_resource}_#{
|
60
|
-
<%= t('.new', default: t("helpers.links.new")) %> <%=
|
59
|
+
<%= link_to eval("new_#{parent_resource.class.model_name.singular}_#{list.proxy_association.klass.model_name.singular}_path(#{parent_resource.id})"), class: "btn btn-#{box_class}" do %>
|
60
|
+
<%= t('.new', default: t("helpers.links.new")) %> <%= list.proxy_association.klass.model_name.human %> <i class='fa fa-plus'></i>
|
61
61
|
<% end %>
|
62
62
|
<% end %>
|
63
63
|
<% else %>
|
64
|
-
<%= link_to eval("new_#{
|
65
|
-
<%= t('.new', default: t("helpers.links.new")) %> <%=
|
64
|
+
<%= link_to eval("new_#{list.proxy_association.klass.model_name.singular}_path"), class: "btn btn-#{box_class}" do %>
|
65
|
+
<%= t('.new', default: t("helpers.links.new")) %> <%= list.proxy_association.klass.model_name.human %> <i class='fa fa-plus'></i>
|
66
66
|
<% end %>
|
67
67
|
<% end %>
|
68
68
|
<% end %>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<% exceptions ||= ['created_at', 'updated_at', 'deleted_at'] %>
|
2
2
|
<% excluded_columns ||= [] %>
|
3
3
|
<% additional_columns ||= [] %>
|
4
|
+
<% additional_actions ||= [] %>
|
4
5
|
<% hide_actions ||= false %>
|
5
6
|
<% sort_fields ||= [] %>
|
6
7
|
<% sort_all ||= false %>
|
@@ -60,7 +61,7 @@
|
|
60
61
|
<% end %>
|
61
62
|
<% unless hide_actions %>
|
62
63
|
<td>
|
63
|
-
<%= render 'shared/action_links', object: object %>
|
64
|
+
<%= render 'shared/action_links', object: object, additional_actions: additional_actions %>
|
64
65
|
</td>
|
65
66
|
<% end %>
|
66
67
|
</tr>
|
@@ -11,19 +11,25 @@
|
|
11
11
|
<div class="box-header with-border">
|
12
12
|
<h3 class="box-title"><%= object.class.model_name.human %></h3>
|
13
13
|
<% if can? :edit, object %> <!--verificando se o usuario esta logado-->
|
14
|
-
|
15
|
-
|
14
|
+
<% if nested_resource %>
|
15
|
+
<%= link_to eval_with_rescue("new_#{parent_resource.class.model_name.singular}_#{object.class.model_name.singular}_path(#{parent_resource.id})"), class: "btn btn-#{box_class} btn-xs", data: { toggle: 'tooltip', placement: 'top', title: 'Cadastrar' } do %>
|
16
|
+
<i class="fa fa-plus"></i> Cadastrar
|
17
|
+
<% end %>
|
18
|
+
<% else %>
|
19
|
+
<%= link_to eval_with_rescue("new_#{object.class.model_name.plural}_path"), class: "btn btn-#{box_class} btn-xs", data: { toggle: 'tooltip', placement: 'top', title: 'Cadastrar' } do %>
|
20
|
+
<i class="fa fa-plus"></i> Cadastrar
|
21
|
+
<% end %>
|
16
22
|
<% end %>
|
17
23
|
<% end %>
|
18
24
|
<% if can? :edit, object %> <!--verificando se o usuario esta logado-->
|
19
|
-
<%= link_to eval_with_rescue("edit_#{
|
25
|
+
<%= link_to eval_with_rescue("edit_#{object.class.model_name.singular}_path(#{object.id})"), class: "btn btn-warning btn-xs", data: { toggle: 'tooltip', placement: 'top', title: 'Editar' } do %>
|
20
26
|
<i class="fa fa-pencil"></i> Editar
|
21
27
|
<% end %>
|
22
28
|
<% end %>
|
23
29
|
<% if nested_resource %>
|
24
|
-
<%= link_to 'Listagem', eval_with_rescue("#{parent_resource.class.model_name.
|
30
|
+
<%= link_to 'Listagem', eval_with_rescue("#{parent_resource.class.model_name.singular}_#{object.class.model_name.plural}_path(#{parent_resource.id})"), class: "btn btn-default btn-xs" %>
|
25
31
|
<% else %>
|
26
|
-
<%= link_to 'Listagem', eval_with_rescue("#{
|
32
|
+
<%= link_to 'Listagem', eval_with_rescue("#{object.class.model_name.plural}_path"), class: "btn btn-default btn-xs" %>
|
27
33
|
<% end %>
|
28
34
|
</div>
|
29
35
|
<div class="box-body <%= 'no-padding' if display_mode == 'table' %>">
|
data/lib/zutils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zutils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Viana
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|