Skip to content

Commit 07d9858

Browse files
committed
Don't display creating page button in a mirror wiki repository (go-gitea#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.
1 parent 8ceb78c commit 07d9858

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/repo/settings/options.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
</div>
158158
{{end}}
159159
<div class="field">
160-
<button class="ui green button">{{$.locale.Tr "repo.settings.update_settings"}}</button>
160+
<button class="ui green button">{{$.locale.Tr "repo.settings.update_mirror_settings"}}</button>
161161
</div>
162162
</form>
163163
</td>

templates/repo/wiki/pages.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{{.locale.Tr "repo.wiki.pages"}}
88
</div>
99
<div>
10-
{{if and .CanWriteWiki (not .IsRepositoryMirror)}}
10+
{{if and .CanWriteWiki (not .Repository.IsMirror)}}
1111
<a class="ui green small button" href="{{.RepoLink}}/wiki?action=_new">{{.locale.Tr "repo.wiki.new_page_button"}}</a>
1212
{{end}}
1313
</div>

0 commit comments

Comments
 (0)