kono_utils_bootstrap_view4 0.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7ca729271063a5d64a3e7cfdbbb0095a05360786f7d31047bfb7e88d164f4db
4
- data.tar.gz: 6aa833e452752195fb3bb74e360fe615e2d8aa396f039f3057fc6c13a7dcea0b
3
+ metadata.gz: 3fcef8e13a1c9c4bff67ed8e88c00bf04fcbfbc8ffd4b1cbc48bd0916b65fd60
4
+ data.tar.gz: 9899170841054403a58adfc4c7e171c8702347dda0806d3b1867ab96dad3baac
5
5
  SHA512:
6
- metadata.gz: 13ae8eed2972563231f7bb70a656f716370a3101041883e17b3d6385c9d1356d83fc91f9dfcd1735c915e17f2c95a2a1ff232994bfaa472ad3e3199a3af1e8b4
7
- data.tar.gz: 6a65665f415d3a3713265ee44c3217765e48a1040bd152e190478f646e397c0d35b2dd4c5fe9fc5deb69952355f8971f39997ff719c0d9fda7529450cd52ff28
6
+ metadata.gz: 9813a36ce88877e93019ff4c87e98efc3cbdeaa8180ba55dd9dcff6fd27124fafc556c8a61b4010cfdfa825b3710f19fde05f90913013ff6a5a03798f0bbb9bf
7
+ data.tar.gz: 39503751866ad57624a900937915d71e82fe254449b415519bbca6b27bbcd4c1d320c216f084b94da214577616bbbfd226d400ee02225d112bfcd06e937dea3f
@@ -33,6 +33,10 @@ module KonoUtils
33
33
  parent_controller.send(:destroy_custom_polymorphic_path, *rec)
34
34
  end
35
35
 
36
+ def show_custom_polymorphic_path(*rec)
37
+ parent_controller.send(:show_custom_polymorphic_path, *rec)
38
+ end
39
+
36
40
  ##
37
41
  # Registra il contenuto con una chiave, e lo renderizza poi dove è più necessario
38
42
  # @param [String] name
@@ -0,0 +1,23 @@
1
+ module KonoUtils
2
+ module Object
3
+ module Cell
4
+ module Buttons # namespace
5
+ class Show < Base
6
+
7
+ def url_to
8
+ options[:url_to] || show_custom_polymorphic_path(model)
9
+ end
10
+
11
+ def specific_button_class
12
+ 'btn-info'
13
+ end
14
+
15
+ def button_content
16
+ options.fetch(:content, fa_icon("eye"))
17
+ end
18
+
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -1,2 +1,3 @@
1
+ <%= concept("cell/buttons/show", model) if policy(model).show? %>
1
2
  <%= concept("cell/buttons/edit", model) if policy(model).edit? %>
2
- <%= concept("cell/buttons/delete", model) if policy(model).destroy? %>
3
+ <%= concept("cell/buttons/delete", model) if policy(model).destroy? %>
@@ -1,3 +1,3 @@
1
1
  module KonoUtilsBootstrapView4
2
- VERSION = '0.2'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kono_utils_bootstrap_view4
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marino Bonetti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-01 00:00:00.000000000 Z
11
+ date: 2021-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '1.1'
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: 1.1.3
42
+ version: 1.1.4
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: '1.1'
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 1.1.3
52
+ version: 1.1.4
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: kaminari
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -185,6 +185,7 @@ files:
185
185
  - app/concepts/kono_utils/object/cell/buttons/edit.rb
186
186
  - app/concepts/kono_utils/object/cell/buttons/list.rb
187
187
  - app/concepts/kono_utils/object/cell/buttons/reset_search.rb
188
+ - app/concepts/kono_utils/object/cell/buttons/show.rb
188
189
  - app/concepts/kono_utils/object/cell/create/base.rb
189
190
  - app/concepts/kono_utils/object/cell/create/page_title.rb
190
191
  - app/concepts/kono_utils/object/cell/create/side_title.rb