Sha256: 44425aab93f6a303e4ba5ff1cf4d1a554c1fc18b743d63b51896813638664201

Contents?: true

Size: 1.53 KB

Versions: 18

Compression:

Stored size: 1.53 KB

Contents

- name          = field.name.to_s
- content_type  = Locomotive::ContentType.class_name_to_content_type(field.class_name, current_site)
- content_entry = content_type.entries.build


%div{ id: "#{name}-template-entry", style: 'display: none' }

  %h2
    %span.new-section= t('locomotive.content_entries.new.title', type: name.capitalize).html_safe
    %span.edit-section= t('locomotive.content_entries.edit.title', type: name.capitalize).html_safe

  = semantic_form_for content_entry, as: :content_entry, namespace: name.to_s, url: content_entries_path(content_type.slug), html: { multipart: true, data: { sending_form_message: t('locomotive.messages.sending_form') } } do |form|

    = form.inputs name: :attributes do
      - content_type.ordered_entries_custom_fields.each_with_index do |_field, index|

        - next if _field.name == field.inverse_of || %w(has_many many_to_many).include?(_field.type)

        = render "locomotive/custom_fields/types/#{_field.type}",
          f:            form,
          name:         _field.name.to_sym,
          field:        _field,
          highlighted:  _field._id == content_type.label_field_id

  .dialog-actions
    = link_to t('locomotive.buttons.close'), '#', id: 'close-link'

    .button-wrapper
      %span.new-section= submit_tag t('locomotive.shared.form_actions.create'), :'data-disable-with' => t('locomotive.shared.form_actions.disable_with')
      %span.edit-section= submit_tag t('locomotive.shared.form_actions.update'), :'data-disable-with' => t('locomotive.shared.form_actions.disable_with')

Version data entries

18 entries across 18 versions & 1 rubygems

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