diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb index ec4246acb..db320a92a 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -1,9 +1,6 @@ class NotesController < ApplicationController respond_to :html, :xml, :json, :js - def search - end - def index @notes = authorize Note.paginated_search(params) @notes = @notes.includes(:post) if request.format.html? diff --git a/app/views/notes/_secondary_links.html.erb b/app/views/notes/_secondary_links.html.erb index c3497b7ff..c6b1c2b4c 100644 --- a/app/views/notes/_secondary_links.html.erb +++ b/app/views/notes/_secondary_links.html.erb @@ -2,7 +2,6 @@ <%= quick_search_form_for(:body_matches, notes_path, "notes") %> <%= subnav_link_to "Listing", notes_path %> <%= subnav_link_to "Posts", posts_path(:tags => "order:note") %> - <%= subnav_link_to "Search", search_notes_path %> <%= subnav_link_to "History", note_versions_path %> <%= subnav_link_to "Requests", posts_path(:tags => "translation_request") %> <%= subnav_link_to "Help", wiki_page_path("help:notes") %> diff --git a/app/views/notes/index.html.erb b/app/views/notes/index.html.erb index c52af8bdb..76b6b9099 100644 --- a/app/views/notes/index.html.erb +++ b/app/views/notes/index.html.erb @@ -4,6 +4,14 @@

Notes

+ <%= search_form_for(notes_path) do |f| %> + <%= f.hidden_field :group_by, value: "note" %> + + <%= f.input :body_matches, label: "Note", hint: "Use * for wildcard", input_html: { value: params[:search][:body_matches] } %> + <%= f.input :post_tags_match, label: "Tags", input_html: { value: params[:search][:post_tags_match], "data-autocomplete": "tag-query" } %> + <%= f.submit "Search" %> + <% end %> + <%= table_for @notes, class: "striped autofit" do |t| %> <% t.column "Post" do |note| %> <%= link_to note.post_id, note.post %> @@ -12,7 +20,7 @@ <%= link_to "#{note.id}.#{note.version}", post_path(note.post_id, anchor: "note-#{note.id}") %> <%= link_to "ยป", note_versions_path(search: { note_id: note.id }) %> <% end %> - <% t.column "Body", td: { class: "col-expand" } do |note| %> + <% t.column "Text", td: { class: "col-expand" } do |note| %> <%= note.body %> <% unless note.is_active? %> (deleted) diff --git a/app/views/notes/search.html.erb b/app/views/notes/search.html.erb deleted file mode 100644 index 4aabd7e71..000000000 --- a/app/views/notes/search.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -
- -
- -<%= render "secondary_links" %> diff --git a/app/views/static/site_map.html.erb b/app/views/static/site_map.html.erb index 4e82675d2..893ca7b3b 100644 --- a/app/views/static/site_map.html.erb +++ b/app/views/static/site_map.html.erb @@ -57,7 +57,6 @@
  • Notes

  • <%= link_to_wiki "Help", "help:notes" %>
  • <%= link_to("Listing", notes_path) %>
  • -
  • <%= link_to("Search", search_notes_path) %>
  • <%= link_to("Changes", note_versions_path) %>