1
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-04-18 00:47:48 -04:00

current page

This commit is contained in:
Lunny Xiao 2022-10-24 20:23:20 +08:00 committed by Jason Song
parent e28c95ea5c
commit e5b835cf52
3 changed files with 3 additions and 2 deletions

View File

@ -39,7 +39,7 @@ func MustEnableBuilds(ctx *context.Context) {
func List(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("repo.builds")
ctx.Data["PageIsBuildList"] = true
ctx.Data["PageIsBuilds"] = true
defaultBranch, err := ctx.Repo.GitRepo.GetDefaultBranch()
if err != nil {

View File

@ -13,6 +13,7 @@ import (
)
func View(ctx *context.Context) {
ctx.Data["PageIsBuilds"] = true
runIndex := ctx.ParamsInt64("run")
jobIndex := ctx.ParamsInt64("job")
ctx.Data["RunIndex"] = runIndex

View File

@ -184,7 +184,7 @@
{{end}}
{{ if and (not .UnitBuildsGlobalDisabled) (.Permission.CanRead $.UnitTypeBuilds)}}
<a class="{{if .PageIsBuildList}}active{{end}} item" href="{{.RepoLink}}/builds">
<a class="{{if .PageIsBuilds}}active{{end}} item" href="{{.RepoLink}}/builds">
{{svg "octicon-play"}} {{.locale.Tr "repo.builds"}}
{{if .Repository.NumOpenRuns}}
<span class="ui blue small label">{{CountFmt .Repository.NumOpenRuns}}</span>