summaryrefslogtreecommitdiffstats
path: root/routers/repo/view.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-30 05:07:50 -0700
committerUnknwon <u@gogs.io>2016-08-30 05:23:59 -0700
commit643142acab44d46aa6c001c90ad5d307a8662b99 (patch)
tree8e26f8959af5175e865d71a35df5dc087ff14dc8 /routers/repo/view.go
parent7c31f235da287b0ba1499986758332c2c346deb0 (diff)
downloadgitea-643142acab44d46aa6c001c90ad5d307a8662b99.tar.gz
gitea-643142acab44d46aa6c001c90ad5d307a8662b99.zip
Web editor: support upload files
Diffstat (limited to 'routers/repo/view.go')
-rw-r--r--routers/repo/view.go7
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