mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-17 11:59:30 +00:00
Work on admin
This commit is contained in:
parent
5cb2d3d2e2
commit
9f9cd6bfc6
19 changed files with 177 additions and 41 deletions
|
@ -18,7 +18,7 @@ func Create(ctx *middleware.Context, form auth.CreateRepoForm) {
|
|||
ctx.Data["Licenses"] = models.Licenses
|
||||
|
||||
if ctx.Req.Method == "GET" {
|
||||
ctx.HTML(200, "repo/create", ctx.Data)
|
||||
ctx.HTML(200, "repo/create")
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ func SettingPost(ctx *middleware.Context) {
|
|||
case "delete":
|
||||
if len(ctx.Repo.Repository.Name) == 0 || ctx.Repo.Repository.Name != ctx.Query("repository") {
|
||||
ctx.Data["ErrorMsg"] = "Please make sure you entered repository name is correct."
|
||||
ctx.HTML(200, "repo/setting", ctx.Data)
|
||||
ctx.HTML(200, "repo/setting")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ func Branches(ctx *middleware.Context, params martini.Params) {
|
|||
ctx.Data["Branches"] = brs
|
||||
ctx.Data["IsRepoToolbarBranches"] = true
|
||||
|
||||
ctx.HTML(200, "repo/branches", ctx.Data)
|
||||
ctx.HTML(200, "repo/branches")
|
||||
}
|
||||
|
||||
func Single(ctx *middleware.Context, params martini.Params) {
|
||||
|
@ -67,7 +67,7 @@ func Single(ctx *middleware.Context, params martini.Params) {
|
|||
return
|
||||
} else if len(brs) == 0 {
|
||||
ctx.Data["IsBareRepo"] = true
|
||||
ctx.HTML(200, "repo/single", ctx.Data)
|
||||
ctx.HTML(200, "repo/single")
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,7 @@ func Single(ctx *middleware.Context, params martini.Params) {
|
|||
ctx.Data["Treenames"] = treenames
|
||||
ctx.Data["IsRepoToolbarSource"] = true
|
||||
ctx.Data["BranchLink"] = branchLink
|
||||
ctx.HTML(200, "repo/single", ctx.Data)
|
||||
ctx.HTML(200, "repo/single")
|
||||
}
|
||||
|
||||
func Setting(ctx *middleware.Context, params martini.Params) {
|
||||
|
@ -195,7 +195,7 @@ func Setting(ctx *middleware.Context, params martini.Params) {
|
|||
return
|
||||
} else if len(brs) == 0 {
|
||||
ctx.Data["IsBareRepo"] = true
|
||||
ctx.HTML(200, "repo/setting", ctx.Data)
|
||||
ctx.HTML(200, "repo/setting")
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -206,7 +206,7 @@ func Setting(ctx *middleware.Context, params martini.Params) {
|
|||
|
||||
ctx.Data["Title"] = title + " - settings"
|
||||
ctx.Data["IsRepoToolbarSetting"] = true
|
||||
ctx.HTML(200, "repo/setting", ctx.Data)
|
||||
ctx.HTML(200, "repo/setting")
|
||||
}
|
||||
|
||||
func Commits(ctx *middleware.Context, params martini.Params) {
|
||||
|
@ -230,17 +230,17 @@ func Commits(ctx *middleware.Context, params martini.Params) {
|
|||
ctx.Data["Reponame"] = params["reponame"]
|
||||
ctx.Data["CommitCount"] = commits.Len()
|
||||
ctx.Data["Commits"] = commits
|
||||
ctx.HTML(200, "repo/commits", ctx.Data)
|
||||
ctx.HTML(200, "repo/commits")
|
||||
}
|
||||
|
||||
func Issues(ctx *middleware.Context) {
|
||||
ctx.Data["IsRepoToolbarIssues"] = true
|
||||
ctx.HTML(200, "repo/issues", ctx.Data)
|
||||
ctx.HTML(200, "repo/issues")
|
||||
}
|
||||
|
||||
func Pulls(ctx *middleware.Context) {
|
||||
ctx.Data["IsRepoToolbarPulls"] = true
|
||||
ctx.HTML(200, "repo/pulls", ctx.Data)
|
||||
ctx.HTML(200, "repo/pulls")
|
||||
}
|
||||
|
||||
func Action(ctx *middleware.Context, params martini.Params) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue