Replace will_paginate's view helpers with a custom prev/next + page dropdown control. Layout: [← Prev] [Page <select> of N] [Next →] - Prev/Next are regular links (work without JS) - Dropdown wrapped in <auto-submit-form> for JS-enhanced navigation - "Go" submit button appears when JS is disabled - Single pagination bar at top of results (removed bottom duplicate) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
19 lines
770 B
Text
19 lines
770 B
Text
.search-results
|
|
- if @search_error
|
|
.error-state
|
|
%p.error-message= @search_error
|
|
- elsif @search_results.any?
|
|
- pagination_params = @outfit.wardrobe_params
|
|
- pagination_params = pagination_params.merge(q: params[:q]) if params[:q].present?
|
|
= render "items/pagination", collection: @search_results, url_params: pagination_params
|
|
|
|
%ul.search-results-list
|
|
- @search_results.each do |item|
|
|
- appearance = @appearances_by_item_id&.dig(item.id)
|
|
= render "items/item_card", item: item, appearance: appearance
|
|
|
|
= render "items/pagination", collection: @search_results, url_params: pagination_params
|
|
|
|
- else
|
|
.empty-state
|
|
%p No matching items found. Try a different search term, or browse items on the main site.
|