2023-10-19 20:19:52 +03:00
|
|
|
<form action="<%= url_for %>" method="get" class="items-center hidden md:flex">
|
|
|
|
|
<% if params[:status].present? %>
|
|
|
|
|
<input name="status" value="<%= params[:status] %>" class="hidden">
|
|
|
|
|
<% end %>
|
2023-10-16 00:41:14 +03:00
|
|
|
<% if params[:q].present? %>
|
|
|
|
|
<div class="relative">
|
2023-10-19 20:19:52 +03:00
|
|
|
<a href="<%= url_for(params.to_unsafe_h.except(:q)) %>" title="Clear" class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-auto text-neutral text-2xl font-extralight">
|
2023-09-24 17:49:24 +03:00
|
|
|
×
|
|
|
|
|
</a>
|
2023-10-16 00:41:14 +03:00
|
|
|
</div>
|
|
|
|
|
<% end %>
|
2024-04-03 00:59:25 +03:00
|
|
|
<input id="search" name="q" value="<%= params[:q] %>" class="input input-ghost text-lg pr-10 -mr-12 <%= 'pl-8 input-outlined' if params[:q].present? %>" placeholder="<%= local_assigns[:placeholder] %>">
|
2023-09-15 02:11:48 +03:00
|
|
|
<button type="submit" title="Search" class="btn btn-ghost btn-circle" onclick="window.search.value || document.activeElement === window.search ? null : [event.preventDefault(), window.search.focus()]">
|
|
|
|
|
<span class="enabled">
|
|
|
|
|
<%= svg_icon('search', class: 'w-6 h-6 stroke-2') %>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="disabled">
|
|
|
|
|
<%= svg_icon('loader', class: 'w-5 h-5 animate-spin') %>
|
|
|
|
|
</span>
|
|
|
|
|
</button>
|
|
|
|
|
</form>
|