avo 2.15.2 → 2.15.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of avo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/components/avo/index/grid_item_component.html.erb +1 -1
- data/app/components/avo/index/grid_item_component.rb +2 -1
- data/app/components/avo/index/resource_grid_component.html.erb +1 -1
- data/app/components/avo/index/resource_grid_component.rb +2 -1
- data/app/components/avo/views/resource_index_component.html.erb +1 -1
- data/lib/avo/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: 68cfd9efb2f52f774b347c404afe6b68e8e0e21102500e234184a11a4b8dd104
|
4
|
+
data.tar.gz: b8f9fc9d7a24fc30a453f0643aeae48c2e4bb9ecce27b59679e246bd55054fa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c80aedbf84f25b6b53e99d51c6ba3e603eaa619e9963ae988b4f76469f3f14c92e9e5f8045234bb7746cbed3008b9656d598effc0d49c742665acbbd4d35390a
|
7
|
+
data.tar.gz: c116b5296b79976867bd3f3342d334d355e7a5acb012b5bbb7e2965b65d98794f08b6f747d07e1598b144ff78c5c1fcfcf0e978ab681166ea67ca8a86abf9b4c
|
data/Gemfile.lock
CHANGED
@@ -38,7 +38,7 @@
|
|
38
38
|
</div>
|
39
39
|
</div>
|
40
40
|
<div class="w-full place-self-end">
|
41
|
-
<%= render(Avo::Index::ResourceControlsComponent.new(resource: @resource, reflection: @reflection, parent_model: @parent_model, view_type: :grid)) %>
|
41
|
+
<%= render(Avo::Index::ResourceControlsComponent.new(resource: @resource, reflection: @reflection, parent_model: @parent_model, parent_resource: @parent_resource, view_type: :grid)) %>
|
42
42
|
</div>
|
43
43
|
</div>
|
44
44
|
</div>
|
@@ -3,11 +3,12 @@
|
|
3
3
|
class Avo::Index::GridItemComponent < ViewComponent::Base
|
4
4
|
include Avo::ResourcesHelper
|
5
5
|
|
6
|
-
def initialize(resource: nil, reflection: nil, parent_model: nil)
|
6
|
+
def initialize(resource: nil, reflection: nil, parent_model: nil, parent_resource: nil)
|
7
7
|
@resource = resource
|
8
8
|
@reflection = reflection
|
9
9
|
@grid_fields = resource.get_grid_fields
|
10
10
|
@parent_model = parent_model
|
11
|
+
@parent_resource = parent_resource
|
11
12
|
end
|
12
13
|
|
13
14
|
private
|
@@ -3,7 +3,7 @@
|
|
3
3
|
data-selected-resources-name="<%= @resource.model_key %>" data-selected-resources="[]">
|
4
4
|
<% @resources.each_with_index do |resource, index| %>
|
5
5
|
<% cache_if Avo.configuration.cache_resources_on_index_view, resource.cache_hash(@parent_model) do %>
|
6
|
-
<%= render(Avo::Index::GridItemComponent.new(resource: resource, reflection: @reflection, parent_model: @parent_model)) %>
|
6
|
+
<%= render(Avo::Index::GridItemComponent.new(resource: resource, reflection: @reflection, parent_model: @parent_model, parent_resource: @parent_resource)) %>
|
7
7
|
<% end %>
|
8
8
|
<% end %>
|
9
9
|
</div>
|
@@ -1,10 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
class Avo::Index::ResourceGridComponent < ViewComponent::Base
|
4
|
-
def initialize(resources: nil, resource: nil, reflection: nil, parent_model: nil)
|
4
|
+
def initialize(resources: nil, resource: nil, reflection: nil, parent_model: nil, parent_resource: @parent_resource)
|
5
5
|
@resources = resources
|
6
6
|
@resource = resource
|
7
7
|
@reflection = reflection
|
8
8
|
@parent_model = parent_model
|
9
|
+
@parent_resource = parent_resource
|
9
10
|
end
|
10
11
|
end
|
@@ -65,7 +65,7 @@
|
|
65
65
|
<% end %>
|
66
66
|
<% end %>
|
67
67
|
<% if view_type.to_sym == :grid %>
|
68
|
-
<%= render Avo::Index::ResourceGridComponent.new(resources: @resources, resource: @resource, reflection: @reflection, parent_model: @parent_model) %>
|
68
|
+
<%= render Avo::Index::ResourceGridComponent.new(resources: @resources, resource: @resource, reflection: @reflection, parent_model: @parent_model, parent_resource: @parent_resource) %>
|
69
69
|
<div class="mt-6">
|
70
70
|
<%= render Avo::PaginatorComponent.new pagy: @pagy, turbo_frame: @turbo_frame || 'none', index_params: @index_params, resource: @resource, parent_model: @parent_model, discreet_pagination: field&.discreet_pagination %>
|
71
71
|
</div>
|
data/lib/avo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.15.
|
4
|
+
version: 2.15.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Marin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-09-
|
12
|
+
date: 2022-09-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|