content: fix non-redist message
The message indicating that a package is not redistributable is fixed so
that it is only displayed if the unit is non-redistributable and a
package.
Change-Id: Icdc927b1f49f1f4565d1e9ac2fdad239a5158599
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/262772
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/pages/unit_details.tmpl b/content/static/html/pages/unit_details.tmpl
index 43af338..d9b260e 100644
--- a/content/static/html/pages/unit_details.tmpl
+++ b/content/static/html/pages/unit_details.tmpl
@@ -21,14 +21,16 @@
{{block "unit_readme" .Details}}{{end}}
{{end}}
- {{if and .Details.IsPackage .Unit.IsRedistributable}}
- {{block "unit_doc" .Details}}{{end}}
- {{else}}
- <div class="UnitDetails-contentEmpty">
- <img src="/static/img/gopher-airplane.svg" alt="The Go Gopher"/>
- <p>Documentation not displayed due to license restrictions.</p>
- <p>See our <a href="/license-policy">license policy</a>.</p>
- </div>
+ {{if .Details.IsPackage}}
+ {{if .Unit.IsRedistributable}}
+ {{block "unit_doc" .Details}}{{end}}
+ {{else}}
+ <div class="UnitDetails-contentEmpty">
+ <img src="/static/img/gopher-airplane.svg" alt="The Go Gopher"/>
+ <p>Documentation not displayed due to license restrictions.</p>
+ <p>See our <a href="/license-policy">license policy</a>.</p>
+ </div>
+ {{end}}
{{end}}
{{if .Details.SourceFiles}}