mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-28 20:56:11 +01:00
Unify allow edits logic
This commit is contained in:
parent
6bd4925753
commit
66b22c5818
|
@ -52,7 +52,15 @@
|
||||||
{{template "repo/issue/view_content/sidebar/actions" .}}
|
{{template "repo/issue/view_content/sidebar/actions" .}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed) .Issue.PullRequest.HeadRepo}}
|
{{if and
|
||||||
|
.Issue.IsPull
|
||||||
|
.IsIssuePoster
|
||||||
|
(not .Issue.IsClosed)
|
||||||
|
.Issue.PullRequest.HeadRepo
|
||||||
|
(not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName))
|
||||||
|
.CanWriteToHeadRepo
|
||||||
|
}}
|
||||||
|
<div class="divider"></div>
|
||||||
{{template "repo/issue/view_content/sidebar/pull_maintainer_edits" .}}
|
{{template "repo/issue/view_content/sidebar/pull_maintainer_edits" .}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}}
|
<div class="inline field">
|
||||||
<div class="divider"></div>
|
|
||||||
<div class="inline field">
|
|
||||||
<div class="ui checkbox loading-icon-2px" id="allow-edits-from-maintainers"
|
<div class="ui checkbox loading-icon-2px" id="allow-edits-from-maintainers"
|
||||||
data-url="{{.Issue.Link}}"
|
data-url="{{.Issue.Link}}"
|
||||||
data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}"
|
data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}"
|
||||||
|
@ -9,5 +7,4 @@
|
||||||
<label><strong>{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label>
|
<label><strong>{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label>
|
||||||
<input type="checkbox" {{if .Issue.PullRequest.AllowMaintainerEdit}}checked{{end}}>
|
<input type="checkbox" {{if .Issue.PullRequest.AllowMaintainerEdit}}checked{{end}}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
|
||||||
|
|
Loading…
Reference in a new issue