mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-24 08:57:03 -05:00
Unify allow edits logic
This commit is contained in:
parent
6bd4925753
commit
66b22c5818
2 changed files with 18 additions and 13 deletions
|
@ -52,7 +52,15 @@
|
|||
{{template "repo/issue/view_content/sidebar/actions" .}}
|
||||
{{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" .}}
|
||||
{{end}}
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
{{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}}
|
||||
<div class="divider"></div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox loading-icon-2px" id="allow-edits-from-maintainers"
|
||||
data-url="{{.Issue.Link}}"
|
||||
|
@ -10,4 +8,3 @@
|
|||
<input type="checkbox" {{if .Issue.PullRequest.AllowMaintainerEdit}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
Loading…
Reference in a new issue