Sha256: bfd21787a8dd0899687f8854b8af92980ccbcb6640a7a27dfc620ac24f8d4dda

Contents?: true

Size: 592 Bytes

Versions: 2

Compression:

Stored size: 592 Bytes

Contents

.fragment-attachments
  - attachments.each do |attachment|
    - if attachment.image?
      - variant = attachment.variant(Comfy::Cms::File::VARIANT_SIZE[:thumb])
      - thumb = image_tag(url_for(variant), size: "200x150")
    .btn.btn-outline-light
      = link_to attachment.filename, attachment, {data: {toggle: "page-file-popover", content: thumb}}
      %label.custom-control.custom-checkbox
        = check_box_tag "#{object_name}[fragments_attributes][#{index}][file_ids_destroy][]", attachment.id, false, id: nil, class: "custom-control-input"
        %span.custom-control-indicator

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
comfortable_mexican_sofa-2.0.9 app/views/comfy/admin/cms/fragments/_form_fragment_attachments.html.haml
comfortable_mexican_sofa-2.0.8 app/views/comfy/admin/cms/fragments/_form_fragment_attachments.html.haml