Sha256: 4373cd235e9870e9b8b993accbd546be3d76f8bb05b6eb1d487b5979538c2029

Contents?: true

Size: 1.99 KB

Versions: 9

Compression:

Stored size: 1.99 KB

Contents

= f.hidden_field :image_id, class: 'asset-id-field'
= f.hidden_field :position
= f.hidden_field :size
.image
  - if f.object.image
    = image_tag(f.object.image.url(:_medium))
  - else
    = link_to(new_item_asset_path, class: 'add-image', data: {'modal-remote' => true, 'modal-title' => "Select Image", 'modal-handler' => 'Tenon.features.tenonContent.AssetAttachment'}) do
      %span Add Image

  = f.super_text_area :caption, class: 'caption', placeholder: 'Enter caption here...', style: ("display: none;" unless f.object.show_caption)
  = f.hidden_field :show_caption

  .medium-editor-toolbar.medium-toolbar-arrow-under.medium-editor-toolbar-active.image-controls{style: "display: none; margin-top: -65px;"}
    %ul.medium-editor-toolbar-actions.clearfix
      %li
        %button{title: 'Crop', class: 'asset-crop medium-editor-action medium-editor-button-first', data: {'tooltip' => true, 'post-crop-handler' => 'Tenon.features.tenonContent.PostCropHandler', 'asset-id' => f.object.image_id}}
          %i.fa.fa-crop

      %li
        %button{title: 'Grow', class: 'grow-image medium-editor-action', data: {'column-resize-operation' => 'increase', 'tooltip' => true}}
          %i.fa.fa-plus
      %li
        %button{title: 'Shrink', class: 'shrink-image medium-editor-action', data: {'column-resize-operation' => 'decrease', 'tooltip' => true}}
          %i.fa.fa-minus
      %li
        %button{title: 'Toggle Caption', class: 'medium-editor-action toggle-caption', data: {tooltip: true}}
          %i.fa.fa-comment
      %li
        %button{title: 'Swap Sides', class: 'swap-sides medium-editor-action', data: {tooltip: true}}
          %i.fa.fa-arrows-h

      %li
        %button{href: new_item_asset_path, title: 'Replace Image', class: 'replace-image medium-editor-action  medium-editor-button-last', data: {'modal-remote' => 'true', 'modal-title' => "Select Image", 'modal-handler' => 'Tenon.features.tenonContent.AssetAttachment', 'tooltip' => true}}
          %i.fa.fa-picture-o

    .medium-editor-toolbar-form-anchor

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
tenon-1.0.8 app/views/tenon/tenon_content/piece_types/form/_image.html.haml
tenon-1.0.7 app/views/tenon/tenon_content/piece_types/form/_image.html.haml
tenon-1.0.6 app/views/tenon/tenon_content/piece_types/form/_image.html.haml
tenon-1.0.5 app/views/tenon/tenon_content/piece_types/form/_image.html.haml
tenon-1.0.4 app/views/tenon/tenon_content/piece_types/form/_image.html.haml
tenon-1.0.3 app/views/tenon/tenon_content/piece_types/form/_image.html.haml
tenon-1.0.2 app/views/tenon/tenon_content/piece_types/form/_image.html.haml
tenon-1.0.1 app/views/tenon/tenon_content/piece_types/form/_image.html.haml
tenon-1.0 app/views/tenon/tenon_content/piece_types/form/_image.html.haml