content/static/html: gate deprecated/retracted by experiment

For golang/go#43265
For golang/go#41321

Change-Id: Ie0296d9a00c188621029252f6f91109860a1a0bc
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/297529
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
This commit is contained in:
Jonathan Amsterdam 2021-03-01 08:16:30 -05:00
Родитель 901f4fe0bf
Коммит 5c56ea46d3
1 изменённых файлов: 11 добавлений и 10 удалений

Просмотреть файл

@ -47,18 +47,19 @@
</div>
{{end}}
{{if .Unit.Deprecated}}
<div class="UnitHeader-deprecatedBanner">
Deprecated{{with .Unit.DeprecationComment}}: {{.}}{{end}}
</div>
{{end}}
{{if (.Experiments.IsActive "retractions")}}
{{if .Unit.Deprecated}}
<div class="UnitHeader-deprecatedBanner">
Deprecated{{with .Unit.DeprecationComment}}: {{.}}{{end}}
</div>
{{end}}
{{if .Unit.Retracted}}
<div class="UnitHeader-retractedBanner">
Retracted{{with .Unit.RetractionRationale}}: {{.}}{{end}}
</div>
{{if .Unit.Retracted}}
<div class="UnitHeader-retractedBanner">
Retracted{{with .Unit.RetractionRationale}}: {{.}}{{end}}
</div>
{{end}}
{{end}}
{{if .LatestMajorVersion}}
<div class="UnitHeader-majorVersionBanner" data-test-id="UnitHeader-majorVersionBanner">
<img height="19px" width="16px" class="UnitHeader-detailIcon" src="/static/img/pkg-icon-info_19x16.svg" alt="">