Sha256: 8d188e120244a7bbcce1bea1a60fdf60130eae1579d21a5a22a0dd7e6c6320e2

Contents?: true

Size: 1.52 KB

Versions: 9

Compression:

Stored size: 1.52 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(); return false',
      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

9 entries across 9 versions & 1 rubygems

Version Path
alchemy_cms-3.0.4 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-3.0.3 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-3.0.2 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-3.0.1 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-3.0.0 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-3.0.0.rc8 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-3.0.0.rc7 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-3.0.0.rc6 app/views/alchemy/admin/essence_pictures/crop.html.erb
alchemy_cms-3.0.0.rc5 app/views/alchemy/admin/essence_pictures/crop.html.erb