From 79a4fcd08a992df41f40a9651a5a16aba5e5ef2c Mon Sep 17 00:00:00 2001 From: NamelessContributor Date: Wed, 2 Nov 2022 13:46:46 +0100 Subject: [PATCH] post counts: add search field. --- app/views/counts/posts.html.erb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/views/counts/posts.html.erb b/app/views/counts/posts.html.erb index 856e5bb95..ef00cd826 100644 --- a/app/views/counts/posts.html.erb +++ b/app/views/counts/posts.html.erb @@ -3,6 +3,13 @@
+

Post Counts

+ + <%= search_form_for(posts_counts_path) do |f| %> + <%= f.input :tags, label: "Tags", input_html: { value: params[:tags], data: { autocomplete: "tag-query" }, name: "tags" } %> + <%= f.submit "Search" %> + <% end %> + Post count for <%= link_to params[:tags].present? ? params[:tags] : "/posts", posts_path(:tags => params[:tags]) %>: <% if @count.nil? %> timed out