Sha256: e20eae98f72ddf45664ec6d4fe946c07298cb524683dc6517248da865031ddc6

Contents?: true

Size: 569 Bytes

Versions: 10

Compression:

Stored size: 569 Bytes

Contents

<%= edit_field_wrapper field: @field, index: @index, form: @form, resource: @resource, displayed_in_modal: @displayed_in_modal do %>
  <% if @field.value.present? %>
    <div class="mb-2">
      <%= render Avo::Fields::Common::SingleFileViewerComponent.new resource: @resource, id: @field.id, file: @field.value, is_image: @field.is_image, button_size: :md %>
    </div>
  <% end %>

  <% if @resource.authorization.authorize_action(:upload_attachments?, raise_exception: false) %>
    <%= @form.file_field @field.id, disabled: @field.readonly %>
  <% end %>
<% end %>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
avo-1.17.1 app/components/avo/fields/file_field/edit_component.html.erb
avo-1.17.0 app/components/avo/fields/file_field/edit_component.html.erb
avo-1.16.4 app/components/avo/fields/file_field/edit_component.html.erb
avo-1.16.3 app/components/avo/fields/file_field/edit_component.html.erb
avo-1.16.2 app/components/avo/fields/file_field/edit_component.html.erb
avo-1.16.1 app/components/avo/fields/file_field/edit_component.html.erb
avo-1.16.0 app/components/avo/fields/file_field/edit_component.html.erb
avo-1.15.0 app/components/avo/fields/file_field/edit_component.html.erb
avo-1.15.0.pre.1 app/components/avo/fields/file_field/edit_component.html.erb
avo-1.14.0 app/components/avo/fields/file_field/edit_component.html.erb