I'll want to do it smarter than this, but for now, just getting rid of the page links altogether seems best
28 lines
1.3 KiB
Text
28 lines
1.3 KiB
Text
.search-results
|
||
.search-results-header
|
||
= button_to wardrobe_v2_path, method: :get, class: "back-button" do
|
||
← Back to outfit
|
||
= outfit_state_params except: [:q]
|
||
|
||
- if @search_results.any?
|
||
= will_paginate @search_results, page_links: false, param_name: "q[page]", params: { q: params[:q], species: @outfit.species_id, color: @outfit.color_id, objects: params[:objects] }
|
||
|
||
%ul.search-results-list
|
||
- @search_results.each do |item|
|
||
%li.item-card
|
||
.item-thumbnail
|
||
= image_tag item.thumbnail_url, alt: item.name, loading: "lazy"
|
||
.item-info
|
||
.item-name= item.name
|
||
.item-badges
|
||
= render "items/badges/kind", item: item
|
||
= render "items/badges/first_seen", item: item
|
||
= button_to wardrobe_v2_path, method: :get, class: "item-add-button", title: "Add #{item.name}", "aria-label": "Add #{item.name}" do
|
||
➕
|
||
= outfit_state_params @outfit.with_item(item)
|
||
|
||
= will_paginate @search_results, param_name: "q[page]", params: { q: params[:q], species: @outfit.species_id, color: @outfit.color_id, objects: params[:objects] }
|
||
|
||
- else
|
||
.empty-state
|
||
%p No matching items found. Try a different search term, or browse items on the main site.
|