1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 02:38:35 +00:00

Auto expand "New PR" form (#33971)

Follow GitHub's behavior: use `?expand=1` to expand the "New PR" form
This commit is contained in:
wxiaoguang
2025-03-24 22:28:02 +08:00
committed by GitHub
parent 25b6f38865
commit b1e326d09e
9 changed files with 62 additions and 41 deletions

View File

@@ -205,10 +205,10 @@
{{end}}
</div>
{{else if $allowCreatePR}}
<div class="ui info message pullrequest-form-toggle {{if .Flash}}tw-hidden{{end}}">
<div class="ui info message pullrequest-form-toggle {{if .ExpandNewPrForm}}tw-hidden{{end}}">
<button class="ui button primary show-panel toggle" data-panel=".pullrequest-form-toggle, .pullrequest-form">{{ctx.Locale.Tr "repo.pulls.new"}}</button>
</div>
<div class="pullrequest-form {{if not .Flash}}tw-hidden{{end}}">
<div class="pullrequest-form {{if not .ExpandNewPrForm}}tw-hidden{{end}}">
{{template "repo/issue/new_form" .}}
</div>
{{end}}