mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-24 22:15:01 +08:00
modify RepoAssignment
This commit is contained in:
@ -10,12 +10,14 @@ import (
|
||||
)
|
||||
|
||||
func Single(ctx *middleware.Context, params martini.Params) {
|
||||
if !ctx.Data["IsRepositoryValid"].(bool) {
|
||||
if !ctx.Repo.IsValid {
|
||||
return
|
||||
}
|
||||
|
||||
if params["branchname"] == "" {
|
||||
params["branchname"] = "master"
|
||||
}
|
||||
|
||||
treename := params["_1"]
|
||||
files, err := models.GetReposFiles(params["username"], params["reponame"],
|
||||
params["branchname"], treename)
|
||||
@ -46,11 +48,16 @@ func Single(ctx *middleware.Context, params martini.Params) {
|
||||
}
|
||||
|
||||
func Setting(ctx *middleware.Context) {
|
||||
if !ctx.Data["IsRepositoryValid"].(bool) {
|
||||
if !ctx.Repo.IsValid {
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Data["Title"] = ctx.Data["Title"].(string) + " - settings"
|
||||
var title string
|
||||
if t, ok := ctx.Data["Title"].(string); ok {
|
||||
title = t
|
||||
}
|
||||
|
||||
ctx.Data["Title"] = title + " - settings"
|
||||
ctx.Data["IsRepoToolbarSetting"] = true
|
||||
ctx.Render.HTML(200, "repo/setting", ctx.Data)
|
||||
}
|
||||
|
Reference in New Issue
Block a user