Show attachment file name instead of the type

This commit is contained in:
r 2021-01-16 18:03:47 +00:00
parent 17f02deff7
commit 3f776ee8c8

View File

@ -91,7 +91,9 @@
{{if eq .Type "image"}} {{if eq .Type "image"}}
{{if $.Ctx.HideAttachments}} {{if $.Ctx.HideAttachments}}
<a href="{{.URL}}" target="_blank" title="{{.Description}}"> [image] </a> <a href="{{.URL}}" target="_blank">
{{if .Description}}[{{.Description}}]{{else}}[image]{{end}}
</a>
{{else}} {{else}}
<a class="img-link" href="{{.URL}}" target="_blank" title="{{.Description}}"> <a class="img-link" href="{{.URL}}" target="_blank" title="{{.Description}}">
<img class="status-image" src="{{.URL}}" alt="status-image" height="240" /> <img class="status-image" src="{{.URL}}" alt="status-image" height="240" />
@ -103,7 +105,9 @@
{{else if eq .Type "audio"}} {{else if eq .Type "audio"}}
{{if $.Ctx.HideAttachments}} {{if $.Ctx.HideAttachments}}
<a href="{{.URL}}" target="_blank" title="{{.Description}}"> [audio] </a> <a href="{{.URL}}" target="_blank">
{{if .Description}}[{{.Description}}]{{else}}[audio]{{end}}
</a>
{{else}} {{else}}
<audio class="status-audio" controls title="{{.Description}}"> <audio class="status-audio" controls title="{{.Description}}">
<source src="{{.URL}}"> <source src="{{.URL}}">
@ -113,7 +117,9 @@
{{else if eq .Type "video"}} {{else if eq .Type "video"}}
{{if $.Ctx.HideAttachments}} {{if $.Ctx.HideAttachments}}
<a href="{{.URL}}" target="_blank" title="{{.Description}}"> [video] </a> <a href="{{.URL}}" target="_blank">
{{if .Description}}[{{.Description}}]{{else}}[video]{{end}}
</a>
{{else}} {{else}}
<div class="status-video-container" title="{{.Description}}"> <div class="status-video-container" title="{{.Description}}">
<video class="status-video" controls height="240"> <video class="status-video" controls height="240">
@ -127,7 +133,9 @@
{{end}} {{end}}
{{else}} {{else}}
<a href="{{.URL}}" target="_blank" title="{{.Description}}"> [attachment] </a> <a href="{{.URL}}" target="_blank">
{{if .Description}}[{{.Description}}]{{else}}[attachment]{{end}}
</a>
{{end}} {{end}}
{{end}} {{end}}
</div> </div>