This commit is contained in:
albert
2012-01-13 18:53:18 -05:00
parent 3a7b25ba1a
commit 4937b2bad1

View File

@@ -13,15 +13,7 @@ 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(' ')}" data-parent-id="#{post.parent_id}" data-has-children="#{post.has_children?}">}
html << %{<a href="#{path}/#{post.id}">}
if post.is_image?
html << %{<img src="#{post.preview_file_url}" alt="#{h(post.tag_string)}">}
elsif post.is_flash?
html << '<div class="text-post-preview">Flash</div>'
else
html << '<div class="text-post-preview">Download</div>'
end
html << %{<img src="#{post.preview_file_url}" alt="#{h(post.tag_string)}">}
html << %{</a>}
html << %{</article>}
html.html_safe