diff --git a/routers/web/repo/blame.go b/routers/web/repo/blame.go index 1c67a40020..1d872ba7c6 100644 --- a/routers/web/repo/blame.go +++ b/routers/web/repo/blame.go @@ -95,9 +95,9 @@ func RefBlame(ctx *context.Context) { var tplName templates.TplName if ctx.FormBool("only_content") { - tplName = tplRepoHomeContent + tplName = tplRepoViewContent } else { - tplName = tplRepoHome + tplName = tplRepoView } if fileSize >= setting.UI.MaxDisplayFileSize { diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go index 4d172c9c20..6ed5801d10 100644 --- a/routers/web/repo/view.go +++ b/routers/web/repo/view.go @@ -49,7 +49,8 @@ import ( const ( tplRepoEMPTY templates.TplName = "repo/empty" tplRepoHome templates.TplName = "repo/home" - tplRepoHomeContent templates.TplName = "repo/home_content" + tplRepoView templates.TplName = "repo/view" + tplRepoViewContent templates.TplName = "repo/view_content" tplRepoViewList templates.TplName = "repo/view_list" tplWatchers templates.TplName = "repo/watchers" tplForks templates.TplName = "repo/forks" diff --git a/routers/web/repo/view_home.go b/routers/web/repo/view_home.go index e8dba14a64..ba52a87138 100644 --- a/routers/web/repo/view_home.go +++ b/routers/web/repo/view_home.go @@ -430,7 +430,9 @@ func Home(ctx *context.Context) { } if ctx.FormBool("only_content") { - ctx.HTML(http.StatusOK, tplRepoHomeContent) + ctx.HTML(http.StatusOK, tplRepoViewContent) + } else if len(treeNames) != 0 { + ctx.HTML(http.StatusOK, tplRepoView) } else { ctx.HTML(http.StatusOK, tplRepoHome) } diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 290e80064c..f86b90502d 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -17,13 +17,9 @@ {{template "repo/code/recently_pushed_new_branches" .}} -