attachment new version

This commit is contained in:
Andreas Stephanides
2015-04-07 23:21:33 +02:00
parent b04b23e647
commit 0df5e72e15
17 changed files with 273 additions and 43 deletions

View File

@@ -0,0 +1,14 @@
<% attachment=attachment_new %>
<% data_ext = attachment.datei.file.try(:extension).try(:downcase) %>
<% if (!["jpg","png","jpeg"].find_index(data_ext).nil?) %>
<%= image_tag attachment.datei.thumb_small.url %>
<% elsif (!["pdf"].find_index(data_ext).nil?)%>
<%= image_tag attachment.datei.cover.url %>
<% else %>
<%= ff_icon("ffi1-note20 fa-2x") %>
<% end %>
<%= attachment.name %>