avo 2.11.3.pre.1 → 2.12.0

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.

Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -3
  3. data/app/components/avo/actions_component.html.erb +3 -3
  4. data/app/components/avo/actions_component.rb +3 -12
  5. data/app/components/avo/button_component.rb +3 -1
  6. data/app/components/avo/index/ordering/buttons_component.html.erb +1 -1
  7. data/app/components/avo/index/resource_controls_component.rb +1 -1
  8. data/app/components/avo/panel_component.html.erb +1 -1
  9. data/app/components/avo/resource_component.rb +4 -6
  10. data/app/components/avo/views/resource_index_component.rb +2 -0
  11. data/app/components/avo/views/resource_show_component.html.erb +47 -137
  12. data/app/components/avo/views/resource_show_component.rb +0 -1
  13. data/app/controllers/avo/application_controller.rb +5 -0
  14. data/app/controllers/avo/associations_controller.rb +1 -1
  15. data/app/views/avo/debug/report.html.erb +0 -1
  16. data/app/views/avo/private/design.html.erb +1 -1
  17. data/lib/avo/base_resource.rb +1 -5
  18. data/lib/avo/concerns/has_model.rb +11 -0
  19. data/lib/avo/fields/base_field.rb +6 -4
  20. data/lib/avo/fields/has_base_field.rb +16 -1
  21. data/lib/avo/licensing/pro_license.rb +0 -1
  22. data/lib/avo/version.rb +1 -1
  23. data/lib/generators/avo/templates/action.tt +1 -1
  24. data/lib/generators/avo/templates/resource_tools/partial.tt +1 -1
  25. data/lib/generators/avo/templates/standalone_action.tt +1 -1
  26. data/public/avo-assets/avo.css +43 -563
  27. metadata +5 -15
  28. data/lib/avo/concerns/has_editable_controls.rb +0 -34
  29. data/lib/avo/resources/controls/action.rb +0 -32
  30. data/lib/avo/resources/controls/actions_list.rb +0 -19
  31. data/lib/avo/resources/controls/back_button.rb +0 -13
  32. data/lib/avo/resources/controls/base_control.rb +0 -59
  33. data/lib/avo/resources/controls/delete_button.rb +0 -13
  34. data/lib/avo/resources/controls/detach_button.rb +0 -13
  35. data/lib/avo/resources/controls/edit_button.rb +0 -13
  36. data/lib/avo/resources/controls/execution_context.rb +0 -59
  37. data/lib/avo/resources/controls/items_holder.rb +0 -19
  38. data/lib/avo/resources/controls/link_to.rb +0 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6322eef586c1cf132343d666fa513b2733699349d2945a86ddb2b37669cfcd1c
4
- data.tar.gz: 5fb654449921d9fde5312adbeee074f96752445c34416ea4a6a22e6c5f9be9df
3
+ metadata.gz: cb6907b0e852005ad23b73029892ac673ef73f955afe6b317d61c0c9303d3ef3
4
+ data.tar.gz: 980fbca1412954ea0e5d1f75ae12e653cd10bfb58307a2fec1a8eafc08c51852
5
5
  SHA512:
6
- metadata.gz: 8c9ee8afe73d49806a42032b5c3f2b8c49a05763d44048e44c55ab4831d30c475ad2792cb6ad11ce5bd8ce296202c20173dd8bf274b05c64f6ac60174835953b
7
- data.tar.gz: f22c15ebaaee96768cd5c38c2935a513410a32a5e46729b22c4c8375c1b7a229b4e3e733572f3fe47207229bae4775ce3a5510c528a532759c81b8b2b0b39fc7
6
+ metadata.gz: c43462a617f2bb6131b899665687ab371823a2c983338f32d095e0b33dfd543a4e3488e94b03f8e6dec1b7ed6162c0fa86d1cbacfde7b1cf07ef6ed5120192e6
7
+ data.tar.gz: e06be5c7fd0c244f683d4bf9960892dac729dc155bbc90f0903758ba3beca5a0394feea932db9c8d67c3ef2836fcf03a1e0056efcb90f8fded28998969cb6e56
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (2.11.3.pre.1)
4
+ avo (2.12.0)
5
5
  active_link_to
6
6
  addressable
7
7
  breadcrumbs_on_rails
@@ -252,8 +252,6 @@ GEM
252
252
  nokogiri (1.13.7)
253
253
  mini_portile2 (~> 2.8.0)
254
254
  racc (~> 1.4)
255
- nokogiri (1.13.7-x86_64-linux)
256
- racc (~> 1.4)
257
255
  orm_adapter (0.5.0)
258
256
  pagy (5.10.1)
259
257
  activesupport
@@ -3,9 +3,9 @@
3
3
  data-actions-picker-enabled-class="text-black hover:bg-blue-500 hover:text-white"
4
4
  data-actions-picker-disabled-class="cursor-wait text-gray-500"
5
5
  >
6
- <%= a_button style: @style,
6
+ <%= a_button style: :outline,
7
7
  type: :button,
8
- color: @color,
8
+ color: :primary,
9
9
  class: "focus:outline-none",
10
10
  icon: 'arrow-circle-right',
11
11
  icon_class: 'transform rotate-90',
@@ -18,7 +18,7 @@
18
18
  data-toggle-panel-target="panel"
19
19
  >
20
20
  <div class="w-full space divide-y">
21
- <% actions.each_with_index do |action, index| %>
21
+ <% @actions.each_with_index do |action, index| %>
22
22
  <%= link_to action_path(action.param_id),
23
23
  data: {
24
24
  'turbo-frame': 'actions_show',
@@ -3,23 +3,14 @@
3
3
  class Avo::ActionsComponent < ViewComponent::Base
4
4
  include Avo::ApplicationHelper
5
5
 
6
- def initialize(actions: [], resource: nil, view: nil, exclude: [], style: :outline, color: :blue)
7
- @actions = actions || []
6
+ def initialize(actions: [], resource: nil, view: nil)
7
+ @actions = actions
8
8
  @resource = resource
9
9
  @view = view
10
- @exclude = exclude
11
- @color = color
12
- @style = style
13
10
  end
14
11
 
15
12
  def render?
16
- actions.present?
17
- end
18
-
19
- def actions
20
- @actions.select do |action|
21
- !action.class.in?(@exclude)
22
- end
13
+ @actions.present?
23
14
  end
24
15
 
25
16
  # When running an action for one record we should do it on a special path.
@@ -43,7 +43,9 @@ class Avo::ButtonComponent < ViewComponent::Base
43
43
  classes = "button-component inline-flex flex-grow-0 items-center font-semibold leading-6 fill-current whitespace-nowrap transition duration-100 transform transition duration-100 cursor-pointer disabled:cursor-not-allowed disabled:opacity-70 border justify-center active:outline active:outline-1 #{@class}"
44
44
 
45
45
  classes += " rounded" if @rounded.present?
46
+
46
47
  classes += style_classes
48
+
47
49
  classes += horizontal_padding_classes
48
50
  classes += vertical_padding_classes
49
51
  classes += text_size_classes
@@ -149,7 +151,7 @@ class Avo::ButtonComponent < ViewComponent::Base
149
151
  def style_classes
150
152
  case @style
151
153
  when :primary
152
- " bg-#{@color}-500 text-white border-#{@color}-500 hover:bg-#{@color}-600 hover:border-#{@color}-600 active:border-#{@color}-700 active:outline-#{@color}-700 active:bg-#{@color}-600"
154
+ " bg-primary-500 text-white border-primary-500 hover:bg-primary-600 hover:border-primary-600 active:border-primary-700 active:outline-primary-700 active:bg-primary-600"
153
155
  when :outline
154
156
  " bg-white text-#{@color}-500 border-#{@color}-500 hover:bg-#{@color}-100 active:bg-#{@color}-100 active:border-#{@color}-500 active:outline-#{@color}-500"
155
157
  when :text
@@ -9,7 +9,7 @@
9
9
  <% else %>
10
10
  <div class="popover inline-block"
11
11
  data-controller="popover"
12
- data-popover-translate-x="-100%"
12
+ data-popover-translate-x="<%= Avo.configuration.resource_controls_placement == :left ? '20%' : '-100%' %>"
13
13
  data-popover-translate-y="-32px"
14
14
  data-action="mouseover->popover#mouseOver mouseout->popover#mouseOut"
15
15
  >
@@ -58,7 +58,7 @@ class Avo::Index::ResourceControlsComponent < Avo::ResourceComponent
58
58
 
59
59
  def singular_resource_name
60
60
  if @reflection.present?
61
- reflection_resource.name
61
+ field&.name&.singularize || reflection_resource.name
62
62
  else
63
63
  @resource.singular_name.present? ? @resource.singular_name : @resource.model_class.model_name.name.downcase
64
64
  end
@@ -17,7 +17,7 @@
17
17
  <% end %>
18
18
  </div>
19
19
  <% if tools.present? %>
20
- <div class="flex-1 w-full flex flex-wrap flex-col sm:flex-row xl:justify-end sm:items-end gap-2 mt-4 xl:mt-0" data-target="panel-controls">
20
+ <div class="flex-1 w-full flex flex-col sm:flex-row xl:justify-end sm:items-end space-y-2 sm:space-y-0 sm:space-x-2 mt-4 xl:mt-0">
21
21
  <%= tools %>
22
22
  </div>
23
23
  <% end %>
@@ -22,12 +22,6 @@ class Avo::ResourceComponent < Avo::BaseComponent
22
22
  authorize_association_for("detach")
23
23
  end
24
24
 
25
- def detach_path
26
- return "/" if @reflection.blank?
27
-
28
- helpers.resource_detach_path(params[:resource_name], params[:id], @reflection.name.to_s, @resource.model.id)
29
- end
30
-
31
25
  def can_see_the_edit_button?
32
26
  @resource.authorization.authorize_action(:edit, raise_exception: false)
33
27
  end
@@ -36,6 +30,10 @@ class Avo::ResourceComponent < Avo::BaseComponent
36
30
  @resource.authorization.authorize_action(:destroy, raise_exception: false)
37
31
  end
38
32
 
33
+ def detach_path
34
+ helpers.resource_detach_path(params[:resource_name], params[:id], @reflection.name.to_s, @resource.model.id)
35
+ end
36
+
39
37
  def destroy_path
40
38
  helpers.resource_path(model: @resource.model, resource: @resource)
41
39
  end
@@ -124,6 +124,8 @@ class Avo::Views::ResourceIndexComponent < Avo::ResourceComponent
124
124
 
125
125
  def singular_resource_name
126
126
  if @reflection.present?
127
+ return name.singularize if field.present?
128
+
127
129
  reflection_resource.name
128
130
  else
129
131
  @resource.singular_name || @resource.model_class.model_name.name.downcase
@@ -7,148 +7,58 @@
7
7
  } do %>
8
8
  <%= render Avo::PanelComponent.new(title: title, description: @resource.resource_description, display_breadcrumbs: @reflection.blank?, index: 0, data: { panel_id: "main" }) do |c| %>
9
9
  <% c.tools do %>
10
- <% if @resource.has_show_controls? %>
11
- <% @resource.render_show_controls.each do |control| %>
12
- <% if control.back_button? %>
13
- <%= a_link back_path,
14
- style: :text,
15
- title: control.title,
16
- data: {
17
- tippy: control.title ? :tooltip : nil,
18
- },
19
- icon: 'arrow-left' do %>
20
- <%= control.label %>
21
- <% end %>
22
- <% elsif control.delete_button? %>
23
- <% if can_see_the_destroy_button? %>
24
- <% end %>
25
- <%= a_button url: helpers.resource_path(model: @resource.model, resource: @resource),
26
- method: :delete,
27
- local: true,
28
- style: :text,
29
- loading: true,
30
- confirm: t('avo.are_you_sure', item: @resource.model.model_name.name.downcase),
31
- color: :red,
32
- icon: 'trash',
33
- form_class: 'flex flex-col sm:flex-row sm:inline-flex',
34
- title: control.title,
35
- data: {
36
- control: :destroy,
37
- tippy: control.title ? :tooltip : nil,
38
- 'resource-id': @resource.model.id,
39
- } do %>
40
- <% end %>
41
- <% elsif control.actions_list? %>
42
- <%= render Avo::ActionsComponent.new actions: @actions, resource: @resource, view: @view, exclude: control.exclude, style: control.style, color: control.color %>
43
- <% elsif control.edit_button? %>
44
- <% if @resource.authorization.authorize_action(:edit, raise_exception: false) %>
45
- <% end %>
46
- <%= a_link edit_path,
47
- color: :primary,
48
- style: :primary,
49
- title: control.title,
50
- data: {
51
- tippy: control.title ? :tooltip : nil,
52
- },
53
- icon: 'edit' do %>
54
- <%= control.label %>
55
- <% end %>
56
- <% elsif control.action? %>
57
- <%= a_link control.path,
58
- color: control.color,
59
- style: control.style,
60
- icon: control.icon,
61
- title: control.title,
62
- data: {
63
- tippy: control.title ? :tooltip : nil,
64
- 'turbo-frame': 'actions_show',
65
- 'action': 'click->actions-picker#visitAction',
66
- } do %>
67
- <%= control.label %>
68
- <% end %>
69
- <% elsif control.link_to? %>
70
- <%= a_link control.path,
71
- color: control.color,
72
- style: control.style,
73
- icon: control.icon,
74
- title: control.title,
75
- target: control.target,
76
- class: control.class,
77
- data: {
78
- **control.data,
79
- tippy: control.title ? :tooltip : nil,
80
- } do %>
81
- <%= control.label %>
82
- <% end %>
83
- <% elsif control.detach_button? %>
84
- <% if @reflection.present? && @resource.model.present? && can_detach? %>
85
- <%= a_button url: detach_path,
86
- icon: 'detach',
87
- method: :delete,
88
- form_class: 'flex flex-col sm:flex-row sm:inline-flex',
89
- style: :text,
90
- data: {
91
- confirm: "Are you sure you want to detach this #{title}."
92
- } do %>
93
- <%= t('avo.detach_item', item: title).capitalize %>
94
- <% end %>
95
- <% end %>
10
+ <% if @reflection.present? && @resource.model.present? %>
11
+ <% if can_detach? %>
12
+ <%= a_button url: detach_path,
13
+ icon: 'detach',
14
+ method: :delete,
15
+ form_class: 'flex flex-col sm:flex-row sm:inline-flex',
16
+ style: :text,
17
+ data: {
18
+ confirm: "Are you sure you want to detach this #{title}."
19
+ } do %>
20
+ <%= t('avo.detach_item', item: title).capitalize %>
96
21
  <% end %>
97
22
  <% end %>
98
- <% else %>
99
- <% if @reflection.present? && @resource.model.present? %>
100
- <% if can_detach? %>
101
- <%= a_button url: detach_path,
102
- icon: 'detach',
103
- method: :delete,
104
- form_class: 'flex flex-col sm:flex-row sm:inline-flex',
105
- style: :text,
106
- data: {
107
- confirm: "Are you sure you want to detach this #{title}."
108
- } do %>
109
- <%= t('avo.detach_item', item: title).capitalize %>
110
- <% end %>
23
+ <%= render Avo::ActionsComponent.new actions: @actions, resource: @resource, view: @view %>
24
+ <% if can_see_the_edit_button? %>
25
+ <%= a_link edit_path,
26
+ color: :primary,
27
+ style: :primary,
28
+ icon: 'edit' do %>
29
+ <%= t('avo.edit').capitalize %>
111
30
  <% end %>
112
- <%= render Avo::ActionsComponent.new actions: @actions, resource: @resource, view: @view %>
113
- <% if can_see_the_edit_button? %>
114
- <%= a_link edit_path,
115
- color: :primary,
116
- style: :primary,
117
- icon: 'edit' do %>
118
- <%= t('avo.edit').capitalize %>
119
- <% end %>
120
- <% end %>
121
- <% else %>
122
- <%= a_link back_path,
31
+ <% end %>
32
+ <% else %>
33
+ <%= a_link back_path,
34
+ style: :text,
35
+ icon: 'arrow-left' do %>
36
+ <%= t('avo.go_back') %>
37
+ <% end %>
38
+ <% if can_see_the_destroy_button? %>
39
+ <%= a_button url: helpers.resource_path(model: @resource.model, resource: @resource),
40
+ method: :delete,
41
+ local: true,
123
42
  style: :text,
124
- icon: 'arrow-left' do %>
125
- <%= t('avo.go_back') %>
43
+ loading: true,
44
+ confirm: t('avo.are_you_sure', item: @resource.model.model_name.name.downcase),
45
+ color: :red,
46
+ icon: 'trash',
47
+ form_class: 'flex flex-col sm:flex-row sm:inline-flex',
48
+ data: {
49
+ control: :destroy,
50
+ 'resource-id': @resource.model.id,
51
+ } do %>
52
+ <%= t('avo.delete').capitalize %>
126
53
  <% end %>
127
- <% if can_see_the_destroy_button? %>
128
- <%= a_button url: helpers.resource_path(model: @resource.model, resource: @resource),
129
- method: :delete,
130
- local: true,
131
- style: :text,
132
- loading: true,
133
- confirm: t('avo.are_you_sure', item: @resource.model.model_name.name.downcase),
134
- color: :red,
135
- icon: 'trash',
136
- form_class: 'flex flex-col sm:flex-row sm:inline-flex',
137
- data: {
138
- control: :destroy,
139
- 'resource-id': @resource.model.id,
140
- } do %>
141
- <%= t('avo.delete').capitalize %>
142
- <% end %>
143
- <% end %>
144
- <%= render Avo::ActionsComponent.new actions: @actions, resource: @resource, view: @view %>
145
- <% if @resource.authorization.authorize_action(:edit, raise_exception: false) %>
146
- <%= a_link edit_path,
147
- color: :primary,
148
- style: :primary,
149
- icon: 'edit' do %>
150
- <%= t('avo.edit').capitalize %>
151
- <% end %>
54
+ <% end %>
55
+ <%= render Avo::ActionsComponent.new actions: @actions, resource: @resource, view: @view %>
56
+ <% if @resource.authorization.authorize_action(:edit, raise_exception: false) %>
57
+ <%= a_link edit_path,
58
+ color: :primary,
59
+ style: :primary,
60
+ icon: 'edit' do %>
61
+ <%= t('avo.edit').capitalize %>
152
62
  <% end %>
153
63
  <% end %>
154
64
  <% end %>
@@ -17,7 +17,6 @@ class Avo::Views::ResourceShowComponent < Avo::ResourceComponent
17
17
  def title
18
18
  if @reflection.present?
19
19
  return field.name if has_one_field?
20
-
21
20
  reflection_resource.name
22
21
  else
23
22
  @resource.default_panel_name
@@ -207,6 +207,11 @@ module Avo
207
207
  end
208
208
 
209
209
  def related_resource
210
+ # Find the field from the parent resource
211
+ field = @resource.get_field params[:related_name]
212
+
213
+ return field.use_resource if field&.use_resource.present?
214
+
210
215
  reflection = @model._reflections[params[:related_name]]
211
216
 
212
217
  reflected_model = reflection.klass
@@ -102,7 +102,7 @@ module Avo
102
102
  end
103
103
 
104
104
  def set_attachment_resource
105
- @attachment_resource = App.get_resource_by_model_name @attachment_class
105
+ @attachment_resource = @field.use_resource || (App.get_resource_by_model_name @attachment_class)
106
106
  end
107
107
 
108
108
  def set_attachment_model
@@ -9,7 +9,6 @@
9
9
  </div>
10
10
  <div class="flex justify-end">
11
11
  <%= a_button icon: 'heroicons/outline/clipboard',
12
- color: :primary,
13
12
  style: :primary,
14
13
  data: {
15
14
  controller: 'copy-to-clipboard',
@@ -1,7 +1,7 @@
1
1
  <div class="flex flex-col">
2
2
  <%= render Avo::PanelComponent.new(title: 'Welcome to Avo', description: 'This page is visible only in development. It will be hidden in other environments.') do |c| %>
3
3
  <% c.tools do %>
4
- <%= a_link('/admin', icon: 'arrow-left', color: :green, style: :primary, is_link: true) do %>
4
+ <%= a_link('/admin', icon: 'arrow-left', style: :primary, is_link: true) do %>
5
5
  Primary
6
6
  <% end %>
7
7
 
@@ -3,8 +3,8 @@ module Avo
3
3
  extend ActiveSupport::DescendantsTracker
4
4
 
5
5
  include ActionView::Helpers::UrlHelper
6
+ include Avo::Concerns::HasModel
6
7
  include Avo::Concerns::HasFields
7
- include Avo::Concerns::HasEditableControls
8
8
  include Avo::Concerns::HasStimulusControllers
9
9
  include Avo::Concerns::ModelClassConstantized
10
10
 
@@ -439,9 +439,5 @@ module Avo
439
439
  def ordering_host(**args)
440
440
  Avo::Hosts::Ordering.new resource: self, options: self.class.ordering, **args
441
441
  end
442
-
443
- def has_model_id?
444
- model.present? && model.id.present?
445
- end
446
442
  end
447
443
  end
@@ -0,0 +1,11 @@
1
+ module Avo
2
+ module Concerns
3
+ module HasModel
4
+ extend ActiveSupport::Concern
5
+
6
+ def has_model_id?
7
+ model.present? && model.id.present?
8
+ end
9
+ end
10
+ end
11
+ end
@@ -112,14 +112,12 @@ module Avo
112
112
  # Secondly we'll try to find a translation key
113
113
  # We'll fallback to humanizing the id
114
114
  def name
115
- default = @id.to_s.humanize(keep_id_suffix: true)
116
-
117
115
  return @name if custom_name?
118
116
 
119
117
  if translation_key && ::Avo::App.translation_enabled
120
- t(translation_key, count: 1, default: default).capitalize
118
+ t(translation_key, count: 1, default: default_name).capitalize
121
119
  else
122
- default
120
+ default_name
123
121
  end
124
122
  end
125
123
 
@@ -137,6 +135,10 @@ module Avo
137
135
  @name.present?
138
136
  end
139
137
 
138
+ def default_name
139
+ @id.to_s.humanize(keep_id_suffix: true)
140
+ end
141
+
140
142
  def placeholder
141
143
  return @placeholder if @placeholder.present?
142
144
 
@@ -15,6 +15,7 @@ module Avo
15
15
  @display = args[:display].present? ? args[:display] : :show
16
16
  @searchable = args[:searchable] == true
17
17
  @description = args[:description]
18
+ @use_resource = args[:use_resource] || nil
18
19
  @discreet_pagination = args[:discreet_pagination] || false
19
20
  end
20
21
 
@@ -22,12 +23,16 @@ module Avo
22
23
  @searchable && ::Avo::App.license.has_with_trial(:searchable_associations)
23
24
  end
24
25
 
26
+ def use_resource
27
+ App.get_resource @use_resource
28
+ end
29
+
25
30
  def resource
26
31
  Avo::App.get_resource_by_model_name @model.class
27
32
  end
28
33
 
29
34
  def turbo_frame
30
- "#{self.class.name.demodulize.to_s.underscore}_#{display}_#{id}"
35
+ "#{self.class.name.demodulize.to_s.underscore}_#{display}_#{frame_id}"
31
36
  end
32
37
 
33
38
  def frame_url
@@ -91,6 +96,16 @@ module Avo
91
96
  true
92
97
  end
93
98
  end
99
+
100
+ def default_name
101
+ use_resource&.name || super
102
+ end
103
+
104
+ private
105
+
106
+ def frame_id
107
+ use_resource.present? ? use_resource.route_key.to_sym : @id
108
+ end
94
109
  end
95
110
  end
96
111
  end
@@ -15,7 +15,6 @@ module Avo
15
15
  :dashboards,
16
16
  :menu_editor,
17
17
  :stimulus_js_integration,
18
- :resource_show_controls,
19
18
  :advanced_fields
20
19
  ]
21
20
  end
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "2.11.3.pre.1" unless const_defined?(:VERSION)
2
+ VERSION = "2.12.0" unless const_defined?(:VERSION)
3
3
  end
@@ -1,5 +1,5 @@
1
1
  class <%= class_name.camelize %> < Avo::BaseAction
2
- self.name = "<%= name.underscore.humanize %>"
2
+ self.name = '<%= name.underscore.humanize %>'
3
3
 
4
4
  def handle(**args)
5
5
  models, fields, current_user, resource = args.values_at(:models, :fields, :current_user, :resource)
@@ -1,7 +1,7 @@
1
1
  <div class="flex flex-col">
2
2
  <%%= render Avo::PanelComponent.new(name: "<%= human_name %>") do |c| %>
3
3
  <%% c.tools do %>
4
- <%%= a_link('/avo', icon: 'heroicons/solid/academic-cap', color: :primary, style: :primary) do %>
4
+ <%%= a_link('/avo', icon: 'heroicons/solid/academic-cap', style: :primary) do %>
5
5
  Dummy link
6
6
  <%% end %>
7
7
  <%% end %>
@@ -1,5 +1,5 @@
1
1
  class <%= class_name.camelize %> < Avo::BaseAction
2
- self.name = "<%= name.underscore.humanize %>"
2
+ self.name = '<%= name.underscore.humanize %>'
3
3
  self.standalone = true
4
4
 
5
5
  def handle(fields:)