1
0
Fork 0
forked from forgejo/forgejo

Don't display creating page button in a mirror wiki repository (#24395)

A mirror repository with wiki is also a mirror. So creating page from UI
should be disabled. This PR hides the button like other places.
This commit is contained in:
Lunny Xiao 2023-05-04 15:27:15 +08:00 committed by GitHub
parent 5d77691d42
commit b1cee3fa3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View file

@ -5,7 +5,7 @@
<h2 class="ui header gt-df gt-ac gt-sb">
<span>{{.locale.Tr "repo.wiki.pages"}}</span>
<span>
{{if and .CanWriteWiki (not .IsRepositoryMirror)}}
{{if and .CanWriteWiki (not .Repository.IsMirror)}}
<a class="ui green small button" href="{{.RepoLink}}/wiki?action=_new">{{.locale.Tr "repo.wiki.new_page_button"}}</a>
{{end}}
</span>