diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-08-05 23:56:56 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-08-05 23:56:56 +0200 |
| commit | af2c6fd85e13139be3e3b2329a51c3a35acb3c40 (patch) | |
| tree | 02114279d6517ffc12b9920cc1d843937bff5a10 /app/views/shared/_search_form.html.erb | |
| parent | a0a495d804319c3f7ad179baba7b87b41f1dc1f3 (diff) | |
Search assets and events, and order events by when they happen
Diffstat (limited to 'app/views/shared/_search_form.html.erb')
| -rw-r--r-- | app/views/shared/_search_form.html.erb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/views/shared/_search_form.html.erb b/app/views/shared/_search_form.html.erb new file mode 100644 index 00000000..bff6dfaa --- /dev/null +++ b/app/views/shared/_search_form.html.erb | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | <%= form_tag url_for(:controller => params[:controller], :action => params[:action]), | ||
| 2 | :method => :get, :class => "search_form" do %> | ||
| 3 | <% Array(local_assigns[:hidden]).each do |field_name, value| %> | ||
| 4 | <%= hidden_field_tag field_name, value %> | ||
| 5 | <% end %> | ||
| 6 | <%= text_field_tag :q, params[:q], :placeholder => placeholder %> | ||
| 7 | <%= button_tag :type => "submit", :class => "action_button" do %> | ||
| 8 | <%= icon("search", library: "tabler", "aria-hidden": true) %> | ||
| 9 | <%= t("admin.common.search") %> | ||
| 10 | <% end %> | ||
| 11 | <% if params[:q].present? || Array(local_assigns[:hidden]).any? %> | ||
| 12 | <%= link_to t("admin.common.reset"), | ||
| 13 | url_for(:controller => params[:controller], :action => params[:action]) %> | ||
| 14 | <% end %> | ||
| 15 | <% end %> | ||
