Use image preview in sidebar attachments list.

This commit is contained in:
Martin Edenhofer 2019-04-08 02:19:05 +02:00
parent 04c1cf2fb9
commit a11fb318d4

View file

@ -5,7 +5,7 @@
<div class="attachment-icon"> <div class="attachment-icon">
<% if attachment.preferences && attachment.preferences['Content-Type'] && @ContentTypeIcon(attachment.preferences['Content-Type']): %> <% if attachment.preferences && attachment.preferences['Content-Type'] && @ContentTypeIcon(attachment.preferences['Content-Type']): %>
<% if @canPreview(attachment.preferences['Content-Type']): %> <% if @canPreview(attachment.preferences['Content-Type']): %>
<img src="<%= App.Config.get('api_path') %>/ticket_attachment/<%= @article.ticket_id %>/<%= @article.id %>/<%= attachment.id %>"> <img src="<%= App.Config.get('api_path') %>/ticket_attachment/<%= @article.ticket_id %>/<%= @article.id %>/<%= attachment.id %>?view=preview">
<% else: %> <% else: %>
<%- @Icon( @ContentTypeIcon(attachment.preferences['Content-Type']) ) %> <%- @Icon( @ContentTypeIcon(attachment.preferences['Content-Type']) ) %>
<% end %> <% end %>