Files
danbooru/app/views/wiki_pages/show.html.erb
2013-03-28 19:36:13 -04:00

52 lines
2.0 KiB
Plaintext

<div id="c-wiki-pages">
<div id="a-show">
<%= render "sidebar" %>
<section id="content">
<h1 id="wiki-page-title">
<%= @wiki_page.pretty_title %>
<% if @wiki_page.is_locked? %>
(locked)
<% end %>
</h1>
<div id="wiki-page-body" class="prose">
<%= format_text(@wiki_page.body) %>
<% if @wiki_page.presenter.antecedent_tag_alias %>
<p class="hint">This tag has been aliased to <%= link_to @wiki_page.presenter.antecedent_tag_alias.consequent_name, posts_path(:tags => @wiki_page.presenter.antecedent_tag_alias.consequent_name) %>.</p>
<% end %>
<% if @wiki_page.presenter.consequent_tag_aliases.any? %>
<p class="hint">The following tags are aliased to this tag: <%= raw @wiki_page.presenter.consequent_tag_aliases.map {|x| link_to(x.antecedent_name, posts_path(:tags => x.antecedent_name))}.join(", ") %>.</p>
<% end %>
<% if @wiki_page.presenter.antecedent_tag_implications.any? %>
<p class="hint">This tag has been implicated to <%= raw @wiki_page.presenter.antecedent_tag_implications.map {|x| link_to(x.consequent_name, posts_path(:tags => x.consequent_name))}.join(", ") %>.</p>
<% end %>
<% if @wiki_page.presenter.consequent_tag_implications.any? %>
<p class="hint">The following tags are implicated to this tag: <%= raw @wiki_page.presenter.consequent_tag_implications.map {|x| link_to(x.antecedent_name, posts_path(:tags => x.antecedent_name))}.join(", ") %>.</p>
<% end %>
</div>
<div id="wiki-page-posts">
<h2>Posts</h2>
<%= @wiki_page.post_set.presenter.post_previews_html(self) %>
</div>
</section>
</div>
</div>
<% content_for(:page_title) do %>
Wiki - <%= @wiki_page.pretty_title %> - <%= Danbooru.config.app_name %>
<% end %>
<% content_for(:html_header) do %>
<meta name="description" content="<%= @wiki_page.presenter.blurb %>"></meta>
<% end %>
<%= render "secondary_links" %>