attachments view

This commit is contained in:
Andreas Stephanides
2014-05-02 18:55:38 +02:00
parent ad704aacd5
commit 667f5b680e
7 changed files with 42 additions and 6 deletions

View 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 %>