Sha256: b01b619d0d1cd82b96ae085e6c23a971c3f8a7d75225ebda5ffb726a7682f3d5

Contents?: true

Size: 1.02 KB

Versions: 4

Compression:

Stored size: 1.02 KB

Contents

= raw(label_tag)

- if opts[:explanation].present?
  .explanation= raw opts[:explanation]

.tn-tc-asset-field
  = f.hidden_field "#{field}_id", class: 'asset-id-field'

  .thumbnail
    - if proxy_attachment.try(:asset)
      = asset_icon(proxy_attachment.asset)
    - else
      = image_tag default_asset_thumbnail(proxy_attachment)

  .details
    .asset-info
      - if proxy_attachment
        = proxy_attachment.display_name
      - else
        No asset selected.

    .browse-button-holder{ class: ('with-remove' if opts[:remove_association]) }
      .browse-button
        = link_to 'Browse', new_item_asset_path, class: 'btn btn-comp browse', data: { modal_remote: true, modal_title: "Select #{field.to_s.titleize}", modal_handler: 'Tenon.features.AssetAttachment' }
        - if opts[:remove_association]
          %small
            or
            = link_to_remove_association "remove", f
        - else
          %small
            or
            = link_to "remove", '#', class: 'remove-asset', data: { confirm: 'Are you sure?' }

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tenon-1.1.4 app/views/tenon/fields/_asset.html.haml
tenon-1.1.3 app/views/tenon/fields/_asset.html.haml
tenon-1.1.2 app/views/tenon/fields/_asset.html.haml
tenon-1.1.1 app/views/tenon/fields/_asset.html.haml