Sha256: 4274157fedc43fa2dc39f7102f669226be97a9dc888823e29a330689f7c4bb8a

Contents?: true

Size: 1.35 KB

Versions: 36

Compression:

Stored size: 1.35 KB

Contents

- associated_records = ar_object.send(nested_field.field_name)
- if nested_field.display_type == :table
  div class="#{nested_field.label ? 'card-info' : ''}"
    - if nested_field.label
      p.card-info__label = nested_field.label.to_s.titleize
    .card-info__description.nested-table-wrapper data-table-name="#{nested_field.field_name}"
      table.nested-table
        thead
          tr
            - nested_field.fields.each do |field|
              th scope="col" data-field-type="#{field.field_type}"
                = field.label || field.field_name.to_s.titleize
        tbody
          - associated_records.each do |record|
            tr
              - nested_field.fields.each do |field|
                td data-field-type="#{field.field_type}"
                  = show_field_value(record, field)  
- else
  - associated_records.each do |record|
    .card.mb-3  data-table-name="#{nested_field.field_name}"
      .card-body
        .card-info
          .card-info__title = nested_section_title(record, nested_field)
        - nested_field.fields.each do |field|
          = show_field(record, field)  

        - if nested_field.associated_fields.present?
          - nested_field.associated_fields.each do |associated_nested_field|
            = render partial: 'cm_admin/main/nested_table_section', locals: { nested_field: associated_nested_field, ar_object: record }

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
cm-admin-1.5.33 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.32 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.31 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.30 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.29 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.28 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.10 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.27 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.26 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.25 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.23 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.22 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.21 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.20 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.11 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.9 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.8 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.7 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.6 app/views/cm_admin/main/_nested_table_section.html.slim
cm-admin-1.5.1 app/views/cm_admin/main/_nested_table_section.html.slim