summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
author赵智超 <1012112796@qq.com>2020-09-11 02:09:14 +0800
committerGitHub <noreply@github.com>2020-09-10 14:09:14 -0400
commit4f8dad37f834833012004bf5b158e5129af4b610 (patch)
tree0b3b81baa95540cda91294f4cf3027e949f6b2b5 /templates
parent5b10da241b83dc1c9a5a745cd03edaaac900eab4 (diff)
downloadgitea-4f8dad37f834833012004bf5b158e5129af4b610.tar.gz
gitea-4f8dad37f834833012004bf5b158e5129af4b610.zip
ui: change commentTag style (#11668)
* ui: change commentTag style * Add comment tag in first comment (issue content) * Show CommentTagPoster in other way Signed-off-by: a1012112796 <1012112796@qq.com> * Update routers/repo/issue.go Co-authored-by: Lauris BH <lauris@nix.lv> * fix lint * revert CommentTagPoster Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/view_content.tmpl9
-rw-r--r--templates/repo/issue/view_content/comments.tmpl9
2 files changed, 15 insertions, 3 deletions
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl
index a61832dd3c..1addbaf5bb 100644
--- a/templates/repo/issue/view_content.tmpl
+++ b/templates/repo/issue/view_content.tmpl
@@ -40,6 +40,15 @@
{{end}}
{{if not $.Repository.IsArchived}}
<div class="ui right actions">
+ {{if gt .Issue.ShowTag 0}}
+ <div class="item tag">
+ {{if eq .Issue.ShowTag 2}}
+ {{$.i18n.Tr "repo.issues.collaborator"}}
+ {{else if eq .Issue.ShowTag 3}}
+ {{$.i18n.Tr "repo.issues.owner"}}
+ {{end}}
+ </div>
+ {{end}}
{{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}}
{{template "repo/issue/view_content/context_menu" Dict "ctx" $ "item" .Issue "delete" false "diff" false "IsCommentPoster" $.IsIssuePoster}}
</div>
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index c222e6cec2..686d88e17f 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -27,11 +27,14 @@
{{end}}
{{if not $.Repository.IsArchived}}
<div class="ui right actions">
+ {{if eq .PosterID .Issue.PosterID }}
+ <div class="item tag">
+ {{$.i18n.Tr "repo.issues.poster"}}
+ </div>
+ {{end}}
{{if gt .ShowTag 0}}
<div class="item tag">
- {{if eq .ShowTag 1}}
- {{$.i18n.Tr "repo.issues.poster"}}
- {{else if eq .ShowTag 2}}
+ {{if eq .ShowTag 2}}
{{$.i18n.Tr "repo.issues.collaborator"}}
{{else if eq .ShowTag 3}}
{{$.i18n.Tr "repo.issues.owner"}}