.admin-table-index .table-top p.table-top__total-count = "#{@associated_ar_object.pagy.count} #{@action.child_records.to_s.gsub('_', ' ')} found" .table-top__column-action / button.secondary-btn.column-btn data-target="#columnActionModal" data-toggle="modal" type="button" / 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 // To be added once bulk-select is finalized / th.check-box-space / span / input.cm-checkbox type="checkbox" - @model.available_fields[@action.name.to_sym].each do |column| th = column.header tbody.cm-table__body - @associated_ar_object.data.each do |ar_object| tr.body-row // To be added once bulk-select is finalized / td.check-box-space / span / input.cm-checkbox type="checkbox" - @model.available_fields[@action.name.to_sym].each do |column| td class="text-ellipsis" span class="#{column.cm_css_class}" = show_field_value(ar_object, column) - associated_model_actions = @associated_model && @associated_model.available_actions.select{|act| act if act.route_type == 'member'} - if associated_model_actions.present? td.row-action-cell .row-action-tool button.secondary-btn.tool-btn type="button" span i.fa.fa-bars.bolder span i.fa.fa-angle-down .popup-card.table-export-popup.hidden // To be added once the associated model has edit actions / .popup-option / a href="#{page_url('edit', ar_object)}" / | Edit - associated_model_actions.each do |custom_action| - if custom_action.display_if.call(ar_object) .popup-option - if custom_action.display_type == :button = link_to cm_admin.send("#{@associated_model.name.underscore}_index_path") + '/' + custom_action.path.gsub(':id', ar_object.id.to_s), method: custom_action.verb do span i class="#{custom_action.icon_name}" = custom_action.name.humanize - elsif custom_action.display_type == :modal = link_to custom_action.name.humanize, '', data: { bs_toggle: 'modal', bs_target: "##{custom_action.name.classify}Modal-#{ar_object.id.to_s}" } .cm-pagination .cm-pagination__lhs Showing #{@associated_ar_object.pagy.from} to #{@associated_ar_object.pagy.to} out of #{@associated_ar_object.pagy.count} .cm-pagination__rhs == render partial: 'cm_admin/main/cm_pagy_nav', locals: { pagy: @associated_ar_object.pagy } - @associated_ar_object.data.each do |ar_object| - @associated_model && @associated_model.available_actions.select{|act| act if (act.route_type == 'member' && act.display_type == :modal)}.each do |custom_action| .modal.fade id="#{custom_action.name.classify}Modal-#{ar_object.id.to_s}" aria-hidden='true' aria-labelledby="#{custom_action.name.classify}ModalLabel" tabindex='1' .modal-dialog .modal-content .modal-header h5.modal-title id="#{custom_action.name.classify}ModalLabel" = custom_action.name.classify button.btn-close aria-label='Close' data-bs-dismiss='modal' .modal-body = render partial: custom_action.partial, locals: { ar_object: ar_object }