Sha256: 71b3a485574a07771b3832d6afbbd2b4ea5653778201e5fc2ba3ab19e2fbb5dd

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 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, format: "webp"), id: 'imageToCrop' %>
  </div>
  <form>
    <%= button_tag Alchemy.t(:apply), type: 'submit' %>
    <%= button_tag Alchemy.t('Reset Imagemask'), class: 'reset_mask', type: 'reset' %>
  </form>
</div>
<% end %>
<% if @settings %>
<script type="text/javascript">
  Alchemy.ImageLoader('#jscropper .thumbnail_background');
  $('#imageToCrop').on("load", function() {
    new Alchemy.ImageCropper(
      <%= @settings[:min_size].to_json %>,
      <%= @settings[:default_box].to_json %>,
      <%= @settings[:ratio] %>,
      <%= @settings[:image_size].to_json %>,
      [
        "<%= params[:crop_from_form_field_id] %>",
        "<%= params[:crop_size_form_field_id] %>",
      ],
      <%= @element.id %>
    );
  });
</script>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alchemy_cms-7.1.0.pre.rc1 app/views/alchemy/admin/crop.html.erb