/ # locals: (collection:, query:, timeout_id:, field_name: nil, clase_modelo: nil) .resultados.inline tabindex="-1" div data-controller="clear-timeout" data-timeout-id="#{timeout_id}" ul.list-group.list-group-flush - count = collection.count - if count.positive? .text-center.fst-italic.text-secondary.pt-1 style="font-size:0.7em" | #{count} resultados para "#{query}" - collection.each do |object| = link_to object.to_s, 'javascript:void(0)', class: 'list-group-item', data: { action: 'asociable#selectItem', id: object.id, object: object.decorate.to_json, field_name: } - else li [class="list-group-item text-center text-warning-emphasis py-2" style="font-size: 0.85em"] | No hay resultados para "#{query}" - if clase_modelo.present? && policy(clase_modelo).new_from_associable? / TODO: unificar código repetido en asociable_controller.js a [key="new" href="javascript:void(0)" class="list-group-item mt-3 text-center" data-action="asociable#crearItem"] i class="bi bi-stars" |   = clase_modelo.new.decorate.text_for_new