Browse Source

Merge pull request '#764 打开贡献者列表页面时应选中代码tab' (#792) from fix-224 into V20211115

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/792
Reviewed-by: A00老虎 <openihu@noreply.localhost>
pull/797/head
A00老虎 3 years ago
parent
commit
1f24c47291
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      routers/repo/view.go
  2. +1
    -1
      templates/repo/header.tmpl

+ 1
- 0
routers/repo/view.go View File

@@ -919,6 +919,7 @@ func Forks(ctx *context.Context) {
}

func Contributors(ctx *context.Context) {
ctx.Data["PageIsViewCode"] = true
ctx.HTML(http.StatusOK, tplContributors)
}



+ 1
- 1
templates/repo/header.tmpl View File

@@ -93,7 +93,7 @@
<div class="ui tabular stackable menu navbar">
{{if .Permission.CanRead $.UnitTypeCode}}
<div class="dropdown-menu">
<a class="{{if or .PageIsViewCode .PageIsReleaseList .PageIsWiki .PageIsActivity}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL | EscapePound}}{{end}}">
<a class="{{if or .PageIsViewCode .PageIsReleaseList .PageIsWiki .PageIsActivity .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL | EscapePound}}{{end}}">
<span>{{svg "octicon-code" 16}} {{.i18n.Tr "repo.code"}} <i class="dropdown icon"></i></span>
</a>
<div class="dropdown-content">


Loading…
Cancel
Save