mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-17 11:59:30 +00:00
Backport #23326 by @yp05327 A part of https://github.com/go-gitea/gitea/pull/22865 We have edit buttons in projects list page and project view page. But after user edit a project, it will always redirect to the projects list page. Co-authored-by: yp05327 <576951401@qq.com>
This commit is contained in:
parent
b6a2323981
commit
62afc0a727
6 changed files with 16 additions and 4 deletions
|
@ -21,6 +21,7 @@
|
|||
<form class="ui form grid" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="eleven wide column">
|
||||
<input type="hidden" id="redirect" name="redirect" value="{{.redirect}}">
|
||||
<div class="field {{if .Err_Title}}error{{end}}">
|
||||
<label>{{.locale.Tr "repo.projects.title"}}</label>
|
||||
<input name="title" placeholder="{{.locale.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required>
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
{{if $.CanWriteProjects}}
|
||||
<div class="column right aligned">
|
||||
<div class="ui compact right small menu">
|
||||
<a class="item" href="{{$.Link}}/edit" data-id={{$.Project.ID}} data-title={{$.Project.Title}}>
|
||||
<a class="item" href="{{$.Link}}/edit?redirect=project" data-id={{$.Project.ID}} data-title={{$.Project.Title}}>
|
||||
{{svg "octicon-pencil"}}
|
||||
<span class="gt-mx-3">{{$.locale.Tr "repo.issues.label_edit"}}</span>
|
||||
</a>
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
<form class="ui form grid" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="eleven wide column">
|
||||
<input type="hidden" id="redirect" name="redirect" value="{{.redirect}}">
|
||||
<div class="field {{if .Err_Title}}error{{end}}">
|
||||
<label>{{.locale.Tr "repo.projects.title"}}</label>
|
||||
<input name="title" placeholder="{{.locale.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required>
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
{{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}}
|
||||
<div class="column right aligned">
|
||||
<div class="ui compact right small menu">
|
||||
<a class="item" href="{{$.RepoLink}}/projects/{{.Project.ID}}/edit" data-id={{$.Project.ID}} data-title={{$.Project.Title}}>
|
||||
<a class="item" href="{{$.RepoLink}}/projects/{{.Project.ID}}/edit?redirect=project" data-id={{$.Project.ID}} data-title={{$.Project.Title}}>
|
||||
{{svg "octicon-pencil"}}
|
||||
<span class="gt-mx-3">{{$.locale.Tr "repo.issues.label_edit"}}</span>
|
||||
</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue