diff options
-rw-r--r-- | routers/web/repo/release.go | 1 | ||||
-rw-r--r-- | templates/repo/release_tag_header.tmpl | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/routers/web/repo/release.go b/routers/web/repo/release.go index c9f12a0f18..1a0303f1f2 100644 --- a/routers/web/repo/release.go +++ b/routers/web/repo/release.go @@ -196,7 +196,6 @@ func releasesOrTags(ctx *context.Context, isTagList bool) { } ctx.Data["Releases"] = releases - ctx.Data["ReleasesNum"] = len(releases) pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5) pager.SetDefaultParams(ctx) diff --git a/templates/repo/release_tag_header.tmpl b/templates/repo/release_tag_header.tmpl index 9938b9683e..1bb645acc4 100644 --- a/templates/repo/release_tag_header.tmpl +++ b/templates/repo/release_tag_header.tmpl @@ -5,7 +5,7 @@ <div class="gt-df"> <div class="gt-f1 gt-df gt-ac"> <h2 class="ui compact small menu header small-menu-items"> - <a class="{{if .PageIsReleaseList}}active {{end}}item" href="{{.RepoLink}}/releases">{{.locale.PrettyNumber .ReleasesNum}} {{.locale.TrN .ReleasesNum "repo.release" "repo.releases"}}</a> + <a class="{{if .PageIsReleaseList}}active {{end}}item" href="{{.RepoLink}}/releases">{{.locale.PrettyNumber .NumReleases}} {{.locale.TrN .NumReleases "repo.release" "repo.releases"}}</a> {{if $canReadCode}} <a class="{{if .PageIsTagList}}active {{end}}item" href="{{.RepoLink}}/tags">{{.locale.PrettyNumber .NumTags}} {{.locale.TrN .NumTags "repo.tag" "repo.tags"}}</a> {{end}} |