Sha256: e2c825f39adb8a2828cf52725952c25781088bf823c5a80bd6e6fb6d535614aa

Contents?: true

Size: 1.08 KB

Versions: 11

Compression:

Stored size: 1.08 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

        = select_tag 'entry', []

        %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') }

  - content_for :backbone_view_data do
    :plain
      , all_#{name}_entries: #{escape_json target_content_type.list_or_group_entries.to_json(depth: 1).html_safe}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
locomotive_cms-2.3.1 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.3.0 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.2.3 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.2.2 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.2.1 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.2.0 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.1.4 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.1.3 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.1.2 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.1.1 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.1.0 app/views/locomotive/custom_fields/types/_many_to_many.html.haml