Skip to content

Commit

Permalink
Don't display creating page button in a mirror wiki repository (go-gi…
Browse files Browse the repository at this point in the history
…tea#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.
  • Loading branch information
lunny committed May 4, 2023
1 parent 8ceb78c commit 07d9858
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/repo/settings/options.tmpl
Expand Up @@ -157,7 +157,7 @@
</div>
{{end}}
<div class="field">
<button class="ui green button">{{$.locale.Tr "repo.settings.update_settings"}}</button>
<button class="ui green button">{{$.locale.Tr "repo.settings.update_mirror_settings"}}</button>
</div>
</form>
</td>
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/wiki/pages.tmpl
Expand Up @@ -7,7 +7,7 @@
{{.locale.Tr "repo.wiki.pages"}}
</div>
<div>
{{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}}
</div>
Expand Down

0 comments on commit 07d9858

Please sign in to comment.