diff --git a/app/views/wiki_pages/_search.html.erb b/app/views/wiki_pages/_search.html.erb new file mode 100644 index 000000000..cf9bd1834 --- /dev/null +++ b/app/views/wiki_pages/_search.html.erb @@ -0,0 +1,9 @@ +<%= search_form_for(wiki_pages_path) do |f| %> + <%= f.input :title_normalize, label: "Title", hint: "Use * for wildcard", input_html: { value: params[:search][:title_normalize], "data-autocomplete": "wiki-page" } %> + <%= f.input :other_names_match, label: "Other names", hint: "Use * for wildcard", input_html: { value: params[:search][:other_names_match] } %> + <%= f.input :body_matches, label: "Body", hint: "Use * for wildcard", input_html: { value: params[:search][:body_matches] } %> + <%= f.input :linked_to, hint: "Find wikis linking to this wiki", input_html: { value: params[:search][:linked_to], "data-autocomplete": "wiki-page" } %> + <%= f.input :is_deleted, label: "Deleted?", as: :select, include_blank: true, selected: params[:search][:is_deleted] %> + <%= f.input :order, collection: [%w[Newest created_at], %w[Title title], %w[Posts post_count]], include_blank: true, selected: params[:search][:order] %> + <%= f.submit "Search" %> +<% end %> diff --git a/app/views/wiki_pages/index.html.erb b/app/views/wiki_pages/index.html.erb index 7a03e3d34..c9dc8c4a7 100644 --- a/app/views/wiki_pages/index.html.erb +++ b/app/views/wiki_pages/index.html.erb @@ -3,6 +3,8 @@ <% content_for(:content) do %>