From 32eaba1b4081b0097f523204ae05cc163a50601e Mon Sep 17 00:00:00 2001 From: Giteabot Date: Fri, 7 Jul 2023 10:12:59 -0400 Subject: [PATCH] Hide `add file` button for pull mirrors (#25748) (#25751) Backport #25748 by @hiifong I think hiding the add file button for mirror repositories that can keep the ui clean. Before: ![image](https://github.com/go-gitea/gitea/assets/89133723/84ecf1a5-1a92-4bb1-b472-b4988a4441a9) After: ![image](https://github.com/go-gitea/gitea/assets/89133723/95382e73-286b-4114-9997-456ed77e07ca) Co-authored-by: hiifong --- 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 8589574a53ecc..01ea5d9122f85 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) (not .IsViewFile)}} + {{if and .CanWriteCode .IsViewBranch (not .Repository.IsMirror) (not .Repository.IsArchived) (not .IsViewFile)}}