added new landing page

This commit is contained in:
albert
2011-10-28 19:21:44 -04:00
parent 47abe4eacd
commit 40745a2e6e
18 changed files with 234 additions and 48 deletions

View File

@@ -32,6 +32,13 @@ class PostPresenter < Presenter
def preview_html
PostPresenter.preview(@post)
end
def medium_image_html(template, options = {})
return "" if @post.is_deleted? && !CurrentUser.user.is_janitor?
return "" if !Danbooru.config.can_user_see_post?(CurrentUser.user, @post)
template.render("posts/partials/show/medium_image", :post => @post)
end
def image_html(template)
return template.content_tag("p", "This image was deleted.") if @post.is_deleted? && !CurrentUser.user.is_janitor?

View File

@@ -36,12 +36,13 @@ private
html << %{<li class="category-#{categories[tag]}">}
current_query = template.params[:tags] || ""
if categories[tag] == 1
html << %{<a class="wiki-link" href="/artists/show_or_new?name=#{u(tag)}">?</a> }
else
html << %{<a class="wiki-link" href="/wiki_pages?title=#{u(tag)}">?</a> }
end
if CurrentUser.user.is_privileged?
if categories[tag] == 1
html << %{<a href="/artists/show_or_new?name=#{u(tag)}">?</a> }
else
html << %{<a href="/wiki_pages?title=#{u(tag)}">?</a> }
end
html << %{<a href="/posts?tags=#{u(current_query)}+#{u(tag)}" class="search-inc-tag">+</a> }
html << %{<a href="/posts?tags=#{u(current_query)}+-#{u(tag)}" class="search-exl-tag">&ndash;</a> }
end