forked from bofh/fetsite
attachments view
This commit is contained in:
9
app/views/attachments/_attachment.html.erb
Normal file
9
app/views/attachments/_attachment.html.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<% data_ext = attachment.datei.file.extension.downcase %>
|
||||
|
||||
<%= attachment.name %> </br>
|
||||
<% if (!["jpg","png","jpeg"].find_index(data_ext).nil?) %>
|
||||
<%= image_tag attachment.datei.thumb.url %>
|
||||
<% else %>
|
||||
<%= image_tag "pdf-logo.jpg" %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user