- content_for(:title, @clase_modelo.nombre_plural) - content_for :actions do - @actions&.each do |link_args| = link_to(*link_args) = link_to request.url, class: 'btn btn-sm btn-outline-primary', data: { controller: :tooltip, 'bs-title': 'Actualizar' } do i.bi.bi-arrow-clockwise .ms-1 - if @filtros.present? = render SearchBarTogglerComponent.new .ms-1 = @clase_modelo.new.decorate.new_link - if @filtros.present? = render SearchBarComponent.new(@q, @filtros) div - if @collection.any? .table-responsive table.table.table-sm.listado.xpg-revert-width.xborder-end caption.ps-3 = page_entries_info @collection thead.table-light tr - atributos_para_listar.each do |att| th.text-nowrap style="font-size: 0.8em" = encabezado att, ordenable: true th.text-end - unless @export_link == false .actions-wrapper = @clase_modelo.new.decorate.export_link(request.url) tbody - @collection.each do |object| - object = object.decorate tr id="#{dom_id(object)}" - atributos_para_listar.each do |att, _sort_field| = column_for object, att td.text-nowrap.text-end.ps-5 .actions-wrapper = object.extra_actions(size: :sm) if object.respond_to? :extra_actions = object.show_link = object.edit_link(text: '', klass: 'btn-light') = object.destroy_link .d-flex.justify-content-center = paginate(@collection) .d-flex.align-items-center.justify-content-center.opacity-50 label.me-2 Filas por página: ul.list-group.list-group-horizontal - available_page_sizes.each do |page_size| = link_to page_size, url_for(page_size:), class: "list-group-item py-0 px-1 #{'active' if current_page_size == page_size}" - elsif @records_filtered - i18n_key = "#{controller_key}.#{action_name}.index.empty_but_filtered" p.m-3 = t(i18n_key, default: :'.empty_but_filtered', model: @clase_modelo.nombre_plural.downcase) | : span.ms-2 = link_to 'Limpiar búsqueda', url_for + '?cancel_filter=true' - else - i18n_key = "#{controller_key}.#{action_name}.index.empty" p.m-3 = t(i18n_key, default: :'.empty', model: @clase_modelo.nombre_plural.downcase)