<%= t('.edit_upload') %>

<% if @upload.try(:errors).present? %> <%= render 'shared/error_messages', :target => @upload %> <% end %> <%= form_for([:admin, @upload], :html => { :multipart => true }) do |f| %>

<% if @upload.image_content? %> <%= t('.preview') %>:
<%= link_to image_tag(@upload.attachment.url(:small)), @upload.attachment.url(:original) %> <% else %> <%= t('.link') %>:
<%= link_to @upload.attachment_file_name, @upload.attachment.url %> <% end %>

<%= render "form", :form => f %>

<%= button t("update") %> or <%= link_to t("cancel"), admin_uploads_url, :id => "cancel_link" %>

<% end %>