mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
* Refactor repo.isBare to repo.isEmpty #5629 Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove Sync call
This commit is contained in:
parent
9edc829c17
commit
07802a2bc5
39 changed files with 125 additions and 81 deletions
|
@ -30,10 +30,10 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
tplRepoBARE base.TplName = "repo/bare"
|
||||
tplRepoHome base.TplName = "repo/home"
|
||||
tplWatchers base.TplName = "repo/watchers"
|
||||
tplForks base.TplName = "repo/forks"
|
||||
tplRepoEMPTY base.TplName = "repo/empty"
|
||||
tplRepoHome base.TplName = "repo/home"
|
||||
tplWatchers base.TplName = "repo/watchers"
|
||||
tplForks base.TplName = "repo/forks"
|
||||
)
|
||||
|
||||
func renderDirectory(ctx *context.Context, treeLink string) {
|
||||
|
@ -321,8 +321,8 @@ func Home(ctx *context.Context) {
|
|||
func renderCode(ctx *context.Context) {
|
||||
ctx.Data["PageIsViewCode"] = true
|
||||
|
||||
if ctx.Repo.Repository.IsBare {
|
||||
ctx.HTML(200, tplRepoBARE)
|
||||
if ctx.Repo.Repository.IsEmpty {
|
||||
ctx.HTML(200, tplRepoEMPTY)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue