aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-08-09 09:29:02 +0800
committerGitHub <noreply@github.com>2024-08-09 01:29:02 +0000
commit791d7fc76aa41370860126e861cf14d98efe710e (patch)
tree066bde9247eaa6b91878c818901c378b65f5ecb1 /templates
parentaa1055fe16e2a11b4ab9503854be96e776231d93 (diff)
downloadgitea-791d7fc76aa41370860126e861cf14d98efe710e.tar.gz
gitea-791d7fc76aa41370860126e861cf14d98efe710e.zip
Add issue comment when moving issues from one column to another of the project (#29311)
Fix #27278 Replace #27816 This PR adds a meta-comment for an issue when dragging an issue from one column to another of a project. <img width="600" alt="image" src="https://github.com/go-gitea/gitea/assets/81045/5fc1d954-430e-4db0-aaee-a00006fa91f5"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: yp05327 <576951401@qq.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/view_content/comments.tmpl16
1 files changed, 16 insertions, 0 deletions
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index 804cd6a2f9..1cf9287111 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -604,6 +604,22 @@
{{end}}
</span>
</div>
+ {{else if eq .Type 31}}
+ {{if not $.UnitProjectsGlobalDisabled}}
+ <div class="timeline-item event" id="{{.HashTag}}">
+ <span class="badge">{{svg "octicon-project"}}</span>
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
+ <span class="text grey muted-links">
+ {{template "shared/user/authorlink" .Poster}}
+ {{$newProjectDisplay := .CommentMetaData.ProjectTitle}}
+ {{if .Project}}
+ {{$trKey := printf "projects.type-%d.display_name" .Project.Type}}
+ {{$newProjectDisplay = HTMLFormat `%s <a href="%s"><span data-tooltip-content="%s">%s</span></a>` (svg .Project.IconName) (.Project.Link ctx) (ctx.Locale.Tr $trKey) .Project.Title}}
+ {{end}}
+ {{ctx.Locale.Tr "repo.issues.move_to_column_of_project" .CommentMetaData.ProjectColumnTitle $newProjectDisplay $createdStr}}
+ </span>
+ </div>
+ {{end}}
{{else if eq .Type 32}}
<div class="timeline-item-group">
<div class="timeline-item event" id="{{.HashTag}}">