Sha256: 9773238b2a6df93ded2bb60e3b090a41bcbf18a64e5952f9b1781726cbb30d6c

Contents?: true

Size: 1.25 KB

Versions: 15

Compression:

Stored size: 1.25 KB

Contents

- fields = section.nested_table_fields[assoc_name]
- if fields.count == 1
  .nested-single-field.nested-fields
    - fields.each do |field|
        .field-input
          = input_field_for_column(f, field)
        .field-remove-action
          - unless field.input_type == :hidden
            - if @reflections.select {|x| x if x.name == assoc_name}.first.macro == :has_many
              = link_to_remove_association "", f, class: 'fa fa-times'
- else
  .accordion-item.nested-fields
    h2#headingOne.accordion-header
      button.accordion-button[type="button" data-bs-toggle="collapse" data-bs-target="##{assoc_name}-#{f.object.id}" aria-expanded="true" aria-controls="collapseOne"]
        | Chapter 1
      .field-remove-action
        - if @reflections.select {|x| x if x.name == assoc_name}.first.macro == :has_many
          = link_to_remove_association "", f, class: 'fa fa-trash ghost-btn accordion-delete-btn'
    div.accordion-collapse.collapse.show[aria-labelledby="headingOne" id="#{assoc_name}-#{f.object.id}"]
      .accordion-body
        - fields.each do |field|
          .form-field
            .field-label-wrapper
              label.field-label = field.field_name.to_s.titleize 
            .field-input-wrapper
              = input_field_for_column(f, field)

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
cm-admin-1.1.8 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-1.1.7 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-1.1.6 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-1.1.5 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-1.1.4 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-1.1.3 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-1.1.2 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-1.1.1 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-1.1.0 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-1.0.9 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-1.0.8 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-1.0.7 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-1.0.6 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-1.0.5 app/views/cm_admin/main/_nested_fields.html.slim
cm-admin-1.0.3 app/views/cm_admin/main/_nested_fields.html.slim