Sha256: 63d411fb8ae864452d63cdc01bec1e3a5179d8df498f9b71e5eb8ee1eeaa8fea

Contents?: true

Size: 1.1 KB

Versions: 15

Compression:

Stored size: 1.1 KB

Contents

- if asset.file.file?
  = f.fields_for field.name, asset do |a|
    - if allow_position
      .handle.icon.float_left 

    .file_delete.float_right
      = a.check_box :_destroy
      = a.label :_destroy, t(asset.is_image? ? 'bhf.helpers.image.delete' : 'bhf.helpers.file.delete')

    - return_to = {return_to: edit_entry_path(@platform.name, f.object)}
    - if asset.is_image?
      = link_to asset.file.url, target: :blank do
        = image_tag(find_smallest_size_url_for_file(asset.file), class: 'uploaded_image float_left')
      = link_to t('ksk.asset.image_preview.button.edit'), edit_entry_path('assets', asset.id, return_to), class: 'alt_button float_right'
    - else
      = link_to asset.file_file_name, asset.file.url, class: 'uploaded_file float_left'
      - if asset.has_preview?
        = link_to t('ksk.asset.file_preview.button.edit'), edit_entry_path('previews', asset.preview, return_to), class: 'alt_button float_right'
      - else
        = link_to t('ksk.asset.file_preview.button.create'), new_entry_path('previews', {asset_id: asset.id}.merge(return_to)), class: 'alt_button float_right'

    .clear

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ksk-0.4.11 app/views/bhf/form/has_many/_upload.haml
ksk-0.4.10 app/views/bhf/form/has_many/_upload.haml
ksk-0.4.9 app/views/bhf/form/has_many/_upload.haml
ksk-0.4.8 app/views/bhf/form/has_many/_upload.haml
ksk-0.4.7 app/views/bhf/form/has_many/_upload.haml
ksk-0.4.6 app/views/bhf/form/has_many/_upload.haml
ksk-0.4.5 app/views/bhf/form/has_many/_upload.haml
ksk-0.4.4 app/views/bhf/form/has_many/_upload.haml
ksk-0.4.3 app/views/bhf/form/has_many/_upload.haml
ksk-0.4.2 app/views/bhf/form/has_many/_upload.haml
ksk-0.4.1 app/views/bhf/form/has_many/_upload.html.haml
ksk-0.4.0 app/views/bhf/form/has_many/_upload.html.haml
ksk-0.3.4 app/views/bhf/form/has_many/_upload.html.haml
ksk-0.3.3 app/views/bhf/form/has_many/_upload.html.haml
ksk-0.3.2 app/views/bhf/form/has_many/_upload.html.haml