Sha256: 968cc3be989922a39d6bf0cfb0a76df2fc21f9aa1c654483a977475823b00f20

Contents?: true

Size: 1.98 KB

Versions: 6

Compression:

Stored size: 1.98 KB

Contents

<%= form_for @image, :url => (@url_override or @image.persisted? ? refinery.admin_image_path(@image) : refinery.admin_images_path),
             :html => { :multipart => true } do |f| %>

  <%= render '/refinery/admin/error_messages',
             :object => @image,
             :include_object_name => false %>

  <div class="field">
    <% if action_name =~ /(edit)|(update)/ %>
      <p>
        <%= t('.use_current_image') %>
        <em><%= t('.or') %></em><%= t('.replace_image') %>
      </p>
      <p>
        <%= f.file_field :image %>
      </p>
    <% else %>
      <% # we must only hint at multiple when it's a new record otherwise update fails. %>
      <%= f.file_field :image, :multiple => true %>
    <% end %>
  </div>

  <div class="field">
    <label><%= t('.maximum_image_size', :bytes => number_to_human_size(Refinery::Images.max_image_size)) %></label>
  </div>

  <input type="hidden" name="wymeditor" value="<%= params[:wymeditor] %>">

  <%= render '/refinery/admin/form_actions', :f => f,
             :continue_editing => false,
             :hide_cancel => (@app_dialog or action_name == 'insert' or from_dialog?),
             :delete_title => t('delete', :scope => 'refinery.admin.images'),
             :delete_confirmation => t('message', :scope => 'refinery.admin.delete', :title => @image.image_name) -%>

  <% if @app_dialog %>
    <input type="hidden" name="app_dialog" value="<%= @app_dialog %>" />
    <input type="hidden" name="field" value="<%= @field %>" />
    <input type="hidden" name="update_image" value="<%= @update_image %>" />
    <input type="hidden" name="thumbnail" value="<%= @thumbnail %>" />
    <input type="hidden" name="callback" value="<%= @callback %>" />
    <input type="hidden" name="conditions" value="<%= @conditions %>" />
  <% end %>
<% end %>

<% if action_name =~ /(edit)|(update)/ %>
  <div id="existing_image">
    <label><%=t('.current_image') %></label>
    <%= image_fu @thumbnail || @image, '225x255>', :class => 'brown_border' %>
  </div>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
refinerycms-images-2.1.5 app/views/refinery/admin/images/_form.html.erb
refinerycms-images-2.1.4 app/views/refinery/admin/images/_form.html.erb
refinerycms-images-2.1.3 app/views/refinery/admin/images/_form.html.erb
refinerycms-images-2.1.2 app/views/refinery/admin/images/_form.html.erb
refinerycms-images-2.1.1 app/views/refinery/admin/images/_form.html.erb
refinerycms-images-2.1.0 app/views/refinery/admin/images/_form.html.erb