summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue/view_content.tmpl
diff options
context:
space:
mode:
authorbobemoe <inbox.github@jhodges.co.uk>2020-12-13 19:12:27 +0000
committerGitHub <noreply@github.com>2020-12-13 21:12:27 +0200
commitb35c1b5784b99fa71d0ea3ddf8ac253dc44c0d82 (patch)
tree696671b9bc38427fa0fcc30cc3adcc990854b169 /templates/repo/issue/view_content.tmpl
parent825efa2605421a54ad1c5960de9e121a34d68d1a (diff)
downloadgitea-b35c1b5784b99fa71d0ea3ddf8ac253dc44c0d82.tar.gz
gitea-b35c1b5784b99fa71d0ea3ddf8ac253dc44c0d82.zip
add thumbnail preview section to issue attachments (#13826)
* add thumbnail preview section to attachments * dont show thumbnail if the image is already shown inline * update router to pass the `content` to the attachemnts template * limit attachment preview height to 150px (same as width) * remove unused css (referance removed in https://github.com/go-gitea/gitea/pull/11141/files#diff-9faae32445ed9673de2830c9fc35e93f44487f0a0068202988adaf00a5bac850L66 ) * dont show divider after edit if no attachemnts Co-authored-by: James <inbox.dev@jhodges.co.uk> Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'templates/repo/issue/view_content.tmpl')
-rw-r--r--templates/repo/issue/view_content.tmpl11
1 files changed, 3 insertions, 8 deletions
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl
index 355ba0ea29..37628a74e8 100644
--- a/templates/repo/issue/view_content.tmpl
+++ b/templates/repo/issue/view_content.tmpl
@@ -66,14 +66,9 @@
</div>
<div id="comment-{{.Issue.ID}}" class="raw-content hide">{{.Issue.Content}}</div>
<div class="edit-content-zone hide" data-write="issue-{{.Issue.ID}}-write" data-preview="issue-{{.Issue.ID}}-preview" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/content" data-context="{{.RepoLink}}" data-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/attachments" data-view-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/view-attachments"></div>
- {{if .Issue.Attachments}}
- <div class="dropzone-attachments">
- <div class="ui clearing divider"></div>
- <div class="ui middle aligned padded grid">
- {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Issue.Attachments}}
- </div>
- </div>
- {{end}}
+ {{if .Issue.Attachments}}
+ {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Issue.Attachments "Content" .Issue.RenderedContent}}
+ {{end}}
</div>
{{$reactions := .Issue.Reactions.GroupByType}}
{{if $reactions}}