diff options
Diffstat (limited to 'app/views/nodes/_node_list.html.erb')
| -rw-r--r-- | app/views/nodes/_node_list.html.erb | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/app/views/nodes/_node_list.html.erb b/app/views/nodes/_node_list.html.erb index f3101058..55f396b7 100644 --- a/app/views/nodes/_node_list.html.erb +++ b/app/views/nodes/_node_list.html.erb | |||
| @@ -1,16 +1,7 @@ | |||
| 1 | <%= form_tag url_for(controller: params[:controller], action: params[:action]), method: :get, class: "node_search_form" do %> | 1 | <%= render "shared/search_form", |
| 2 | <% Array(params[:kinds]).each do |kind| %> | 2 | :placeholder => t(".search_placeholder"), |
| 3 | <%= hidden_field_tag "kinds[]", kind %> | 3 | :hidden => Array(params[:kinds]).map { |k| ["kinds[]", k] } + |
| 4 | <% end %> | 4 | (params[:tags].present? ? [["tags", params[:tags]]] : []) %> |
| 5 | <%= hidden_field_tag :tags, params[:tags] if params[:tags].present? %> | ||
| 6 | <%= text_field_tag :q, params[:q], placeholder: t(".search_placeholder") %> | ||
| 7 | <%= button_tag type: "submit", class: "action_button" do %> | ||
| 8 | <%= icon("search", library: "tabler", "aria-hidden": true) %> <%= t("admin.common.search") %> | ||
| 9 | <% end %> | ||
| 10 | <% if params[:q].present? || params[:kinds].present? || params[:tags].present? %> | ||
| 11 | <%= link_to t("admin.common.reset"), url_for(controller: params[:controller], action: params[:action]) %> | ||
| 12 | <% end %> | ||
| 13 | <% end %> | ||
| 14 | 5 | ||
| 15 | <%= will_paginate @nodes %> | 6 | <%= will_paginate @nodes %> |
| 16 | <table class="node_table"> | 7 | <table class="node_table"> |
