Merge branch 'master' into close-accounts

This commit is contained in:
r888888888
2013-05-16 14:16:47 -07:00
129 changed files with 55250 additions and 462 deletions

View File

@@ -26,6 +26,13 @@ create implication aaa -> bbb
<%= text_field "batch", "forum_id" %>
</div>
<div class="input">
<label for="batch_rename_aliased_pages">
<%= check_box "batch", "rename_aliased_pages" %>
Automatically rename all wiki pages and artists for aliases in this batch
</label>
</div>
<%= submit_tag %>
<% end %>
</div>

View File

@@ -5,7 +5,7 @@
<th><label for="search_name">Name</label>
<td>
<div class="input">
<%= text_field "search", "name" %>
<%= text_field "search", "name", :value => params[:search][:name] %>
<span class="hint">You can search on any name or URL</span>
</div>
</td>
@@ -15,7 +15,7 @@
<th><label for="search_sort">Sort</label>
<td>
<div class="input">
<%= select "search", "sort", [["Date", "date"], ["Name", "name"]] %>
<%= select "search", "sort", [["Date", "date"], ["Name", "name"]], :selected => params[:search][:sort] %>
</div>
</td>
</tr>

View File

@@ -7,14 +7,14 @@
<li><%= link_to "Recent changes", artist_versions_path %></li>
<% if @artist && !@artist.new_record? %>
<li>|</li>
<li><%= link_to "Posts", posts_path(:tags => @artist.name) %></li>
<li><%= link_to "Posts (#{Post.fast_count(@artist.name)})", posts_path(:tags => @artist.name) %></li>
<li><%= link_to "Show", artist_path(@artist) %></li>
<% if CurrentUser.is_member? %>
<li><%= link_to "Edit", edit_artist_path(@artist) %></li>
<% end %>
<li><%= link_to "History", artist_versions_path(:search => {:artist_id => @artist.id}) %></li>
<% if CurrentUser.is_admin? %>
<%= link_to "Ban", ban_artist_path(@artist), :method => :put %>
<%= link_to "Ban", ban_artist_path(@artist), :method => :put, :confirm => "Are you sure you want to ban this artist?" %>
<% end %>
<% end %>
</menu>

View File

@@ -4,6 +4,7 @@
<%= form_tag(comments_path, :class => "simple_form") do %>
<%= hidden_field "comment", "post_id", :value => post.id %>
<%= dtext_field "comment", "body", :input_id => "comment_response_for_#{post.id}", :preview_id => "dtext-preview-for-#{post.id}" %>
<%= submit_tag "Post" %>
<%= dtext_preview_button "comment", "body", :input_id => "comment_response_for_#{post.id}", :preview_id => "dtext-preview-for-#{post.id}" %>
<%= submit_tag "Post" %> <%= check_box "comment", "do_not_bump_post", :id => "comment_do_not_bump_post_#{post.id}" %> <label for="comment_do_not_bump_post_<%= post.id %>">No bump</label>
<%= check_box "comment", "do_not_bump_post", :id => "comment_do_not_bump_post_#{post.id}" %> <label for="comment_do_not_bump_post_<%= post.id %>">No bump</label>
<% end %>

View File

@@ -19,7 +19,7 @@
<% if @post || @posts %>
<li><%= link_to "Reply", new_comment_path(:post_id => comment.post_id), :class => "reply-link", "data-comment-id" => comment.id %></li>
<% if comment.editable_by?(CurrentUser.user) %>
<li><%= link_to "Delete", comment_path(comment.id), :confirm => "Do you really want to delete this comment?", :method => :delete, :remote => true %></li>
<li><%= link_to "Delete", comment_path(comment.id), :confirm => "Are you sure you want to delete this comment?", :method => :delete, :remote => true %></li>
<li><%= link_to "Edit", edit_comment_path(comment.id) %></li>
<% end %>
<li id="comment-vote-up-link-for-<%= comment.id %>"><%= link_to "Vote up", comment_votes_path(:comment_id => comment.id, :score => "up"), :method => :post, :remote => true %></li>

View File

@@ -34,3 +34,7 @@
</table>
<%= numbered_paginator(@delayed_jobs) %>
<% content_for(:page_title) do %>
Delayed Jobs - <%= Danbooru.config.app_name %>
<% end %>

View File

@@ -1,6 +1,6 @@
<% content_for(:secondary_links) do %>
<menu>
<li><%= link_to "All", dmails_path %></li>
<li><%= link_to "All", dmails_path(:search => {:owner_id => CurrentUser.id}, :folder => "all") %></li>
<li><%= link_to "Received", dmails_path(:search => {:owner_id => CurrentUser.id, :to_id => CurrentUser.id}, :folder => "received") %></li>
<li><%= link_to "Sent", dmails_path(:search => {:owner_id => CurrentUser.id, :from_id => CurrentUser.id}, :folder => "sent") %></li>
<li><%= link_to "New", new_dmail_path %></li>

View File

@@ -1 +0,0 @@
<%= post.favorited_users.reverse_each.map{|user| link_to_user(user)}.join(", ").html_safe %>

View File

@@ -5,5 +5,11 @@
$("a#remove-from-favorites").show();
$("#score-for-post-<%= @post.id %>").html(<%= @post.score %>);
$("#favcount-for-post-<%= @post.id %>").html(<%= @post.fav_count %>);
<% if CurrentUser.is_gold? %>
$("#favlist").html("<%= escape_javascript(post_favlist(@post)) %>");
if (!$("#favlist").is(":visible")) {
$("#show-favlist-link").show();
}
<% end %>
Danbooru.notice("You have favorited this post");
<% end %>

View File

@@ -2,4 +2,10 @@ $("a#add-to-favorites").show();
$("a#remove-from-favorites").hide();
$("#score-for-post-<%= @post.id %>").html(<%= @post.score %>);
$("#favcount-for-post-<%= @post.id %>").html(<%= @post.fav_count %>);
<% if CurrentUser.is_gold? %>
$("#favlist").html("<%= escape_javascript(post_favlist(@post)) %>");
<% if @post.fav_count == 0 %>
$("#show-favlist-link, #hide-favlist-link, #favlist").hide();
<% end %>
<% end %>
Danbooru.notice("You have unfavorited this post");

View File

@@ -1,3 +0,0 @@
$("#favlist").html("<%= j(render(:partial => "favorites/favorited_users_list", :locals => { :post => @post }))%>");
$("#show-favlist-link").attr("href", "#").removeAttr("data-remote");

View File

@@ -1,5 +1,5 @@
<% if CurrentUser.is_janitor? || !forum_post.is_deleted? %>
<article data-forum-post-id="<%= forum_post.id %>">
<article id="forum_post_<%= forum_post.id %>" data-forum-post-id="<%= forum_post.id %>">
<div class="author">
<h4>
<%= link_to_user forum_post.creator %>
@@ -37,8 +37,11 @@
<li><%= link_to "Edit", edit_forum_post_path(forum_post.id) %></li>
<% end %>
<% end %>
<li><%= link_to "Parent", forum_topic_path(forum_post.topic, :page => forum_post.forum_topic_page) %></li>
<li><%= link_to "Permalink", forum_post_path(forum_post) %></li>
<% if params[:controller] == "forum_posts" %>
<li><%= link_to "Parent", forum_topic_path(forum_post.topic, :page => forum_post.forum_topic_page, :anchor => "forum_post_#{forum_post.id}") %></li>
<% else %>
<li><%= link_to "Permalink", forum_post_path(forum_post) %></li>
<% end %>
</menu>
</div>
<div class="clearfix"></div>

View File

@@ -7,8 +7,8 @@
<%= nav_link_to("Posts", posts_path) %>
<%= nav_link_to("Comments", comments_path(:group_by => "post")) %>
<%= nav_link_to("Notes", notes_path(:group_by => "post")) %>
<%= nav_link_to("Artists", artists_path(:search => {:order => "date"})) %>
<%= nav_link_to("Tags", tags_path(:search => {:order => "date"})) %>
<%= nav_link_to("Artists", artists_path) %>
<%= nav_link_to("Tags", tags_path) %>
<% if CurrentUser.is_moderator? %>
<%= nav_link_to("Aliases", tag_aliases_path) %>
<%= nav_link_to("Implications", tag_implications_path) %>

View File

@@ -11,7 +11,7 @@
<%= Danbooru.config.custom_html_header_content %>
<%= yield :html_header %>
</head>
<body>
<body lang="en">
<div id="page">
<%= yield :layout %>
</div>

View File

@@ -22,7 +22,7 @@
<%= raw Danbooru.config.custom_html_header_content %>
<%= yield :html_header %>
</head>
<body>
<body lang="en">
<header id="top">
<%= render "news_updates/listing" %>
@@ -56,11 +56,10 @@
<%= render "users/tos" %>
<% end %>
<%- if flash[:notice] -%>
<div class="ui-corner-all ui-state-highlight" id="notice"><%= flash[:notice] %></div>
<%- else -%>
<div class="ui-corner-all ui-state-highlight" id="notice" style="display: none;"></div>
<%- end -%>
<div class="ui-corner-all ui-state-highlight" id="notice" style="<%= "display: none;" unless flash[:notice] %>">
<span><%= flash[:notice] %></span>
<a href="#" id="close-notice-link">close</a>
</div>
<%= yield :layout %>
</div>

View File

@@ -1,5 +1,5 @@
<% cache("news-updates", :expires_in => 1.hour) do %>
<div id="news-updates" data-updated-at="<%= NewsUpdate.recent.first.try(:created_at).try(:strftime, "%Y-%m-%d") %>">
<div id="news-updates" data-id="<%= NewsUpdate.recent.first.try(:id) %>">
<ul>
<% NewsUpdate.recent.each do |news_update| %>
<li><%= news_update.created_at.strftime("%b %d") %>: <%= news_update.message.html_safe %></li>

View File

@@ -13,7 +13,7 @@
<tbody>
<% @news_updates.each do |news_update| %>
<tr id="news-update-<%= news_update.id %>">
<td><%= news_update.creator.name %></td>
<td><%= link_to_user news_update.creator %></td>
<td><%= news_update.message %></td>
<td><%= link_to "Edit", edit_news_update_path(news_update) %> | <%= link_to "Delete", news_update_path(news_update), :method => :delete %></td>
</tr>

View File

@@ -33,7 +33,7 @@
<td><%= compact_time pool_version.updated_at %></td>
<% if CurrentUser.is_member? %>
<td>
<%= link_to "Revert", revert_pool_path(pool_version.pool_id, :version => pool_version.id) %>
<%= link_to "Revert", revert_pool_path(pool_version.pool_id, :version_id => pool_version.id), :method => :put, :remote => true %>
</td>
<% end %>
</tr>

View File

@@ -5,7 +5,7 @@
<th><label for="search_name_matches">Name</label></th>
<td>
<div class="input">
<%= text_field "search", "name_matches" %>
<%= text_field "search", "name_matches", :value => params[:search][:name_matches] %>
</div>
</td>
</tr>
@@ -14,7 +14,7 @@
<th><label for="search_description_matches">Description</label></th>
<td>
<div class="input">
<%= text_field "search", "description_matches" %>
<%= text_field "search", "description_matches", :value => params[:search][:description_matches] %>
</div>
</td>
</tr>
@@ -23,7 +23,7 @@
<th><label for="search_creator_name">Creator</th>
<td>
<div class="input">
<%= text_field "search", "creator_name" %>
<%= text_field "search", "creator_name", :value => params[:search][:creator_name] %>
</div>
</td>
</tr>
@@ -32,7 +32,7 @@
<th><label for="search_sort">Order</th>
<td>
<div class="input">
<%= select "search", "sort", [["Last updated", "updated_at"], ["Name", "name"]] %>
<%= select "search", "sort", [["Last updated", "updated_at"], ["Name", "name"]], :selected => params[:search][:sort] %>
</div>
</td>
</tr>

View File

@@ -4,6 +4,8 @@
<h1>New Pool</h1>
<%= f.input :name %>
<%= f.input :description %>
<%= f.input :post_ids, :label => "Posts" %>
<%= f.input :is_active %>
<%= f.button :submit %>
<% end %>
</div>

View File

@@ -0,0 +1 @@
location.reload();

View File

@@ -3,8 +3,6 @@
<aside id="sidebar">
<%= render "posts/partials/common/search", :path => posts_path, :tags => params[:tags] %>
<%= render_advertisement("vertical") %>
<%= render "posts/partials/index/mode_menu" %>
<%= render "posts/partials/index/blacklist" %>
@@ -19,18 +17,16 @@
<section id="content" class="<%= Danbooru.config.can_see_ads?(CurrentUser.user) ? "with-ads" : "without-ads" %>">
<menu id="post-sections">
<li class="active"><a href="#posts" id="show-posts-link">Posts</a></li>
<li class="active"><a href="#" id="show-posts-link">Posts</a></li>
<% if @post_set.has_wiki? %>
<li><a href="#wiki-except" id="show-wiki-excerpt-link">Wiki</a></li>
<li><%= link_to "Wiki", wiki_page_path(@post_set.wiki_page), :id => "show-wiki-excerpt-link" %></li>
<% end %>
</menu>
<%= render "posts/partials/index/edit" %>
<%= render "wiki_pages/excerpt", :post_set => @post_set %>
<%= render "posts/partials/index/posts", :post_set => @post_set %>
<%= render_rss_advertisement("short", @post_set.has_explicit?) %>
</section>
<% content_for(:page_title) do %>

View File

@@ -1,6 +1,4 @@
<div id="posts">
<%= render_advertisement("horizontal") %>
<%= post_set.presenter.post_previews_html(self) %>
<%= numbered_paginator(post_set.posts) %>

View File

@@ -62,7 +62,7 @@
<div class="input">
<div>
<%= f.label :tag_string, "Tags" %>
<%= f.text_area :tag_string , :size => "50x5", :value => post.presenter.categorized_tag_string + " " %>
<%= f.text_area :tag_string, :size => "50x5", :value => post.presenter.categorized_tag_string + " " %>
</div>
<%= button_tag "Related tags", :id => "related-tags-button", :type => "button" %>

View File

@@ -15,10 +15,10 @@
<li>Rating: <%= post.pretty_rating %></li>
<li>Score: <span id="score-for-post-<%= post.id %>"><%= post.score %></span> <% if CurrentUser.is_gold? %>(vote <%= link_to "up", post_votes_path(:post_id => post.id, :score => "up"), :remote => true, :method => :post %>/<%= link_to "down", post_votes_path(:post_id => post.id, :score => "down"), :remote => true, :method => :post %>)<% end %></li>
<li>Favorites: <span id="favcount-for-post-<%= post.id %>"><%= post.fav_count %></span>
<% if CurrentUser.is_gold? && post.fav_count > 0 %>
<%= link_to "&raquo;".html_safe, favorites_path(:post_id => post.id), :remote => true, :id => "show-favlist-link" %>
<% if CurrentUser.is_gold? %>
<%= link_to "&raquo;".html_safe, "#", :id => "show-favlist-link" %>
<%= link_to "&laquo;".html_safe, "#", :id => "hide-favlist-link" %>
<div id="favlist"></div>
<div id="favlist"><%= post_favlist(post) %></div>
<% end %></li>
<li>
Status:

View File

@@ -26,7 +26,7 @@
<% if post.is_pending? %>
<div class="ui-corner-all ui-state-highlight notice notice-pending" id="pending-approval-notice">
This post is pending approval (<%= link_to "learn more", wiki_pages_path(:title => "help:post_moderation") %>)
This post is pending approval (<%= link_to "learn more", wiki_pages_path(:title => "about:mod_queue") %>)
<% if CurrentUser.is_janitor? && !post.disapproved_by?(CurrentUser.user) %>
<div class="quick-mod">
@@ -48,8 +48,8 @@
<% if post.parent_id %>
<div class="ui-corner-all ui-state-highlight notice notice-child">
<%= has_parent_message(post, @parent_post_set, @siblings_post_set) %>
<div id="has-parent-relationship-preview"><%= @parent_post_set.presenter.post_previews_html(self) %><%= @siblings_post_set.presenter.post_previews_html(self) %></div>
<%= has_parent_message(post, @parent_post_set) %>
<div id="has-parent-relationship-preview"><%= @parent_post_set.presenter.post_previews_html(self) %></div>
</div>
<% end %>

View File

@@ -1,9 +1,9 @@
<div id="search-seq-nav">
<ul>
<li class="active">
<%= link_to "&laquo;prev".html_safe, show_seq_post_path(post, :tags => params[:tags], :seq => "prev"), :rel => "prev", :class => "prev" %>
<%= link_to "&lsaquo;&thinsp;prev".html_safe, show_seq_post_path(post, :tags => params[:tags], :seq => "prev"), :rel => "prev", :class => "prev" %>
<span class="search-name">Search: <%= params[:tags] %></span>
<%= link_to "next&raquo;".html_safe, show_seq_post_path(post, :tags => params[:tags], :seq => "next"), :rel => "next", :class => "next" %>
<%= link_to "next&thinsp;&rsaquo;".html_safe, show_seq_post_path(post, :tags => params[:tags], :seq => "next"), :rel => "next", :class => "next" %>
</li>
</ul>
</div>

View File

@@ -3,8 +3,6 @@
<aside id="sidebar">
<%= render "posts/partials/common/search", :path => posts_path, :tags => params[:tags] %>
<%= render_advertisement("vertical") %>
<%= render "posts/partials/index/blacklist" %>
<section id="tag-list">
@@ -42,10 +40,9 @@
<%= render "posts/partials/show/notices", :post => @post %>
<%= render_advertisement("horizontal") %>
<section id="image-container" data-tags="<%= @post.tag_string %>" data-user="<%= @post.uploader_name %>" data-rating="<%= @post.rating %>" data-flags="<%= @post.status_flags %>">
<div id="note-container"></div>
<div id="note-preview"></div>
<%= @post.presenter.image_html(self) %>
</section>
@@ -78,8 +75,6 @@
<section id="share" style="display: none;">
<%= render "posts/partials/show/share", :post => @post %>
</section>
<%= render_rss_advertisement("long", @post.rating == "e") %>
</section>
</div>

View File

@@ -2,7 +2,7 @@
<div id="a-index">
<div class="search">
<%= form_tag(general_search_tag_aliases_path, :method => :get) do %>
<%= text_field_tag "query", params[:query] %>
<%= text_field_tag "query", params[:query], :value => params[:search][:name_matches] %>
<%= submit_tag "Search Aliases" %>
<%= submit_tag "Search Implications" %>
<% end %>

View File

@@ -2,7 +2,7 @@
<div id="a-index">
<div class="search">
<%= form_tag(general_search_tag_aliases_path, :method => :get) do %>
<%= text_field_tag "query", params[:query] %>
<%= text_field_tag "query", params[:query], :value => params[:search][:name_matches] %>
<%= submit_tag "Search Implications" %>
<%= submit_tag "Search Aliases" %>
<% end %>

View File

@@ -1,6 +1,6 @@
<%= simple_form_for(@tag_subscription) do |f| %>
<%= f.input :name %>
<%= f.input :tag_query, :as => :string %>
<%= f.input :tag_query %>
<div class="input">
<label for="tag_subscription_is_public">
<%= check_box "tag_subscription", "is_public" %>

View File

@@ -5,7 +5,7 @@
<th><label for="search_name_matches">Name</label></th>
<td>
<div class="input">
<%= text_field "search", "name_matches" %>
<%= text_field "search", "name_matches", :value => params[:search][:name_matches] %>
<span class="hint">Use * for wildcard</span>
</div>
</td>
@@ -15,7 +15,7 @@
<th><label for="search_category">Category</label></th>
<td>
<div class="input">
<%= select "search", "category", [""] + Danbooru.config.canonical_tag_category_mapping.to_a %>
<%= select "search", "category", [""] + Danbooru.config.canonical_tag_category_mapping.to_a, :selected => params[:search][:category] %>
</div>
</td>
</tr>
@@ -24,7 +24,7 @@
<th><label for="search_sort">Sort</label></th>
<td>
<div class="input">
<%= select "search", "sort", %w(count date name) %>
<%= select "search", "sort", %w(count date name), :selected => params[:search][:sort] %>
</div>
</td>
</tr>
@@ -33,7 +33,7 @@
<th><label for="search_hide_empty">Hide Empty</label></th>
<td>
<div class="input">
<%= select "search", "hide_empty", ["yes", "no"] %>
<%= select "search", "hide_empty", ["yes", "no"], :selected => params[:search][:hide_empty] %>
</div>
</td>
</tr>

View File

@@ -8,6 +8,7 @@
<li><%= link_to "Help", wiki_pages_path(:search => {:title => "help:tags"}) %></li>
<% if @tag %>
<li>|</li>
<li><%= link_to "Posts (#{Post.fast_count(@tag.name)})", posts_path(:tags => @tag.name) %></li>
<li><%= link_to "Edit", edit_tag_path(@tag) %></li>
<% if @tag.post_count < 1_000 %>
<li><%= link_to "Fix", new_tag_correction_path(:tag_id => @tag.id) %></li>

View File

@@ -3,9 +3,18 @@
<h1>Search User Feedbacks</h1>
<%= form_tag(user_feedbacks_path, :method => :get, :class => "simple_form") do %>
<%= search_field "user_name", :label => "User" %>
<%= search_field "creator_name", :label => "Creator" %>
<%= submit_tag "Search" %>
<div class="input">
<%= search_field "user_name", :label => "User" %>
<%= search_field "creator_name", :label => "Creator" %>
<label for="search_category">Category</label>
<%= select "search", "category", %w(positive negative neutral), :include_blank => true %>
</div>
<div class="input">
<%= submit_tag "Search" %>
</div>
<% end %>
</div>
</div>

View File

@@ -1,9 +1,9 @@
<div id="c-user-feedbacks">
<div id="a-show">
<h1>User Feedback For <%= @user_feedback.user_name %></h1>
<h1>User Feedback For <%= link_to_user @user_feedback.user %></h1>
<ul>
<li><strong>Creator</strong> <%= @user_feedback.creator.name %></li>
<li><strong>Creator</strong> <%= link_to_user @user_feedback.creator %></li>
<li><strong>Date</strong> <%= @user_feedback.created_at %></li>
<li><strong>Category</strong> <%= @user_feedback.category %></li>
<li><strong>Message</strong> <%= format_text @user_feedback.body %></li>

View File

@@ -1,5 +1,5 @@
<div class="ui-corner-all ui-state-error" id="ban-notice">
<h1>Your account has been temporarily banned</h1>
<p>Reason: <%= CurrentUser.user.ban.reason %></p>
<p>Your ban will expire in <%= time_ago_in_words(CurrentUser.user.ban.expires_at) %></p>
<p>Reason: <%= CurrentUser.user.recent_ban.reason %></p>
<p>Your ban will expire in <%= time_ago_in_words(CurrentUser.user.recent_ban.expires_at) %></p>
</div>

View File

@@ -16,7 +16,7 @@
<li><%= link_to "Edit subscriptions", tag_subscriptions_path %></li>
<% end %>
<li><%= link_to "Profile", user_path(CurrentUser.user) %></li>
<li><%= link_to "Messages #{CurrentUser.dmail_count}", dmails_path(:search => {:owner_id => CurrentUser.id, :to_id => CurrentUser.id}, :folder => "received") %></li>
<li><%= link_to "Messages #{CurrentUser.dmail_count}", dmails_current_folder_path %></li>
<% else %>
<li><%= link_to "Send message", new_dmail_path(:dmail => {:to_id => @user.id}) %></li>
<% end %>
@@ -28,7 +28,7 @@
<% if CurrentUser.is_moderator? %>
<li><%= link_to "Promote", edit_admin_user_path(@user) %></li>
<% if @user.is_banned? %>
<li><%= link_to "Unban", ban_path(@user.ban) %></li>
<li><%= link_to "Unban", ban_path(@user.recent_ban) %></li>
<% else %>
<li><%= link_to "Ban", new_ban_path(:ban => {:user_id => @user.id}) %></li>
<% end %>

View File

@@ -11,3 +11,7 @@
</div>
<%= render "wiki_pages/secondary_links" %>
<% content_for(:page_title) do %>
Wiki Page Versions Comparison - <%= @thispage.pretty_title %> - <%= Danbooru.config.app_name %>
<% end %>

View File

@@ -13,28 +13,9 @@
<%= 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 %>
<%= wiki_page_alias_and_implication_list(@wiki_page)%>
<% 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>
<%= wiki_page_post_previews(@wiki_page) %>
<div class="clearfix"></div>

View File

@@ -15,29 +15,10 @@
<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, 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 %>
<%= wiki_page_alias_and_implication_list(@wiki_page) %>
</div>
<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>
<%= wiki_page_post_previews(@wiki_page) %>
</section>
</div>
</div>

View File

@@ -0,0 +1,23 @@
<div id="c-wiki-pages">
<div id="a-show">
<%= render "sidebar" %>
<section id="content">
<h1 id="wiki-page-title"><%= params[:title] %></h1>
<div id="wiki-page-body" class="prose">
<p>This wiki page does not exist. <%= link_to "Create new wiki page", new_wiki_page_path(:wiki_page => {:title => params[:title]}) %>.</p>
</div>
<%= wiki_page_alias_and_implication_list(@wiki_page)%>
<%= wiki_page_post_previews(@wiki_page) %>
</section>
</div>
</div>
<%= render "secondary_links" %>
<% content_for(:page_title) do %>
Wiki - <%= params[:title] %> - <%= Danbooru.config.app_name %>
<% end %>