Sha256: 45afe758b3940026d9f8eb2e370772ca46220cec5ef8176e0ad8275477ce7938

Contents?: true

Size: 1.46 KB

Versions: 18

Compression:

Stored size: 1.46 KB

Contents

- if nested_table_field.display_type == :table
  tr.nested-fields
    - if nested_table_field.is_positionable.call(f.object)
      td
        i class='fa-solid fa-arrows-up-down-left-right drag-handle'
        = f.hidden_field :position, class: 'hidden-position'
    - if nested_table_field.is_deletable.call(f.object)
      td.item-delete-cell
        = link_to_remove_association "", f, class: 'fa-regular fa-trash-can btn-ghost'
    - nested_table_field.fields.each do |field|
      td data-field-type="#{field.input_type}"
        = input_field_for_column(f, field)
- else
  .form-card.nested-fields
    .card-body
      .card-item data-card-name=assoc_name
        - if nested_table_field.is_deletable.call(f.object)
          .card-title-wrapper
            h6.card-title
              | Title 1
            .card-delete
              = link_to_remove_association "", f, class: 'fa-regular fa-trash-can btn-ghost'
        div
          - nested_table_field.fields.each do |field|
            .form-field
              - if field.label
                .field-label-wrapper
                  label.field-label = field.field_name.to_s.titleize 
              .field-input-wrapper
                = input_field_for_column(f, field)
      - if nested_table_field.associated_fields.present?
        - nested_table_field.associated_fields.each do |associated_nested_field|
          = render partial: '/cm_admin/main/nested_table_form', locals: { f: f, nested_table_field: associated_nested_field }

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
cm-admin-3.0.8 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-3.0.7 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-3.0.6 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-3.0.5 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-3.0.4 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-3.0.3 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-3.0.2 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-3.0.1 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-3.0.0 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-2.4.6 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-2.4.5 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-2.4.4 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-2.4.3 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-2.4.2 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-2.4.1 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-2.4.0 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-2.3.4 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-2.3.3 app/views/cm_admin/main/_nested_fields.html.slim