Sha256: 03a4c6b0abae44d38b1e3746cec51ac7644cc5fa78b4b38ce7b67093c694f475
Contents?: true
Size: 976 Bytes
Versions: 4
Compression:
Stored size: 976 Bytes
Contents
.fragment-attachments - attachments.each do |attachment| :ruby thumb_url = if attachment.image? url_for(attachment.variant(combine_options: Comfy::Cms::File::VARIANT_SIZE[:thumb])) end filename = attachment.filename.to_s truncated_filename = truncate(filename, length: 40, omission: "...#{filename.last(10)}") link_data = { cms_file_thumb_url: thumb_url, cms_file_link_tag: cms_page_file_link_tag( fragment_id: fragment_id, attachment: attachment, multiple: multiple ) } .fragment-attachment.btn-group.btn-group-sm.mb-1 = link_to truncated_filename, attachment, data: link_data, class: "btn btn-light text-truncate", target: "_blank" = check_box_tag "#{object_name}[fragments_attributes][#{index}][file_ids_destroy][]", attachment.id, false, id: dom_id(attachment) %label.btn.btn-light{for: dom_id(attachment)} %i.fas.fa-fw.fa-times
Version data entries
4 entries across 4 versions & 1 rubygems