Sha256: 354462d448a89e60fc555f512b6867d1f74bce45c8e140fd67da12db8411edb4

Contents?: true

Size: 1.13 KB

Versions: 14

Compression:

Stored size: 1.13 KB

Contents

%asset-field{ asset: asset_hash(f.object.send(field.relation_name.to_sym)).to_json, :'inline-template' => true }
  .asset-field{ class: ('error' if f.object.errors[field.name].present?) }
    = f.hidden_field field.name, field.html_options.merge(value: '{{ assetId }}')

    .row{ :'v-if' => 'asset' }
      .small-4.medium-3.columns
        %img.preview{ :'v-bind:alt' => 'asset.file_name', :'v-bind:src' => 'asset.preview_thumb_url' }
      .small-8.medium-9.columns
        %table
          %tr
            %th File name
            %td {{ asset.file_name }}
          %tr
            %th File size
            %td {{ asset.file_size | kb }}
          %tr
            %th Content type
            %td {{ asset.mime_type }}
        %a.button.secondary.small.radius{ :'v-on:click.prevent' => 'deselectAsset()' } Remove media
    %div{ :'v-if' => '!asset' }
      %a.button.success.small.radius{ :'v-bind:data-reveal-id' => 'uid' } Pick media

    .reveal-modal{ :'v-bind:id' => 'uid', data: { reveal: true } }
      %asset-modal{ :':reveal-id' => 'uid' }

- if f.object.errors[field.name].present?
  %small.error= f.object.errors[field.name].join(', ')

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
push_type_admin-0.12.1 app/views/push_type/fields/_asset.html.haml
push_type_admin-0.12.0 app/views/push_type/fields/_asset.html.haml
push_type_admin-0.12.0.beta.1 app/views/push_type/fields/_asset.html.haml
push_type_admin-0.11.2 app/views/push_type/fields/_asset.html.haml
push_type_admin-0.11.1 app/views/push_type/fields/_asset.html.haml
push_type_admin-0.11.0.beta.2 app/views/push_type/fields/_asset.html.haml
push_type_admin-0.11.0.beta.1 app/views/push_type/fields/_asset.html.haml
push_type_admin-0.10.4 app/views/push_type/fields/_asset.html.haml
push_type_admin-0.10.3 app/views/push_type/fields/_asset.html.haml
push_type_admin-0.10.2 app/views/push_type/fields/_asset.html.haml
push_type_admin-0.10.1 app/views/push_type/fields/_asset.html.haml
push_type_admin-0.10.0 app/views/push_type/fields/_asset.html.haml
push_type_admin-0.10.0.beta.5 app/views/push_type/fields/_asset.html.haml
push_type_admin-0.10.0.beta.3 app/views/push_type/fields/_asset.html.haml