added new landing page
This commit is contained in:
@@ -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?
|
||||
|
||||
@@ -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">–</a> }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user