Sha256: 146476a6c4df1d850551f4802d2be873278ae08e543d751c4a17b0994836c9fd

Contents?: true

Size: 1.15 KB

Versions: 9

Compression:

Stored size: 1.15 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
.tn-tc-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

9 entries across 9 versions & 1 rubygems

Version Path
tenon-1.0.76 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.75 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.74 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.73 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.72 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.71 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.70 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.69 app/views/tenon/shared/_asset_field.html.haml
tenon-1.0.68 app/views/tenon/shared/_asset_field.html.haml