Sha256: 6cd717fad5b3c196e893aee730d0c9c04aab9f1b7d1e3803a6295efb57607985

Contents?: true

Size: 1.52 KB

Versions: 7

Compression:

Stored size: 1.52 KB

Contents

- if nested_table_field.display_type == :table
  tr.nested-fields
    - if nested_table_field.is_positionable.call(f.object)
      td data-behaviour='action-icons'
        i class='fa-solid fa-grip-dots-vertical drag-handle pointer'
        = f.hidden_field :position, class: 'hidden-position'
    - if nested_table_field.is_deletable.call(f.object)
      td.item-delete-cell data-behaviour='action-icons'
        = 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

7 entries across 7 versions & 1 rubygems

Version Path
cm-admin-3.0.15 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-3.0.14 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-3.0.13 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-3.0.12 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-3.0.11 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-3.0.10 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-3.0.9 app/views/cm_admin/main/_nested_fields.html.slim