Sha256: ddc19afefd7e89adacddbe18aea97645aea30fb628879ccf45461db01f480959

Contents?: true

Size: 1.32 KB

Versions: 2

Compression:

Stored size: 1.32 KB

Contents

div.attachment-upload.upload-btn data-controller="attachment-upload" data-attachment-upload-url="#{Satis::Engine.routes.url_helpers.attachments_path(sgid: model_sgid, attribute: attribute)}" data-attachment-upload-param-name="attachments[]"data-attachment-upload-extra-data='{}' data-turbo="true" turbo-method="post"
  span.icon.upload
    i.fas.fa-upload
  span.icon.uploading
    i.fal.fa-circle-notch.fa-spin
  span.button-text Drag or click to attach files



div.attachments__group
  - attachments = model_has_images ? model.images : model.attachments
  - attachments.each do |attachment|
    div.attachments__attachment(style= attachment_style(attachment))
      - unless attachment.representable?
        div.preview-text
          i.fas.fa-file(aria-hidden="true")

      = link_to Satis::Engine.routes.url_helpers.attachment_path(attachment, sgid: model_sgid, attribute: attribute), data: {turbo_method: :delete, turbo_confirm: "Are you sure you want to delete this attachment?"}, class: 'attachments__button' do
        i.fas.fa-xmark


      = link_to Rails.application.routes.url_helpers.rails_blob_url(attachment, host: request.host + ":#{request.port}"), data: { turbo: true, turbolinks: false }, class: 'attachments__button', download: true do
        i.fas.fa-download

      span.attachments__filename
        = attachment.filename

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
satis-2.1.48 app/components/satis/attachments/component.html.slim
satis-2.1.47 app/components/satis/attachments/component.html.slim