From 7c68ac8f7dfa829eaa759ebdf636f770646d193d Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Thu, 5 Nov 2020 08:20:42 -0600 Subject: [PATCH] Tags cleanup (#13428) * Tags cleanup Signed-off-by: jolheiser * fmt Signed-off-by: jolheiser --- modules/context/repo.go | 10 +++++++--- options/locale/locale_en-US.ini | 1 + templates/repo/sub_menu.tmpl | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/context/repo.go b/modules/context/repo.go index 9723c856196..f34b05d1d0a 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -449,14 +449,18 @@ func RepoAssignment() macaron.Handler { ctx.Data["RepoExternalIssuesLink"] = unit.ExternalTrackerConfig().ExternalTrackerURL } - ctx.Data["NumReleases"], err = models.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, models.FindReleasesOptions{ - IncludeDrafts: false, - IncludeTags: true, + ctx.Data["NumTags"], err = models.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, models.FindReleasesOptions{ + IncludeTags: true, }) if err != nil { ctx.ServerError("GetReleaseCountByRepoID", err) return } + ctx.Data["NumReleases"], err = models.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, models.FindReleasesOptions{}) + if err != nil { + ctx.ServerError("GetReleaseCountByRepoID", err) + return + } ctx.Data["Title"] = owner.Name + "/" + repo.Name ctx.Data["Repository"] = repo diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index a25f77b0307..815d69c518a 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -810,6 +810,7 @@ commits = Commits commit = Commit release = Release releases = Releases +tag = Tag released_this = released this file_raw = Raw file_history = History diff --git a/templates/repo/sub_menu.tmpl b/templates/repo/sub_menu.tmpl index 2c3fb25a9c2..239707f23f6 100644 --- a/templates/repo/sub_menu.tmpl +++ b/templates/repo/sub_menu.tmpl @@ -10,7 +10,7 @@ {{if $.Permission.CanRead $.UnitTypeCode}} {{end}}