wiki pages: fix redirects to exact matches during search.

Change wiki page search to redirect to exact matches only when using the
quick search bar. Fixes searches sometimes unexpectedly redirecting when
doing a regular (non-quick) search that happens to return a single result.

Also remove the logic that tries to expand the search when no results
are found. This will eventually be replaced with a smarter "did you mean?"
search.
This commit is contained in:
evazion
2019-10-31 02:08:51 -05:00
parent 91fd5e1bff
commit a8fc2ba508
4 changed files with 12 additions and 14 deletions

View File

@@ -14,7 +14,7 @@
<%= nav_link_to("Implications", tag_implications_path) %>
<% end %>
<%= nav_link_to("Pools", gallery_pools_path) %>
<%= nav_link_to("Wiki", wiki_pages_path(:title => "help:home")) %>
<%= nav_link_to("Wiki", wiki_page_path("help:home")) %>
<%= nav_link_to("Forum", forum_topics_path, :class => (CurrentUser.has_forum_been_updated? ? "forum-updated" : nil)) %>
<% if CurrentUser.is_moderator? %>
<%= nav_link_to("Dashboard", moderator_dashboard_path) %>