Sha256: 158654911571d7da02d4cd2dd485632cb5342e2ab61b75a490b59eaf9007484e

Contents?: true

Size: 911 Bytes

Versions: 2

Compression:

Stored size: 911 Bytes

Contents

<% if resource.valid? %>
    <% if resource.assetable.images? %>
        $('<%= j render partial: 'image', locals: { image: resource } %>').appendTo('ol#assets');
        $('#new_image').replaceWith('<%= j render partial: '/admin/section_translations/images_form', locals: { image: ActiveadminSelleoCms::Image.new, section_translation: resource.assetable } %>');
    <% elsif resource.assetable.activeadmin_selleo_cms_section.image? %>
        $('#file-manager').html('<%= j render partial: 'form' %>');
    <% end %>
<% else %>
    <% if resource.assetable.images? %>
        $('#new_image').replaceWith('<%= j render partial: '/admin/section_translations/images_form', locals: { image: resource, section_translation: resource.assetable } %>');
    <% elsif resource.assetable.activeadmin_selleo_cms_section.image? %>
        $('#file-manager').html('<%= j render partial: 'form' %>');
    <% end %>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activeadmin-selleo-cms-0.0.34 app/views/admin/images/create.js.erb
activeadmin-selleo-cms-0.0.33 app/views/admin/images/create.js.erb