Sha256: ba1e1fb3e15097624550615e445f79224a8170a8633333fb574646efa3d7d0d5

Contents?: true

Size: 1.51 KB

Versions: 10

Compression:

Stored size: 1.51 KB

Contents

<div id="jscropper">
<% if @no_image_notice %>
  <%= render_message :warn do %>
    <%= @no_image_notice %>
  <% end %>
<% else %>
  <%= render_message do %>
    <%= simple_format _t(:explain_cropping) %>
  <% end %>
  <div class="thumbnail_background">
    <%= image_tag(
      show_alchemy_picture_path(@picture, size: '800x600', format: 'png'),
      id: 'imageToCrop'
    ) %>
  </div>
  <%= form_for(
    @essence_picture,
    url: alchemy.admin_essence_picture_path(@essence_picture, options: @options.to_json),
    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 %>
    <%= f.button "#{render_icon(:true)} #{_t(:apply)}".html_safe, class: 'with_icon' %>
    <%= link_to _t('Reset Imagemask'), '#', {
      onclick: 'Alchemy.ImageCropper.reset()',
      class: 'reset_mask'
    } %>
  <% 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[:x1] %>, <%= @initial_box[:y1] %>, <%= @initial_box[:x2] %>, <%= @initial_box[:y2] %>],
      <%= @size_x %>,
      <%= @size_y %>,
      [<%= @default_box[:x1] %>, <%= @default_box[:y1] %>, <%= @default_box[:x2] %>, <%= @default_box[:y2] %>],
      <%= @ratio %>,
      [<%= @picture.image_file_width %>, <%= @picture.image_file_height %>]
    );
  });
</script>
<% end %>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
alchemy_cms-2.9.1 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-2.9.0 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-2.8.3 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-2.7.5 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-2.7.4 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-2.8.2 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-2.8.1 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-2.7.3 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-2.7.2 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-2.7.1 app/views/alchemy/admin/essence_pictures/crop.html.erb