Sha256: 3fc0e2b60e4223a0cbfb1c8d9ce39559d432ff163ae295b88391ac5cf71a34ad

Contents?: true

Size: 1.09 KB

Versions: 6

Compression:

Stored size: 1.09 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
          = image_tag 'locomotive/form/icons/drag.png'

        .label.col
          {{label}}

        %span.actions
          = link_to 'x', '#', :class => 'remove', :confirm => t('locomotive.messages.confirm')


  - content_for :backbone_view_data do
    :plain
      , all_#{name}_entries: #{target_content_type.list_or_group_entries.to_json}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
locomotive_cms-2.0.0.rc7 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.0.0.rc6 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.0.0.rc5 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.0.0.rc4 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.0.0.rc2 app/views/locomotive/custom_fields/types/_many_to_many.html.haml
locomotive_cms-2.0.0.rc1 app/views/locomotive/custom_fields/types/_many_to_many.html.haml