aboutsummaryrefslogtreecommitdiffstats
path: root/templates/projects
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-03-09 23:38:29 +0900
committerGitHub <noreply@github.com>2023-03-09 08:38:29 -0600
commite52ac62d8e645c721060e6c9a2b0ab77eedf8fd6 (patch)
tree2259ae04d96cfe1679bbee559c5e397c412b5015 /templates/projects
parent8cadd51bf295e6ff36ac36efed68cc5de34c9382 (diff)
downloadgitea-e52ac62d8e645c721060e6c9a2b0ab77eedf8fd6.tar.gz
gitea-e52ac62d8e645c721060e6c9a2b0ab77eedf8fd6.zip
Redirect to project again after editing it (#23326)
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.
Diffstat (limited to 'templates/projects')
-rw-r--r--templates/projects/new.tmpl1
-rw-r--r--templates/projects/view.tmpl2
2 files changed, 2 insertions, 1 deletions
diff --git a/templates/projects/new.tmpl b/templates/projects/new.tmpl
index c96f948ded..826869ac5d 100644
--- a/templates/projects/new.tmpl
+++ b/templates/projects/new.tmpl
@@ -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>
diff --git a/templates/projects/view.tmpl b/templates/projects/view.tmpl
index 14a876d8fd..474b22a2f1 100644
--- a/templates/projects/view.tmpl
+++ b/templates/projects/view.tmpl
@@ -46,7 +46,7 @@
{{if or $.CanWriteIssues $.CanWritePulls}}
<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>