Sha256: 5eddd9244b2134a686edb577ad7fcfd270bf3872ead3bd27563febeb3df86cec

Contents?: true

Size: 1.45 KB

Versions: 37

Compression:

Stored size: 1.45 KB

Contents

<div id="jscropper">
<% if @no_image_notice %>
  <%= render_message :warn do %>
    <%= @no_image_notice %>
  <% end %>
<% else %>
  <%= render_message do %>
    <%= simple_format Alchemy.t(:explain_cropping) %>
  <% end %>
  <div class="thumbnail_background">
    <%= image_tag @picture.url(size: '800x600', flatten: true), id: 'imageToCrop' %>
  </div>
  <%= form_for(
    @essence_picture,
    url: alchemy.admin_essence_picture_path(@essence_picture, options: options_from_params),
    id: 'image_cropper_form',
    remote: true
  ) do |f| %>
    <%= f.hidden_field :crop_from %>
    <%= f.hidden_field :crop_size %>
    <%= hidden_field_tag :content_id, @content.id %>
    <%= button_tag Alchemy.t('Reset Imagemask'), {
      onclick: 'Alchemy.ImageCropper.reset(); return false',
      class: 'reset_mask',
      type: 'reset'
    } %>
    <%= f.button Alchemy.t(:apply) %>
  <% end %>
</div>
<% end %>
<% if @initial_box && @default_box %>
<script type="text/javascript">
  Alchemy.ImageLoader('#jscropper .thumbnail_background');
  $('#imageToCrop').load(function() {
    Alchemy.ImageCropper.init(
       <%= @initial_box.values.to_json %>,
      <% if @essence_picture.can_be_cropped_to("#{@min_size[:width]}x#{@min_size[:height]}") %>
        <%= @min_size.values.to_json %>,
      <% else %>
        <%= false %>,
      <% end %>
      <%= @default_box.values.to_json %>,
      <%= @ratio %>,
      <%= @picture.image_size.values.to_json %>
    );
  });
</script>
<% end %>

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
alchemy_cms-4.6.7 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.6.6 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.6.5 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.5.1 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.4.5 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.6.4 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.0.6 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.6.3 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.6.2 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.6.1 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.6.0 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.5.0 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.4.4 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.4.3 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.4.2 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.4.1 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.4.0 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.3.2 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.2.4 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-4.3.1 app/views/alchemy/admin/essence_pictures/crop.html.erb