Browse Source

提交代码

tags/v1.22.1.3^2
ychao_1983 3 years ago
parent
commit
6b982ba6b1
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      routers/repo/view.go

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

@@ -35,6 +35,7 @@ import (
const (
tplRepoEMPTY base.TplName = "repo/empty"
tplRepoHome base.TplName = "repo/home"
tplCourseHome base.TplName = "repo/courseHome"
tplWatchers base.TplName = "repo/watchers"
tplForks base.TplName = "repo/forks"
tplMigrating base.TplName = "repo/migrating"
@@ -855,7 +856,12 @@ func renderCode(ctx *context.Context) {
ctx.Data["TreeLink"] = treeLink
ctx.Data["TreeNames"] = treeNames
ctx.Data["BranchLink"] = branchLink
ctx.HTML(200, tplRepoHome)
if ctx.Repo.Repository.RepoType == models.RepoCourse {
ctx.HTML(200, tplCourseHome)
} else {
ctx.HTML(200, tplRepoHome)
}

}

// RenderUserCards render a page show users according the input templaet


Loading…
Cancel
Save