Sha256: 89a3f953ca3600e2a336d49037f4bb351d81148cdd60e7fda0bb9ad13501951e

Contents?: true

Size: 689 Bytes

Versions: 12

Compression:

Stored size: 689 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, field: @field %>
    </div>
  <% end %>

  <% if @resource.authorization.authorize_action(:upload_attachments?, raise_exception: false) %>
    <%= @form.file_field @field.id,
      data: @field.get_html(:data, view: view, element: :input),
      direct_upload: @field.direct_upload,
      disabled: @field.readonly,
      style: @field.get_html(:style, view: view, element: :input)
    %>
  <% end %>
<% end %>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
avo-2.10.2 app/components/avo/fields/file_field/edit_component.html.erb
avo-2.9.2.pre1 app/components/avo/fields/file_field/edit_component.html.erb
avo-2.10.0 app/components/avo/fields/file_field/edit_component.html.erb
avo-2.9.1.pre7 app/components/avo/fields/file_field/edit_component.html.erb
avo-2.9.1.pre6 app/components/avo/fields/file_field/edit_component.html.erb
avo-2.9.1.pre5 app/components/avo/fields/file_field/edit_component.html.erb
avo-2.9.1.pre4 app/components/avo/fields/file_field/edit_component.html.erb
avo-2.9.1.pre3 app/components/avo/fields/file_field/edit_component.html.erb
avo-2.9.1.pre2 app/components/avo/fields/file_field/edit_component.html.erb
avo-2.9.1.pre1 app/components/avo/fields/file_field/edit_component.html.erb
avo-2.9.0 app/components/avo/fields/file_field/edit_component.html.erb
avo-2.8.0 app/components/avo/fields/file_field/edit_component.html.erb