static/frontend/search: fix search bugs

- Fixes the more results link by passing in search mode
instead of an empty string. When the pagination.URL
function is called without the m param set, it uses
the value from the previous call.

- Uses plural tab names.

Change-Id: Ic5596d0bc80c06daebba75fa5638f34bb75c5545
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/347405
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
diff --git a/static/frontend/search/search.tmpl b/static/frontend/search/search.tmpl
index bf42883..fd7f596 100644
--- a/static/frontend/search/search.tmpl
+++ b/static/frontend/search/search.tmpl
@@ -177,9 +177,10 @@
 {{define "search_pagination"}}
   {{$p := .Pagination}}
   <div class="SearchPagination" data-test-id="pagination">
-    Didn't find what you were looking for?&nbsp;
+    Didn't find what you were looking for?
+    {{$m := or $.SearchMode .SearchModePackage}}
     {{- if and (lt $p.Limit $p.MaxLimit) (eq $p.Limit (len .Results)) -}}
-      <a href="{{$p.URL $p.MaxLimit $.SearchMode ""}}" data-gtmc="search more results">Show more results.</a>
+      <a href="{{$p.URL $p.MaxLimit $m ""}}" data-gtmc="search more results">Show more results.</a>
     {{- else -}}
       See <a href="/search-help" data-gtmc="search help"> search help.</a>
     {{- end -}}
@@ -190,8 +191,8 @@
   <div>
     <nav class="go-TabNav">
       <ul>
-        <li {{if eq .SearchMode ""}}aria-current="page"{{end}}><a href="{{.Pagination.URL .Pagination.Limit .SearchModePackage .Query}}">Package</a></li>
-        <li {{if eq .SearchMode .SearchModeSymbol}}aria-current="page"{{end}}><a href="{{.Pagination.URL .Pagination.Limit .SearchModeSymbol .Query}}">Symbol</a></li>
+        <li {{if not (eq .SearchMode .SearchModeSymbol)}}aria-current="page"{{end}}><a href="{{.Pagination.URL .Pagination.Limit .SearchModePackage .Query}}">Packages</a></li>
+        <li {{if eq .SearchMode .SearchModeSymbol}}aria-current="page"{{end}}><a href="{{.Pagination.URL .Pagination.Limit .SearchModeSymbol .Query}}">Symbols</a></li>
       </ul>
       <hr />
     </nav>