Sha256: 09fcb823b1830c9b20ed30e61c25a86fe6f819ac6c66ac1599c04bb39d21aa82

Contents?: true

Size: 1.77 KB

Versions: 2

Compression:

Stored size: 1.77 KB

Contents

.admin-table-index
  .table-top
    p.table-top__total-count = "#{@ar_object.pagy.count} #{@model.ar_model.table_name} found"
    // .table-top__column-action
    //  button.secondary-btn.column-btn data-bs-target="#columnActionModal" data-bs-toggle="modal"
    //    span
    //      i.fa.fa-columns.bolder
    //    span
    //      i.fa.fa-angle-down
.new-admin-table.scrollable
  table.cm-table
    thead.cm-table__header
      tr.header-row
        // Select all checkbox feature to be added later
        / th.check-box-space
        /   span
        /     input.cm-checkbox type="checkbox"
        - @model.available_fields[:index].each do |column|
          th = column.header
    tbody.cm-table__body
      - @ar_object.data.each do |ar_object|
        tr.body-row
          / td.check-box-space
          /   span
          /     input.cm-checkbox type="checkbox"
          - @model.available_fields[:index].each_with_index do |column, index|
            td.text-ellipsis
              span class="#{column.field_type.to_s} #{column.cm_css_class} "
                - if index == 0
                  = link_to ar_object.send(column.field_name), "/cm_admin/#{ar_object.model_name.collection}/#{ar_object.id}"
                - else
                  = show_field_value(ar_object, column)
                  - if column.field_type == :drawer
                    = render partial: column.drawer_partial, locals: { ar_object: ar_object }
          - if @model
            == render partial: 'cm_admin/main/actions_dropdown', locals: { cm_model: @model, ar_object: ar_object }

.cm-pagination
  .cm-pagination__lhs Showing #{@ar_object.pagy.from} to #{@ar_object.pagy.to} out of #{@ar_object.pagy.count}
  .cm-pagination__rhs
    == render partial: 'cm_admin/main/cm_pagy_nav', locals: { pagy: @ar_object.pagy }

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cm-admin-0.7.7 app/views/cm_admin/main/_table.html.slim
cm-admin-0.7.6 app/views/cm_admin/main/_table.html.slim