refactoring views

This commit is contained in:
albert
2011-08-16 18:47:01 -04:00
parent c8067a4691
commit 24bf21540a
46 changed files with 244 additions and 298 deletions

View File

@@ -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

View File

@@ -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|

View File

@@ -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|