avo 0.5.0.beta2 → 0.5.0.beta3
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.
Potentially problematic release.
This version of avo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +1 -1
- data/app/components/avo/index/resource_grid_component.html.erb +1 -1
- data/app/components/avo/index/resource_table_component.html.erb +1 -1
- data/app/views/avo/partials/_table_header.html.erb +1 -1
- data/lib/avo/app/app.rb +7 -5
- data/lib/avo/configuration.rb +2 -0
- data/lib/avo/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: a01263a88047ada56ed5010750210945dd7b6c60493b6db08f5c6c0eb8588363
|
4
|
+
data.tar.gz: 1231108c022e42dbfcc73568ee428f16f37c8ee7fcfffec0199d907c080604b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c10735c0053dd06808dcce9b03be9b8c2025e020c05a3ae004a71e9ca6f2abcf793bf90dc84790b1097739fb9026980542078a2467036cfe605c771af834cfb
|
7
|
+
data.tar.gz: d7d111eb914b662998c288ee9aa399a52b27dabb57be7c1c316924b6ad8f7d31ff0e27491865c761f8d777e3cdfc15c8e9b48a910d69bf10eec8df57a4439f73
|
data/Gemfile
CHANGED
@@ -97,7 +97,7 @@ group :test do
|
|
97
97
|
gem 'selenium-webdriver'
|
98
98
|
# Easy installation and use of web drivers to run system tests with browsers
|
99
99
|
gem 'webdrivers'
|
100
|
-
gem 'faker'
|
100
|
+
# gem 'faker'
|
101
101
|
gem 'fuubar'
|
102
102
|
gem 'simplecov', require: false
|
103
103
|
gem 'simplecov-cobertura'
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<% if @resources.present?%>
|
2
2
|
<div class="w-full grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 2xl:grid-cols-6 gap-6">
|
3
3
|
<% @resources.each_with_index do |resource, index| %>
|
4
|
-
<% cache_if Avo
|
4
|
+
<% cache_if Avo.configuration.cache_resources_on_index_view, [resource.model, resource.file_hash] do %>
|
5
5
|
<%= render(Avo::Index::GridItemComponent.new(resource: resource, reflection: @reflection, parent_model: @parent_model)) %>
|
6
6
|
<% end %>
|
7
7
|
<% end %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<%= render partial: 'avo/partials/table_header', locals: {fields: @resource.get_fields(view_type: :table, reflection: @reflection)} %>
|
5
5
|
<tbody>
|
6
6
|
<% @resources.each_with_index do |resource, index| %>
|
7
|
-
<% cache_if Avo
|
7
|
+
<% cache_if Avo.configuration.cache_resources_on_index_view, [resource.model, resource.file_hash] do %>
|
8
8
|
<%= render Avo::Index::TableRowComponent.new(resource: resource, reflection: @reflection, parent_model: @parent_model) %>
|
9
9
|
<% end %>
|
10
10
|
<% end %>
|
@@ -30,7 +30,7 @@
|
|
30
30
|
end
|
31
31
|
classes = "text-blue-gray-600 tracking-tight leading-tight text-xs font-semibold"
|
32
32
|
%>
|
33
|
-
<th class="text-left uppercase px-3 py-2 ">
|
33
|
+
<th class="text-left uppercase px-3 py-2 whitespace-nowrap">
|
34
34
|
<% if field.sortable %>
|
35
35
|
<%= link_to params.permit!.merge(sort_by: sort_by, sort_direction: sort_direction), class: "flex items-center #{classes} #{'cursor-pointer' if field.sortable}", 'data-turbo-frame': params[:turbo_frame] do %>
|
36
36
|
<%= field.name %>
|
data/lib/avo/app/app.rb
CHANGED
@@ -166,12 +166,14 @@ module Avo
|
|
166
166
|
def draw_routes
|
167
167
|
Proc.new do
|
168
168
|
Avo::Resources.constants
|
169
|
-
.select do |
|
170
|
-
|
169
|
+
.select do |resource|
|
170
|
+
resource != :Resource
|
171
171
|
end
|
172
|
-
.map do |
|
173
|
-
if Avo::Resources.const_get(
|
174
|
-
|
172
|
+
.map do |resource|
|
173
|
+
if Avo::Resources.const_get(resource).is_a? Class
|
174
|
+
route_key = resource.to_s.underscore.downcase.pluralize.to_sym
|
175
|
+
|
176
|
+
resources route_key
|
175
177
|
end
|
176
178
|
end
|
177
179
|
end
|
data/lib/avo/configuration.rb
CHANGED
@@ -19,6 +19,7 @@ module Avo
|
|
19
19
|
attr_accessor :id_links_to_resource
|
20
20
|
attr_accessor :full_width_container
|
21
21
|
attr_accessor :full_width_index_view
|
22
|
+
attr_accessor :cache_resources_on_index_view
|
22
23
|
|
23
24
|
def initialize
|
24
25
|
@root_path = '/avo'
|
@@ -48,6 +49,7 @@ module Avo
|
|
48
49
|
@id_links_to_resource = false
|
49
50
|
@full_width_container = false
|
50
51
|
@full_width_index_view = false
|
52
|
+
@cache_resources_on_index_view = Avo::PACKED
|
51
53
|
end
|
52
54
|
|
53
55
|
def locale_tag
|
data/lib/avo/version.rb
CHANGED