content/static/html: use a single link for licenses
The header is updated so that a single link to the license tab is shown,
instead of a separate anchor link to each license.
Change-Id: Ib6b2d948f96227805e73816c0cc1108eea1ca8a5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/259213
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
diff --git a/content/static/html/helpers/_unit_header.tmpl b/content/static/html/helpers/_unit_header.tmpl
index 7d429a6..19ed4a7 100644
--- a/content/static/html/helpers/_unit_header.tmpl
+++ b/content/static/html/helpers/_unit_header.tmpl
@@ -73,9 +73,12 @@
</span>
<span class="UnitHeader-detailItem">
<img height="16px" width="16px" src="/static/img/pkg-icon-scale_16x16.svg">
- {{range $i, $e := .Licenses}}
- {{if $i}}, {{end}}
- <a href="{{$.CanonicalURLPath}}?tab=licenses#{{.Anchor}}">{{$e.Type}}</a>
+ {{if .Licenses}}
+ <a href="{{$.CanonicalURLPath}}?tab=licenses">
+ {{range $i, $e := .Licenses}}
+ {{if $i}}, {{end}} {{$e.Type}}
+ {{end}}
+ </a>
{{else}}
<span>None detected</span>
<a href="/license-policy" class="Disclaimer-link"><em>not legal advice</em></a>