% user_can_modify_images = Refinery::Plugins.active.names.include?("refinery_images") %>
<% if any_images or user_can_modify_images %>
<%= render :partial => "existing_image" if any_images %>
<% if user_can_modify_images %>
>
<%= render :partial => "form", :locals => {:insert => true} %>
<% end %>
<% else %>
<% flash.now[:error] = t('admin.images.index.no_images_yet').split('.').first.html_safe + "." %>
<%= render :partial => "/shared/admin/form_actions",
:locals => {
:f => nil,
:cancel_url => '',
:hide_cancel => false,
:hide_delete => true,
:hide_submit => true,
:cancel_button_text => t('shared.admin.form_actions.close'),
:cancel_title => nil
} %>
<% end %>
<% content_for :head do %>
<% end %>