diff options
author | Unknwon <u@gogs.io> | 2016-08-30 05:07:50 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-30 05:23:59 -0700 |
commit | 643142acab44d46aa6c001c90ad5d307a8662b99 (patch) | |
tree | 8e26f8959af5175e865d71a35df5dc087ff14dc8 /routers/repo/view.go | |
parent | 7c31f235da287b0ba1499986758332c2c346deb0 (diff) | |
download | gitea-643142acab44d46aa6c001c90ad5d307a8662b99.tar.gz gitea-643142acab44d46aa6c001c90ad5d307a8662b99.zip |
Web editor: support upload files
Diffstat (limited to 'routers/repo/view.go')
-rw-r--r-- | routers/repo/view.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/routers/repo/view.go b/routers/repo/view.go index 42bf62c606..055785564d 100644 --- a/routers/repo/view.go +++ b/routers/repo/view.go @@ -113,10 +113,7 @@ func renderDirectory(ctx *context.Context, treeLink string) { // Check permission to add or upload new file. if ctx.Repo.IsWriter() && ctx.Repo.IsViewBranch { ctx.Data["CanAddFile"] = true - // uploadFileLink := ctx.Repo.RepoLink + "/upload/" + branchName - // if setting.Repository.Upload.Enabled { - // ctx.Data["UploadFileLink"] = uploadFileLink + "/" + ctx.Repo.TreePath - // } + ctx.Data["CanUploadFile"] = setting.Repository.Upload.Enabled } } @@ -253,7 +250,7 @@ func Home(ctx *context.Context) { ec, err := ctx.Repo.GetEditorconfig() if err != nil && !git.IsErrNotExist(err) { - ctx.Handle(500, "ErrGettingEditorconfig", err) + ctx.Handle(500, "Repo.GetEditorconfig", err) return } ctx.Data["Editorconfig"] = ec |