%=content_for :data_controls do%>
<%=link_to "Upload File",new_spud_admin_medium_path(),:class => "btn btn-primary",:title => "Upload File"%>
<%end%>
<%=content_for :detail do%>
<%@media.each do |media|%>
<% if media.is_protected && (media.is_image? || media.is_pdf?) %>
<% else %>
<%= image_tag(media.image_from_type, :class => "size-50-thumb") %>
<% end %>
<%= link_to media.attachment.url.split("/").last, media.attachment_url %>
<% if media.is_image? %>
<%= link_to 'Crop', edit_spud_admin_medium_path(media.id), :class => 'btn' %>
<% end %>
<% if media.is_protected %>
<%= link_to raw(' Protected'), set_access_spud_admin_medium_path(media.id, :protected => false), :method => :put, :class => 'btn' %>
<% else %>
<%= link_to 'Public', set_access_spud_admin_medium_path(media.id, :protected => true), :method => :put, :class => 'btn' %>
<% end %>
<%= link_to "Replace", replace_spud_admin_medium_path(:id => media.id), :class => "btn"%>
<%=link_to "Remove", spud_admin_medium_path(:id => media.id),:method => :delete,:class => 'btn btn-danger',:confirm => "Are you sure you want to remove this file?"%>
<%end%>
<%=will_paginate @media%>
<%end%>