From 3d8182e06ec2139b88be95c7e82a91c790fb3384 Mon Sep 17 00:00:00 2001 From: hiifong Date: Sun, 18 Jun 2023 17:21:50 +0800 Subject: [PATCH] When viewing a file, hide the add button (#25320) Fix #25281 When viewing a file, hide the add button ![image](https://github.com/go-gitea/gitea/assets/89133723/839babaf-6b67-46e1-a103-677306fb8503) ![image](https://github.com/go-gitea/gitea/assets/89133723/32a8aeca-31f4-4ce1-a0fa-7656e16b66d3) --- templates/repo/home.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index a983de5a48b14..8589574a53ecc 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -83,7 +83,7 @@ {{.locale.Tr "repo.find_file.go_to_file"}} {{end}} - {{if and .CanWriteCode .IsViewBranch (not .Repository.IsArchived)}} + {{if and .CanWriteCode .IsViewBranch (not .Repository.IsArchived) (not .IsViewFile)}}