Skip to content

Commit b700c11

Browse files
author
James
committed
Psudo code - please help (dont show thumbnail if its alreay displayed in the content body)
1 parent afc889f commit b700c11

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

templates/repo/issue/view_content/attachments.tmpl

+5-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@
2727
<div class="ui small images">
2828
{{- range .Attachments -}}
2929
{{if FilenameIsImage .Name}}
30-
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}">
31-
<img class="ui image" src="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'>
32-
</a>
30+
{{if .Content not contains .DownloadURL}} ## NEED HELP HERE
31+
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}">
32+
<img class="ui image" src="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'>
33+
</a>
34+
{{end}}
3335
{{end}}
3436
{{end -}}
3537
</div>

0 commit comments

Comments
 (0)