This commit is contained in:
r888888888
2013-11-20 16:56:59 -08:00
parent ae141228a1
commit 016fccbf0a
4 changed files with 131 additions and 8 deletions

View File

@@ -20,11 +20,7 @@ class PostPresenter < Presenter
else
tag_param = nil
end
if options[:mobile]
html << %{<a href="/m#{path}/#{post.id}#{tag_param}">}
else
html << %{<a href="#{path}/#{post.id}#{tag_param}">}
end
html << %{<a href="#{path}/#{post.id}#{tag_param}">}
html << %{<img src="#{post.preview_file_url}" alt="#{h(post.tag_string)}">}
html << %{</a>}
html << %{</article>}

View File

@@ -12,7 +12,7 @@ module PostSetPresenters
end
posts.each do |post|
html << PostPresenter.preview(post, :tags => @post_set.tag_string, :raw => @post_set.raw, :mobile => options[:mobile])
html << PostPresenter.preview(post, options.merge(:tags => @post_set.tag_string, :raw => @post_set.raw))
html << "\n"
end

View File

@@ -3,7 +3,7 @@
<%= submit_tag "Go", :name => nil %>
<% end %>
<%= @post_set.presenter.post_previews_html(self, :mobile => true) %>
<%= @post_set.presenter.post_previews_html(self, :path_prefix => "/m/posts") %>
<%= numbered_paginator(@post_set.posts) %>