add clear search button
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
<form action="<%= request.path %>" method="get" class="items-center hidden md:flex">
|
||||
<% if params[:q].present? %>
|
||||
<a href="<%= request.path %>" title="Clear" class="text-xl -mr-3.5 z-10">
|
||||
×
|
||||
</a>
|
||||
<% end %>
|
||||
<input id="search" name="q" value="<%= params[:q] %>" class="input input-ghost text-lg pr-10 -mr-12">
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%= render 'title', template: @template %>
|
||||
<% if !@pagy.count.zero? || @template.submitters.to_a.size == 1 %>
|
||||
<% if !@pagy.count.zero? || @template.submitters.to_a.size == 1 || params[:q].present? %>
|
||||
<div class="flex justify-between mb-6 md:items-end flex-col md:flex-row">
|
||||
<p class="text-3xl font-bold">Submissions</p>
|
||||
<div class="flex space-x-2 mt-3 md:mt-0">
|
||||
|
||||
Reference in New Issue
Block a user