<xf:if is="!$attachment"><xf:trim>
	<a href="{{ link('canonical:attachments', {'attachment_id': $id}) }}" target="_blank">{{ phrase('view_attachment_x', {'name': $id}) }}</a>
</xf:trim><xf:elseif is="($attachment.is_video OR $attachment.is_audio) AND $full AND $canView" /><xf:trim>
	<div class="mediaPlaceholder">{{ phrase('embedded_media') }}</div>
</xf:trim><xf:elseif is="!$attachment.has_thumbnail" /><xf:trim>
	<a href="{{ link('canonical:attachments', $attachment, {'hash': $attachment.temp_hash}) }}" target="_blank">{{ phrase('view_attachment_x', {'name': $attachment.filename}) }}</a>
</xf:trim><xf:else /><xf:trim>
	<a href="{{ link('canonical:attachments', $attachment, {'hash': $attachment.temp_hash}) }}"
		target="_blank"><img src="{$attachment.thumbnail_url_full}"
		class="bbImage"
		style="{$styleAttr}"
		alt="{$alt}"
		title="{$alt}"
		width="{$attachment.thumbnail_width}" height="{$attachment.thumbnail_height}" /></a>
</xf:trim></xf:if>