diff options
author | hiifong <i@hiif.ong> | 2023-07-07 21:36:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-07 13:36:14 +0000 |
commit | a6a9389c702abcb003cbd4a304ec3650345fc14f (patch) | |
tree | e2bc3996e8d23a6e945e64b413d315b728a5c5e6 /templates/repo | |
parent | 32b26181d796e373bb612cd4c823fe41a901083e (diff) | |
download | gitea-a6a9389c702abcb003cbd4a304ec3650345fc14f.tar.gz gitea-a6a9389c702abcb003cbd4a304ec3650345fc14f.zip |
Hide `add file` button for pull mirrors (#25748)
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)
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/home.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 8589574a53..01ea5d9122 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -83,7 +83,7 @@ <a href="{{.Repository.Link}}/find/{{.BranchNameSubURL}}" class="ui compact basic button">{{.locale.Tr "repo.find_file.go_to_file"}}</a> {{end}} - {{if and .CanWriteCode .IsViewBranch (not .Repository.IsArchived) (not .IsViewFile)}} + {{if and .CanWriteCode .IsViewBranch (not .Repository.IsMirror) (not .Repository.IsArchived) (not .IsViewFile)}} <button class="ui dropdown basic compact jump button gt-mr-2"{{if not .Repository.CanEnableEditor}} disabled{{end}}> {{.locale.Tr "repo.editor.add_file"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}} |