From 54e0ada9d53c28543a436d266dc73e759cc7658b Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 14 Aug 2016 23:38:35 -0700 Subject: Web editor: improve delete file --- routers/repo/view.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'routers/repo/view.go') 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 } } -- cgit v1.2.3