Sha256: 87a4ecd0d470b85c679652d54a788003bdcd1157408fe6d5d1d484a184de6c67

Contents?: true

Size: 1.6 KB

Versions: 12

Compression:

Stored size: 1.6 KB

Contents

%h3.upload-file= t("active_admin.cms.file_manager.upload_file")
- if resource.activeadmin_selleo_cms_section.attachments?
  = render partial: 'attachments_form', locals: { attachment: ActiveadminSelleoCms::Attachment.new, section_translation: resource }
- elsif resource.activeadmin_selleo_cms_section.images?
  = render partial: 'images_form', locals: { image: ActiveadminSelleoCms::Image.new, section_translation: resource }
- elsif resource.activeadmin_selleo_cms_section.related?
  = render partial: 'related_items_form', locals: { related_item: ActiveadminSelleoCms::RelatedItem.new, section_translation: resource }

%hr

%h3.manage-files= t("active_admin.cms.file_manager.manage_files")
%small= t("active_admin.cms.file_manager.hint")
%form
  %fieldset.inputs.assets
    %ol#assets
      - if resource.activeadmin_selleo_cms_section.attachments?
        = render partial: '/admin/attachments/attachment', collection: resource.attachments
      - elsif resource.activeadmin_selleo_cms_section.images?
        = render partial: '/admin/images/image', collection: resource.images
      - elsif resource.activeadmin_selleo_cms_section.related?
        = render partial: '/admin/related_items/related_item', collection: resource.related_items

:javascript
  $('ol#assets').sortable({
    stop: function(event, ui) {
      $.ajax({
        type: 'post',
        data: $('ol#assets').sortable('serialize'),
        dataType: 'script',
        success: function(request){
          $('ol#assets').closest('fieldset').effect('highlight');
        },
        url: '#{sort_assets_admin_section_translation_path(resource)}'
      })
    }
  });

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
activeadmin-selleo-cms-0.0.44 app/views/admin/section_translations/_form.html.haml
activeadmin-selleo-cms-0.0.43 app/views/admin/section_translations/_form.html.haml
activeadmin-selleo-cms-0.0.42 app/views/admin/section_translations/_form.html.haml
activeadmin-selleo-cms-0.0.41 app/views/admin/section_translations/_form.html.haml
activeadmin-selleo-cms-0.0.40 app/views/admin/section_translations/_form.html.haml
activeadmin-selleo-cms-0.0.39 app/views/admin/section_translations/_form.html.haml
activeadmin-selleo-cms-0.0.38 app/views/admin/section_translations/_form.html.haml
activeadmin-selleo-cms-0.0.37 app/views/admin/section_translations/_form.html.haml
activeadmin-selleo-cms-0.0.36 app/views/admin/section_translations/_form.html.haml
activeadmin-selleo-cms-0.0.35 app/views/admin/section_translations/_form.html.haml
activeadmin-selleo-cms-0.0.34 app/views/admin/section_translations/_form.html.haml
activeadmin-selleo-cms-0.0.33 app/views/admin/section_translations/_form.html.haml