aboutsummaryrefslogtreecommitdiff
path: root/routers/repo/view.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-14 23:38:35 -0700
committerUnknwon <u@gogs.io>2016-08-14 23:52:24 -0700
commit54e0ada9d53c28543a436d266dc73e759cc7658b (patch)
treeadafc14fd67620258077d94e96579f47111e87b1 /routers/repo/view.go
parentcd89f6c5021ef129ecc4652aa620a3562ae30979 (diff)
Web editor: improve delete file
Diffstat (limited to 'routers/repo/view.go')
1 files changed, 1 insertions, 3 deletions
diff --git a/routers/repo/view.go b/routers/repo/view.go
index 1572bb61..7fe7984c 100644
--- a/routers/repo/view.go
+++ b/routers/repo/view.go
@@ -53,7 +53,6 @@ func Home(ctx *context.Context) {
rawLink := ctx.Repo.RepoLink + "/raw/" + branchName
editLink := ctx.Repo.RepoLink + "/_edit/" + branchName
newFileLink := ctx.Repo.RepoLink + "/_new/" + branchName
- deleteLink := ctx.Repo.RepoLink + "/delete/" + branchName
forkLink := setting.AppSubUrl + "/repo/fork/" + strconv.FormatInt(ctx.Repo.Repository.ID, 10)
uploadFileLink := ctx.Repo.RepoLink + "/upload/" + branchName
@@ -171,7 +170,6 @@ func Home(ctx *context.Context) {
}
if ctx.Repo.IsWriter() && ctx.Repo.IsViewBranch {
- ctx.Data["FileDeleteLink"] = deleteLink + "/" + treename
ctx.Data["FileDeleteLinkTooltip"] = ctx.Tr("repo.delete_this_file")
} else {
if !ctx.Repo.IsViewBranch {
@@ -259,7 +257,7 @@ func Home(ctx *context.Context) {
ctx.Data["LastCommitUser"] = models.ValidateCommitWithEmail(lastCommit)
if ctx.Repo.IsWriter() && ctx.Repo.IsViewBranch {
ctx.Data["NewFileLink"] = newFileLink + "/" + treename
- if !setting.Repository.Upload.Enabled {
+ if setting.Repository.Upload.Enabled {
ctx.Data["UploadFileLink"] = uploadFileLink + "/" + treename
}
}