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: ad67165e1aad7f3b3e31dd236706d4b923eb2139740a095018257899b43928a7
4
- data.tar.gz: f3d907a47d97cb7abbfb0e148bb2c2e9466a5255284f14f06c0363966e35e46b
3
+ metadata.gz: a98b2f93e0db541d062b9a3197d0cc308ed4abcbe274626253b222f62364eb96
4
+ data.tar.gz: 4f345c9ed13c0ae1fa6ff0b21a3f1f3474db7f21337c621fa568000fc97950c7
5
5
  SHA512:
6
- metadata.gz: 3d8482db6b3b8455c819d4db06db374e40785cec70a9737bfca652c2368bddad17ca7a2d3656e1632b48b0ebeb03c5142e83855d3d70cfd9d043de3e7d34609d
7
- data.tar.gz: e6e2457ac2a84097209da469aa76dd2538e72c9da05ed383884c19fceddc071b5dc515a82c444c4f3487d7912ca79790bd6eb06f0eed0ae0c4caf48e8797884f
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': true do
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': true do
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': true) do
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.3.1'
4
+ VERSION = '7.3.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.3.1
4
+ version: 7.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso