Files
danbooru/app/views/wiki_pages/new.html.erb
2013-04-11 12:14:47 -04:00

50 lines
2.1 KiB
Plaintext

<div id="c-wiki-pages">
<div id="a-new">
<%= render "sidebar" %>
<section id="content">
<h1>New Wiki Page</h1>
<% if @wiki_page.title.present? %>
<div class="ui-corner-all ui-state-highlight notice">
This wiki page does not yet exist. The form below will allow you to create a new page for <%= @wiki_page.title %>. It will act as an explanation on how to use the tag for other users on the site.
</div>
<% end %>
<%= render "form" %>
<% 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, show_or_new_wiki_pages_path(:title => @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, show_or_new_wiki_pages_path(:title => 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, show_or_new_wiki_pages_path(:title => 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, show_or_new_wiki_pages_path(:title => x.antecedent_name))}.join(", ") %>.</p>
<% end %>
<div id="wiki-page-posts">
<% if Post.fast_count(@wiki_page.title) > 0 %>
<h2>Posts</h2>
<% end %>
<%= @wiki_page.post_set.presenter.post_previews_html(self) %>
</div>
<div class="clearfix"></div>
</section>
</div>
</div>
<%= render "secondary_links" %>
<% content_for(:page_title) do %>
New Wiki Page - <%= Danbooru.config.app_name %>
<% end %>