% content_for :head do %>
<%= stylesheet_link_tag 'comfy_gallery/jquery.jcrop.css' %>
<%= javascript_include_tag 'comfy_gallery/jquery.jcrop.js' %>
<% end %>
Crop Photo
<%= comfy_gallery_form_for @photo, :as => :photo, :url => { :action => :update } do |form| %>
<% if @photo.gallery.force_ratio_full? %>
<%= form.simple_field 'Full Size' do %>
<%= image_tag @photo.image.url(:admin_full), :id => 'crop_full' %>
<% end %>
<% end %>
<% if @photo.gallery.force_ratio_thumb? %>
<%= form.simple_field 'Thumbnail' do %>
<%= image_tag @photo.image.url(:admin_full), :id => 'crop_thumb' %>
<% end %>
<% end %>
<% [:full_crop_x, :full_crop_y, :full_crop_w, :full_crop_h].each do |attr| %>
<%= form.hidden_field attr, :id => attr %>
<% end %>
<% [:thumb_crop_x, :thumb_crop_y, :thumb_crop_w, :thumb_crop_h].each do |attr| %>
<%= form.hidden_field attr, :id => attr %>
<% end %>
<%= form.submit 'Crop' %>
<% end %>