pg_rails 7.3.1 → 7.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a98b2f93e0db541d062b9a3197d0cc308ed4abcbe274626253b222f62364eb96
|
4
|
+
data.tar.gz: 4f345c9ed13c0ae1fa6ff0b21a3f1f3474db7f21337c621fa568000fc97950c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad1f3664f46f4a708723338dfbb37a5de55f8ec57f77dce723c7a96c6782d04e081a0d61cbe0b5be7df675dfe9164c3ee2ccaeea33ab7ddf070a19f95e4d2f97
|
7
|
+
data.tar.gz: b2cf238051be29ec1525b8f1c7189977e5f2f85532591898b89591754f1015288465a383f823afec225e3e898b07e82e5a3e2d555691501e6f79a5f33a8c692d
|
@@ -64,11 +64,13 @@ module PgEngine
|
|
64
64
|
def edit_link(text: ' Modificar', klass: 'btn-warning')
|
65
65
|
return unless Pundit.policy!(Current.user, object).edit?
|
66
66
|
|
67
|
+
modal = object.class.default_modal
|
68
|
+
|
67
69
|
helpers.content_tag :span, rel: :tooltip, title: 'Modificar' do
|
68
70
|
helpers.link_to edit_object_url,
|
69
71
|
class: "btn btn-sm #{klass}",
|
70
|
-
'data-turbo-frame': 'modal_content',
|
71
|
-
'data-turbo-stream':
|
72
|
+
'data-turbo-frame': modal ? 'modal_content' : '_top',
|
73
|
+
'data-turbo-stream': modal do
|
72
74
|
helpers.content_tag(:span, nil, class: clase_icono('pencil')) + text
|
73
75
|
end
|
74
76
|
end
|
@@ -77,11 +79,13 @@ module PgEngine
|
|
77
79
|
def show_link(text: '', klass: 'btn-light')
|
78
80
|
return unless Pundit.policy!(Current.user, object).show?
|
79
81
|
|
82
|
+
modal = object.class.default_modal
|
83
|
+
|
80
84
|
helpers.content_tag :span, rel: :tooltip, title: 'Ver' do
|
81
85
|
helpers.link_to object_url,
|
82
86
|
class: "btn btn-sm #{klass}",
|
83
|
-
'data-turbo-frame': 'modal_content',
|
84
|
-
'data-turbo-stream':
|
87
|
+
'data-turbo-frame': modal ? 'modal_content' : '_top',
|
88
|
+
'data-turbo-stream': modal do
|
85
89
|
helpers.content_tag(:span, nil, class: clase_icono('eye-fill')) + text
|
86
90
|
end
|
87
91
|
end
|
@@ -101,11 +105,13 @@ module PgEngine
|
|
101
105
|
def new_link(klass: 'btn-warning')
|
102
106
|
return unless Pundit.policy!(Current.user, object).new?
|
103
107
|
|
108
|
+
modal = object.class.default_modal
|
109
|
+
|
104
110
|
helpers.content_tag :span, rel: :tooltip, title: submit_default_value do
|
105
111
|
helpers.link_to(new_object_url,
|
106
112
|
class: "btn btn-sm #{klass}",
|
107
|
-
'data-turbo-frame': 'modal_content',
|
108
|
-
'data-turbo-stream':
|
113
|
+
'data-turbo-frame': modal ? 'modal_content' : '_top',
|
114
|
+
'data-turbo-stream': modal) do
|
109
115
|
helpers.content_tag(:span, nil,
|
110
116
|
class: clase_icono('plus').to_s) + "<span class='d-none d-sm-inline'> #{submit_default_value}</span>".html_safe
|
111
117
|
end
|
data/pg_rails/lib/version.rb
CHANGED