Files
danbooru/app/views/posts/index.html.erb
2019-09-30 00:58:34 -05:00

76 lines
2.7 KiB
Plaintext

<% content_for(:sidebar) do %>
<%= render "posts/partials/common/search", :path => posts_path, :tags => params[:tags], :tags_dom_id => "tags" %>
<%= render "posts/partials/index/mode_menu" %>
<%= render "posts/partials/index/blacklist" %>
<section id="tag-box">
<h1>Tags</h1>
<%= @post_set.presenter.tag_list_html(current_query: params[:tags], show_extra_links: CurrentUser.user.is_gold?) %>
</section>
<section id="tag-box">
<h1>Share</h1>
<%= render "posts/partials/index/share" %>
</section>
<%= render "posts/partials/index/options" %>
<%= render "posts/partials/index/related" %>
<% end %>
<% content_for(:content) do %>
<menu id="post-sections">
<li class="active"><a href="#" id="show-posts-link">Posts</a></li>
<% if @post_set.artist.present? %>
<li><%= link_to "Artist", artist_path(@post_set.artist), :id => "show-excerpt-link" %></li>
<% elsif @post_set.wiki_page.present? %>
<li><%= link_to "Wiki", wiki_page_path(@post_set.wiki_page), :id => "show-excerpt-link" %></li>
<% elsif @post_set.has_pool? %>
<li><%= link_to "Pool", pool_path(@post_set.pool), :id => "show-excerpt-link" %></li>
<% elsif @post_set.has_favgroup? %>
<li><%= link_to "Favorite Group", favorite_group_path(@post_set.favgroup), :id => "show-excerpt-link" %></li>
<% elsif @post_set.has_blank_wiki? %>
<li><%= link_to "Wiki", new_wiki_page_path(wiki_page: { title: @post_set.tag_string }), id: "show-excerpt-link" %></li>
<% end %>
<li id="searchbox-redirect-link" class="mobile-only"><a href="#search-box">Search &raquo;</a></li>
</menu>
<%= render "posts/partials/index/edit" %>
<%= render "posts/partials/index/excerpt", :post_set => @post_set %>
<%= render "posts/partials/index/posts", :post_set => @post_set %>
<% end %>
<%= post_search_count_js %>
<div id="saved-searches-nav">
<%= render "saved_searches/interface" %>
</div>
<% if params[:tags] =~ /search:/ %>
<%= render "saved_searches/secondary_links" %>
<% else %>
<%= render "posts/partials/common/secondary_links" %>
<% end %>
<% content_for(:page_title) do %>
<% if @post_set.tag_string.present? %>
<%= @post_set.humanized_tag_string %> - <%= Danbooru.config.app_name %>
<% else %>
<%= Danbooru.config.app_name %>
<% end %>
<% end %>
<% content_for(:html_header) do %>
<%= tag.link href: posts_path(format: "atom", tags: params[:tags]), rel: "alternate", title: "ATOM", type: "application/atom+xml" %>
<%= tag.link rel: "next", href: next_page_url %>
<% if prev_page_url %>
<%= tag.link rel: "prev", href: prev_page_url %>
<% end %>
<%= missed_post_search_count_js %>
<%= render "posts/partials/index/seo_meta_tags" %>
<% end %>