zutils 0.3.1 → 0.3.2
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/_action_links.html.erb +4 -4
- 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: 28a7dad053af4abeff410da300a0cfbb34b6d1164933723a75bd2c4fdeb453c6
|
|
4
|
+
data.tar.gz: 27a65bc81bad38c8261326cebcb54cffffbe8bbde6bde5eac7ec57d341f315de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 250d2c8e896be2e72b000bfb58250a7abda861e8edd432df8994fda6e468095e597e07b4725a34d7cd056f50d85167166d84403111dd4ec7c66d6573845416c2
|
|
7
|
+
data.tar.gz: 85989a986418e3995b34930f0f75e822458a8504a8300a40c6016f67fbc7f0a8880bc8ded8e2ff09d11ebfaf85b7412a725fa8f1edf8003eeb39e01a02b68ca4
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
<span class="sr-only">Toggle Dropdown</span>
|
|
8
8
|
</button>
|
|
9
9
|
<ul class="dropdown-menu" role="menu">
|
|
10
|
-
<% if can? :read, object.class %>
|
|
10
|
+
<% if can? :read, (object.class == Array ? object.last.class : object.class) %>
|
|
11
11
|
<li>
|
|
12
12
|
<%= link_to object, data: { toggle: 'tooltip', placement: 'top', title: 'Visualizar' } do %>
|
|
13
13
|
<i class="fa fa-eye"></i> Visualizar
|
|
14
14
|
<% end %>
|
|
15
15
|
<% end %>
|
|
16
16
|
</li>
|
|
17
|
-
<% if can? :edit, object.class %>
|
|
17
|
+
<% if can? :edit, (object.class == Array ? object.last.class : object.class) %>
|
|
18
18
|
<li>
|
|
19
19
|
<% if object.class == Array %>
|
|
20
20
|
<%= link_to eval_with_rescue("edit_#{[object].flatten.map{|x| x.class.to_s.underscore}.join("_")}_path(#{object[0].id}, #{object[1].id})"), data: { toggle: 'tooltip', placement: 'top', title: 'Editar' } do %>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<% end %>
|
|
28
28
|
</li>
|
|
29
29
|
<% end %>
|
|
30
|
-
<% if can? :destroy, object.class %>
|
|
30
|
+
<% if can? :destroy, (object.class == Array ? object.last.class : object.class) %>
|
|
31
31
|
<li>
|
|
32
32
|
<%= link_to object, method: :delete, data: { confirm: 'Tem certeza?', toggle: 'tooltip', placement: 'top', title: 'Apagar' } do %>
|
|
33
33
|
<i class="fa fa-trash"></i> Apagar
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<% end %>
|
|
37
37
|
<% unless additional_actions.empty? %>
|
|
38
38
|
<% additional_actions.each do |key, value| %>
|
|
39
|
-
<% if can? key, object.class %>
|
|
39
|
+
<% if can? key, (object.class == Array ? object.last.class : object.class) %>
|
|
40
40
|
<li>
|
|
41
41
|
<%= link_to eval_with_rescue("#{value[:link]}(#{object.id})"), value[:options] do %>
|
|
42
42
|
<i class="fa fa-<%= value[:icon] %>"></i> <%= value[:title] %>
|
data/lib/zutils/version.rb
CHANGED