Method: Tenon::AssetDecorator#crop_link

Defined in:
app/decorators/tenon/asset_decorator.rb


20
21
22
23
24
25
26
27
28
29
30
31
# File 'app/decorators/tenon/asset_decorator.rb', line 20

def crop_link
  h.action_link(
    'Crop',
    [:crop, object],
    'crop',
    class: 'asset-crop',
    data: {
      'asset-id' => object.id,
      'post-crop-handler' => 'Tenon.features.AssetListPostCropHandler'
    }
  ) if object.attachment_content_type.include?('image') || object.attachment_content_type.include?('video')
end