aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/diff
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-05-12 19:53:41 +0900
committerGitHub <noreply@github.com>2023-05-12 10:53:41 +0000
commitb5c26fa825e08122843ad6d27191d399a9af1c37 (patch)
treea0a76f4fd098deceaed2b6fedad1131988530cfa /templates/repo/diff
parenta96c73f9790772d6fa34f462dfd5a87f9a4b0e21 (diff)
downloadgitea-b5c26fa825e08122843ad6d27191d399a9af1c37.tar.gz
gitea-b5c26fa825e08122843ad6d27191d399a9af1c37.zip
Add markdown preview to Submit Review Textarea (#24672)
Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/2909352c-b2ab-4d77-b410-9f08c2f5a154) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/9448fa75-e29b-4f95-a30f-03c73c083a83) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'templates/repo/diff')
-rw-r--r--templates/repo/diff/new_review.tmpl8
1 files changed, 5 insertions, 3 deletions
diff --git a/templates/repo/diff/new_review.tmpl b/templates/repo/diff/new_review.tmpl
index bb97303034..afb82a8d3d 100644
--- a/templates/repo/diff/new_review.tmpl
+++ b/templates/repo/diff/new_review.tmpl
@@ -9,13 +9,15 @@
<form class="ui form" action="{{.Link}}/reviews/submit" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name="commit_id" value="{{.AfterCommitID}}">
- <div class="header gt-df gt-ac gt-pb-3">
+ <div class="field gt-df gt-ac">
<div class="gt-f1">{{$.locale.Tr "repo.diff.review.header"}}</div>
- <a class="muted close gt-px-3">{{svg "octicon-x" 16}}</a>
+ <a class="muted close">{{svg "octicon-x" 16}}</a>
</div>
- <div class="ui field">
+ <div class="field">
{{template "shared/combomarkdowneditor" (dict
"locale" $.locale
+ "MarkdownPreviewUrl" (print .Repository.Link "/markup")
+ "MarkdownPreviewContext" .RepoLink
"TextareaName" "content"
"TextareaPlaceholder" ($.locale.Tr "repo.diff.review.placeholder")
"DropzoneParentContainer" "form"