Skip to content

Commit

Permalink
Hide add file button for pull mirrors (go-gitea#25748) (go-gitea#25751
Browse files Browse the repository at this point in the history
)

Backport go-gitea#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 <i@hiif.ong>
  • Loading branch information
GiteaBot and hiifong committed Jul 7, 2023
1 parent 582dcaa commit 32eaba1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/repo/home.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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"}}
Expand Down

0 comments on commit 32eaba1

Please sign in to comment.