Sha256: 89a52f60ea17b8b5e2957c84ae509b16c44677283424629554d71c4732a48fb5

Contents?: true

Size: 1.14 KB

Versions: 23

Compression:

Stored size: 1.14 KB

Contents

/ TODO call this partial with local variable named asset_name rather than asset
- asset_name = asset
- proxy_attachment = f.object.send(asset_name)
%label.asset-label= asset_name.to_s.titleize
.asset-field
  = f.hidden_field "#{asset_name}_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 defined?(remove_association) && remove_association)}
      .browse-button
        = link_to 'Browse', new_item_asset_path, class: 'btn btn-comp browse', data: {'modal-remote' => true, 'modal-title' => "Select #{asset_name.to_s.titleize}", 'modal-handler' => 'Tenon.features.AssetAttachment'}
        - if defined?(remove_association) && remove_association
          %small
            or
            = link_to_remove_association "remove", f
        - else
          %small
            or
            = link_to "remove", '#', class: 'remove-asset'

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
tenon-1.0.67 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.66 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.65 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.64 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.63 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.62 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.61 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.60 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.59 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.57 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.56 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.55 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.54 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.53 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.52 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.51 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.50 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.49 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.48 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.47 app/views/tenon/shared/_asset_field.html.haml