fixes #2005
This commit is contained in:
@@ -20,7 +20,11 @@ class PostPresenter < Presenter
|
||||
else
|
||||
tag_param = nil
|
||||
end
|
||||
html << %{<a href="#{path}/#{post.id}#{tag_param}">}
|
||||
if options[:mobile]
|
||||
html << %{<a href="/m#{path}/#{post.id}#{tag_param}">}
|
||||
else
|
||||
html << %{<a href="#{path}/#{post.id}#{tag_param}">}
|
||||
end
|
||||
html << %{<img src="#{post.preview_file_url}" alt="#{h(post.tag_string)}">}
|
||||
html << %{</a>}
|
||||
html << %{</article>}
|
||||
|
||||
@@ -4,7 +4,7 @@ module PostSetPresenters
|
||||
raise NotImplementedError
|
||||
end
|
||||
|
||||
def post_previews_html(template)
|
||||
def post_previews_html(template, options = {})
|
||||
html = ""
|
||||
|
||||
if posts.empty?
|
||||
@@ -12,7 +12,7 @@ module PostSetPresenters
|
||||
end
|
||||
|
||||
posts.each do |post|
|
||||
html << PostPresenter.preview(post, :tags => @post_set.tag_string, :raw => @post_set.raw)
|
||||
html << PostPresenter.preview(post, :tags => @post_set.tag_string, :raw => @post_set.raw, :mobile => options[:mobile])
|
||||
html << "\n"
|
||||
end
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@ module PostSetPresenters
|
||||
RelatedTagCalculator.calculate_from_post_set_to_array(post_set).map(&:first)
|
||||
end
|
||||
|
||||
def tag_list_html(template)
|
||||
tag_set_presenter.tag_list_html(template)
|
||||
def tag_list_html(template, options = {})
|
||||
tag_set_presenter.tag_list_html(template, options)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user