Sha256: 2b46a5c07768e24832d063524d988cae5a75670b861db1fe878bf3a94f534121

Contents?: true

Size: 1.11 KB

Versions: 15

Compression:

Stored size: 1.11 KB

Contents

- if field.ui_enabled?
  - target_content_type = Locomotive::ContentType.class_name_to_content_type(field.class_name, current_site)

  = f.input       name.to_sym,
    label:        field.label,
    hint:         field.hint,
    as:           :'Locomotive::Empty',
    wrapper_html: { id: "content_entry_#{name}_input", class: 'empty relationship input' }

  - content_for :head do

    %script{ type: 'text/html', id: "#{name}_list" }

      %p.empty{ style: 'display: none' }!= t('.empty')

      %ul

      %hr

      .new-entry

        = text_field_tag 'entry', '', class: 'selected-entry', data: { url: content_entries_path(target_content_type.slug, :json), per_page: Locomotive.config.ui[:per_page], group_by: target_content_type.group_by_field.try(:name) }

        %span.actions
          = link_to t('locomotive.buttons.new_item'), '#', class: 'add'

    %script{ type: 'text/html', id: "#{name}_entry" }
      %li
        .handle.col
          %i.icon-reorder

        .label.col
          {{label}}

        %span.actions
          = link_to_icon :trash, '#', class: 'remove', data: { confirm: t('locomotive.messages.confirm') }

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
locomotive_cms-2.5.7 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.5.6 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.5.6.rc2 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.5.6.rc1 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.5.5 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.5.4 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.5.3 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.5.2 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.5.1 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.5.0 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.5.0.rc3 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.5.0.rc2 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.5.0.rc1 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.4.1 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.4.0 app/views/locomotive/custom_fields/types/_many_to_many.html.haml