Sha256: 7625e93fe5982b506563759ac46f4c48b4542031bf8ac96fee6f9cbcebbb2c2a

Contents?: true

Size: 1.39 KB

Versions: 3

Compression:

Stored size: 1.39 KB

Contents

%li{id: dom_id(file)}
  .row
    .col-md-7.item
      .item-controls.d-none.d-lg-block
        - if !params[:categories].present? && @site.files.count > 1
          .dragger
            = fa_icon("bars")
      .item-content
        .item-title
          - if file.attachment.image?
            - variant = file.attachment.variant(Comfy::Cms::File::VARIANT_SIZE[:thumb])
            - thumb = image_tag variant, size: "200x150"
          = link_to file.attachment, target: "_blank", data: {toggle: "page-file-popover", content: thumb} do
            = file.label

        .item-meta
          .content-type
            = truncate(file.attachment.content_type)
          .file-size
            = number_to_human_size(file.attachment.byte_size)

      .item-categories.d-flex.align-items-center.ml-auto
        = render partial: "comfy/admin/cms/categories/categories", object: file

    .col-md-2.d-flex.align-items-center
      - file_tag = "{{cms:file_link #{file.id} }}"
      %input.file-path{type: "text", value: file_tag, readonly: "readonly"}

    .col-md-3.d-flex.align-items-center.justify-content-md-end
      .btn-group.btn-group-sm
        = link_to t('.edit'), edit_comfy_admin_cms_site_file_path(@site, file), class: "btn btn-outline-secondary"
        = link_to t('.delete'), comfy_admin_cms_site_file_path(@site, file), method: :delete, remote: true, data: {confirm: t('.are_you_sure')}, class: "btn btn-danger"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
comfortable_mexican_sofa-2.0.2 app/views/comfy/admin/cms/files/_file.html.haml
comfortable_mexican_sofa-2.0.1 app/views/comfy/admin/cms/files/_file.html.haml
comfortable_mexican_sofa-2.0.0 app/views/comfy/admin/cms/files/_file.html.haml