- content_for(:title, @clase_modelo.nombre_plural) - content_for :actions do - @actions&.each do |link_args| = link_to(*link_args) - if @filtros.present? - if show_filters? = link_to namespaced_path(@clase_modelo, ocultar_filtros: 1), class: 'btn btn-sm btn-outline-primary col-auto' do | Ocultar filtros - else = link_to namespaced_path(@clase_modelo, mostrar_filtros: 1), class: 'btn btn-sm btn-outline-primary col-auto' do | Filtrar .ms-1 = @clase_modelo.new.decorate.new_link - if @filtros.present? && show_filters? .border-bottom#filtros .d-flex.align-items-center.p-2 .px-2.d-none.d-sm-inline-block span.bi.bi-funnel-fill = search_form_for @q, url: namespaced_path(@clase_modelo) do |f| .row.g-1 = @filtros.filtros_html(form: f) .col-auto.gap-1.d-flex.align-items-start = button_tag class: 'btn btn-sm btn-primary col-auto' do span.bi.bi-search span.d-none.d-sm-inline |   span.text Buscar = link_to namespaced_path(@clase_modelo, mostrar_filtros: 1), class: 'btn btn-sm btn-secondary col-auto' do | Limpiar 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 = encabezado att, ordenable: true th.text-end - unless @export_link == false = @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| td.text-nowrap = object.send(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 .ps-3.justify-content-center = paginate(@collection) - 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 namespaced_path(@clase_modelo, mostrar_filtros: 1) do | Limpiar búsqueda - else - i18n_key = "#{controller_key}.#{action_name}.index.empty" p.m-3 = t(i18n_key, default: :'.empty', model: @clase_modelo.nombre_plural.downcase)