2026-07-22 20:32:50 +03:00
|
|
|
<form action="<%= url_for %>" method="get" class="items-center flex max-md:focus-within:flex-1 <%= 'max-md:flex-1' if params[:q].present? %>">
|
2024-11-23 01:45:10 +02:00
|
|
|
<% Submissions::Filter::ALLOWED_PARAMS.each do |key| %>
|
|
|
|
|
<% if params[key].present? %>
|
|
|
|
|
<input name="<%= key %>" value="<%= params[key] %>" class="hidden">
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
2026-06-24 19:08:15 +03:00
|
|
|
<% if params[:archived].present? %>
|
|
|
|
|
<input name="archived" value="<%= params[:archived] %>" class="hidden">
|
|
|
|
|
<% end %>
|
2023-10-16 00:41:14 +03:00
|
|
|
<% if params[:q].present? %>
|
|
|
|
|
<div class="relative">
|
2026-02-14 17:42:08 +02:00
|
|
|
<a href="<%= url_for(params: request.query_parameters.except('q')) %>" title="<%= t('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 %>
|
2026-07-23 11:13:10 +03:00
|
|
|
<search-input class="group flex items-center max-md:focus-within:flex-1 <%= 'max-md:flex-1' if params[:q].present? %>">
|
2026-07-22 20:32:50 +03:00
|
|
|
<input id="search" name="q" value="<%= params[:q] %>" enterkeyhint="search" class="input text-lg pr-10 -mr-12 w-0 md:w-60 max-md:group-focus-within:w-full <%= 'pl-8 input-outlined max-md:w-full' if params[:q].present? %>" placeholder="<%= local_assigns[:placeholder] %>">
|
2025-09-24 12:07:54 +03:00
|
|
|
<button type="submit" title="<%= t('search') %>" class="btn btn-ghost btn-circle">
|
|
|
|
|
<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>
|
2024-08-14 16:34:30 +03:00
|
|
|
</search-input>
|
2023-09-15 02:11:48 +03:00
|
|
|
</form>
|