refactoring views
This commit is contained in:
@@ -26,9 +26,9 @@ class PostPresenter < Presenter
|
||||
return template.content_tag("p", "You need a privileged account to see this image.") if !Danbooru.config.can_user_see_post?(CurrentUser.user, @post)
|
||||
|
||||
if @post.is_flash?
|
||||
template.render(:partial => "posts/partials/show/flash", :locals => {:post => @post})
|
||||
template.render("posts/partials/show/flash", :post => @post)
|
||||
elsif @post.is_image?
|
||||
template.render(:partial => "posts/partials/show/image", :locals => {:post => @post})
|
||||
template.render("posts/partials/show/image", :post => @post)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class PostSetPresenter < Presenter
|
||||
html = "<div class='post-previews'>"
|
||||
|
||||
if posts.empty?
|
||||
return template.render(:partial => "post_sets/blank")
|
||||
return template.render("post_sets/blank")
|
||||
end
|
||||
|
||||
posts.each do |post|
|
||||
|
||||
@@ -8,7 +8,7 @@ module PostSetPresenters
|
||||
html = ""
|
||||
|
||||
if posts.empty?
|
||||
return template.render(:partial => "post_sets/blank")
|
||||
return template.render("post_sets/blank")
|
||||
end
|
||||
|
||||
posts.each do |post|
|
||||
|
||||
Reference in New Issue
Block a user