temp fix for flash thumbnails

This commit is contained in:
albert
2011-10-21 18:02:41 -04:00
parent 3b1d01370a
commit b69cab11ee
3 changed files with 20 additions and 3 deletions

View File

@@ -7,7 +7,15 @@ class PostPresenter < Presenter
html = %{<article class="post-preview" id="post_#{post.id}" data-id="#{post.id}" data-tags="#{h(post.tag_string)}" data-uploader="#{h(post.uploader_name)}" data-rating="#{post.rating}" data-width="#{post.image_width}" data-height="#{post.image_height}" data-flags="#{flags.join(' ')}">}
html << %{<a href="/posts/#{post.id}">}
html << %{<img src="#{post.preview_file_url}">}
if post.is_image?
html << %{<img src="#{post.preview_file_url}">}
elsif post.is_flash?
html << '<span class="text-post-preview">Flash</span>'
else
html << '<span class="text-post-preview">Download</span>'
end
html << %{</a>}
html << %{</article>}
html.html_safe