Fix page controller and action IDs

- Also fix affected CSS and JS files
This commit is contained in:
BrokenEagle
2017-12-27 19:28:32 -08:00
parent b48d5e59ad
commit 31d3215dad
35 changed files with 374 additions and 332 deletions

View File

@@ -2,7 +2,7 @@
Danbooru.ForumPost = {}; Danbooru.ForumPost = {};
Danbooru.ForumPost.initialize_all = function() { Danbooru.ForumPost.initialize_all = function() {
if ($("#c-forum-topics #a-show").length) {; if ($("#c-forum-topics #a-show,#c-forum-posts #a-show").length) {;
this.initialize_edit_links(); this.initialize_edit_links();
Danbooru.keydown("e", "edit", function(e) { Danbooru.keydown("e", "edit", function(e) {

View File

@@ -1,4 +1,4 @@
#c-burs { #c-bulk-update-requests {
s.approved { s.approved {
color: green; color: green;
} }

View File

@@ -1,5 +1,5 @@
<div class="bans"> <div id="c-bans">
<div class="new"> <div id="a-edit">
<h1>Edit Ban</h1> <h1>Edit Ban</h1>
<%= render "form", :ban => @ban %> <%= render "form", :ban => @ban %>
</div> </div>

View File

@@ -1,5 +1,5 @@
<div class="bans"> <div id="c-bans">
<div class="show"> <div id="a-show">
<h1>Show Ban</h1> <h1>Show Ban</h1>
<ul style="margin-bottom: 1em;"> <ul style="margin-bottom: 1em;">
<li><strong>User</strong>: <%= link_to_user(@ban.user) %></li> <li><strong>User</strong>: <%= link_to_user(@ban.user) %></li>

View File

@@ -1,5 +1,5 @@
<div class="bulk-update-requests"> <div id="c-bulk-update-requests">
<div class="new"> <div id="a-edit">
<h1>Edit Bulk Update Request</h1> <h1>Edit Bulk Update Request</h1>
<%= render "form" %> <%= render "form" %>
</div> </div>

View File

@@ -1,4 +1,4 @@
<div id="c-burs"> <div id="c-bulk-update-requests">
<div id="a-index"> <div id="a-index">
<h1>Bulk Update Requests</h1> <h1>Bulk Update Requests</h1>

View File

@@ -1,5 +1,5 @@
<div class="bulk-update-requests"> <div id="c-bulk-update-requests">
<div class="new"> <div id="a-new">
<h1>New Bulk Update Request</h1> <h1>New Bulk Update Request</h1>
<%= render "form" %> <%= render "form" %>

View File

@@ -1,5 +1,5 @@
<div id="c-explore-posts"> <div id="c-explore-posts">
<div id="a-popular"> <div id="a-viewed">
<h1>Most Viewed - <%= @post_set.presenter.date %></h1> <h1>Most Viewed - <%= @post_set.presenter.date %></h1>
<%= render "posts/partials/common/inline_blacklist" %> <%= render "posts/partials/common/inline_blacklist" %>

View File

@@ -1,4 +1,4 @@
<div id="c-forum-topics"> <div id="c-forum-posts">
<div id="a-edit"> <div id="a-edit">
<h1>Edit Forum Post</h1> <h1>Edit Forum Post</h1>

View File

@@ -1,4 +1,4 @@
<div id="c-forum-topics"> <div id="c-forum-posts">
<div id="a-new"> <div id="a-new">
<% if @forum_topic %> <% if @forum_topic %>
<h1>Reply to <%= @forum_topic.title %></h1> <h1>Reply to <%= @forum_topic.title %></h1>

View File

@@ -1,4 +1,4 @@
<div id="c-forum-topics"> <div id="c-forum-posts">
<div id="a-search"> <div id="a-search">
<h1>Search Forum</h1> <h1>Search Forum</h1>
<%= form_tag(forum_posts_path, :method => :get, :class => "simple_form") do %> <%= form_tag(forum_posts_path, :method => :get, :class => "simple_form") do %>

View File

@@ -1,4 +1,4 @@
<div id="c-forum-topics"> <div id="c-forum-posts">
<div id="a-show" class="single-forum-post list-of-forum-posts"> <div id="a-show" class="single-forum-post list-of-forum-posts">
<h1>Topic: <%= @forum_post.topic.title %></h1> <h1>Topic: <%= @forum_post.topic.title %></h1>
<%= render "forum_post", :forum_post => @forum_post %> <%= render "forum_post", :forum_post => @forum_post %>

View File

@@ -1,4 +1,4 @@
<div id="c-users"> <div id="c-maintenance-user-dmail-filters">
<div id="a-edit"> <div id="a-edit">
<h1>Edit Message Filters</h1> <h1>Edit Message Filters</h1>

View File

@@ -1,19 +1,23 @@
<h1>Change Email</h1> <div id="c-maintenance-user-email-changes">
<div id="a-new">
<h1>Change Email</h1>
<p>You must confirm your password in order to change your email address.</p> <p>You must confirm your password in order to change your email address.</p>
<%= form_tag(maintenance_user_email_change_path, :class => "simple_form") do %> <%= form_tag(maintenance_user_email_change_path, :class => "simple_form") do %>
<div class="input"> <div class="input">
<label>New Email</label> <label>New Email</label>
<%= email_field :email_change, :email %> <%= email_field :email_change, :email %>
</div>
<div class="input">
<label>Password</label>
<%= password_field :email_change, :password %>
</div>
<div>
<%= submit_tag "Submit" %>
</div>
<% end %>
</div> </div>
</div>
<div class="input">
<label>Password</label>
<%= password_field :email_change, :password %>
</div>
<div>
<%= submit_tag "Submit" %>
</div>
<% end %>

View File

@@ -1,9 +1,13 @@
<h1>Unsubscribe</h1> <div id="c-maintenance-user-email-notifications">
<div id="a-show">
<h1>Unsubscribe</h1>
<p>Do you wish to stop receiving all email notifications?</p> <p>Do you wish to stop receiving all email notifications?</p>
<%= form_tag(maintenance_user_email_notification_path, :method => "delete") do %> <%= form_tag(maintenance_user_email_notification_path, :method => "delete") do %>
<%= hidden_field_tag "sig", params[:sig] %> <%= hidden_field_tag "sig", params[:sig] %>
<%= hidden_field_tag "user_id", params[:user_id] %> <%= hidden_field_tag "user_id", params[:user_id] %>
<%= submit_tag "Yes" %> <%= submit_tag "Yes" %>
<% end %> <% end %>
</div>
</div>

View File

@@ -1,4 +1,4 @@
<div id="c-users"> <div id="c-maintenance-user-passwords">
<div id="a-edit"> <div id="a-edit">
<h1>Change Password</h1> <h1>Change Password</h1>

View File

@@ -1,5 +1,5 @@
<div id="c-moderator-post-queues"> <div id="c-moderator-post-queues">
<div id="a-show"> <div id="a-random">
<div> <div>
<h1>Moderation Queue</h1> <h1>Moderation Queue</h1>

View File

@@ -1,5 +1,5 @@
<div id="c-news-updates"> <div id="c-news-updates">
<div id="a-new"> <div id="a-edit">
<h1>Edit Update</h1> <h1>Edit Update</h1>
<%= simple_form_for(@news_update) do |f| %> <%= simple_form_for(@news_update) do |f| %>

View File

@@ -1,33 +1,35 @@
<div> <div id="c-related-tags">
<h1>Related tags</h1> <div id="a-show">
<section> <h1>Related tags</h1>
<%= form_tag(related_tag_path, :method => :get) do %>
<%= text_field_tag "query", params[:query], :data => { :autocomplete => "tag" } %>
<%= select_tag "category", options_for_select([""] + TagCategory.canonical_mapping.map{|x| [x.first, x.first.downcase]}, params[:category]) %>
<%= submit_tag "Show"%>
<% end %>
</section>
<% if params[:query].present? %>
<section> <section>
<table class="striped"> <%= form_tag(related_tag_path, :method => :get) do %>
<thead> <%= text_field_tag "query", params[:query], :data => { :autocomplete => "tag" } %>
<tr> <%= select_tag "category", options_for_select([""] + TagCategory.canonical_mapping.map{|x| [x.first, x.first.downcase]}, params[:category]) %>
<th>Name</th> <%= submit_tag "Show"%>
</tr> <% end %>
</thead>
<tbody>
<% @query.tags_for_html.each do |tag, category| %>
<tr>
<td class="category-<%= category %>">
<%= link_to("?", show_or_new_wiki_pages_path(:title => tag)) %>
<%= link_to(tag, posts_path(:tags => tag)) %>
</td>
</tr>
<% end %>
</tbody>
</table>
</section> </section>
<% end %> <% if params[:query].present? %>
<section>
<table class="striped">
<thead>
<tr>
<th>Name</th>
</tr>
</thead>
<tbody>
<% @query.tags_for_html.each do |tag, category| %>
<tr>
<td class="category-<%= category %>">
<%= link_to("?", show_or_new_wiki_pages_path(:title => tag)) %>
<%= link_to(tag, posts_path(:tags => tag)) %>
</td>
</tr>
<% end %>
</tbody>
</table>
</section>
<% end %>
</div>
</div> </div>
<%= render "tags/secondary_links" %> <%= render "tags/secondary_links" %>

View File

@@ -1,5 +1,5 @@
<div id="c-reports"> <div id="c-reports">
<div id="a-down-voting-post-report"> <div id="a-down-voting-post">
<h1>Down Voting Post Report</h1> <h1>Down Voting Post Report</h1>
<p>This report uses stastistical analysis to determine if a user's uploads are being targeted by an attacker. It will take some time to generate so you will receive a DMail with the results when it finishes.</p> <p>This report uses stastistical analysis to determine if a user's uploads are being targeted by an attacker. It will take some time to generate so you will receive a DMail with the results when it finishes.</p>

View File

@@ -1,5 +1,5 @@
<div id="c-post-versions"> <div id="c-reports">
<div id="a-index"> <div id="a-post-versions-create">
<h1>Post Changes Report</h1> <h1>Post Changes Report</h1>
<p>Only the 1,000 most recent changes are displayed.</p> <p>Only the 1,000 most recent changes are displayed.</p>

View File

@@ -1,5 +1,5 @@
<div id="c-upload-tags-report"> <div id="c-reports">
<div id="a-show"> <div id="a-upload-tags">
<h1>Upload tag changes report for <%= @user.pretty_name %></h1> <h1>Upload tag changes report for <%= @user.pretty_name %></h1>
<%= render "posts/partials/common/inline_blacklist" %> <%= render "posts/partials/common/inline_blacklist" %>

View File

@@ -1,9 +1,13 @@
<h1>Contact</h1> <div id="c-static">
<div id="a-contact">
<h1>Contact</h1>
<h2>Questions &amp; Comments</h2> <h2>Questions &amp; Comments</h2>
<p>You can reach the administrator of this site at <%= mail_to Danbooru.config.contact_email, nil, :encode => :hex %>.</p> <p>You can reach the administrator of this site at <%= mail_to Danbooru.config.contact_email, nil, :encode => :hex %>.</p>
<% content_for(:page_title) do %> <% content_for(:page_title) do %>
Contact - <%= Danbooru.config.app_name %> Contact - <%= Danbooru.config.app_name %>
<% end %> <% end %>
</div>
</div>

View File

@@ -1,28 +1,32 @@
<h1>Tag Alias Correction: <%= @correction.antecedent_name %> -&gt; <%= @correction.consequent_name %></h1> <div id="c-tag-alias-corrections">
<div id="a-show">
<h1>Tag Alias Correction: <%= @correction.antecedent_name %> -&gt; <%= @correction.consequent_name %></h1>
<p>Because tag aliases are cached in memory, they may go out of sync. This action will clear out the cache and fix any lingering posts.</p> <p>Because tag aliases are cached in memory, they may go out of sync. This action will clear out the cache and fix any lingering posts.</p>
<% @correction.each_server do |server| %> <% @correction.each_server do |server| %>
<div style="margin-bottom: 1em;"> <div style="margin-bottom: 1em;">
<h2>Server: <%= server.hostname %></h2> <h2>Server: <%= server.hostname %></h2>
<ul> <ul>
<li><strong><%= link_to server.antecedent_name, posts_path(:tags => server.antecedent_name, :raw => true) %></strong> aliased to <strong><%= server.statistics_hash["antecedent_cache"] %></strong> in cache</li> <li><strong><%= link_to server.antecedent_name, posts_path(:tags => server.antecedent_name, :raw => true) %></strong> aliased to <strong><%= server.statistics_hash["antecedent_cache"] %></strong> in cache</li>
<li><strong><%= server.consequent_name %></strong> aliased to <strong><%= server.statistics_hash["consequent_cache"] %></strong> in cache</li> <li><strong><%= server.consequent_name %></strong> aliased to <strong><%= server.statistics_hash["consequent_cache"] %></strong> in cache</li>
<li><strong><%= server.antecedent_name %></strong> count is <%= server.statistics_hash["antecedent_count"] %></li> <li><strong><%= server.antecedent_name %></strong> count is <%= server.statistics_hash["antecedent_count"] %></li>
<li><strong><%= server.consequent_name %></strong> count is <%= server.statistics_hash["consequent_count"] %></li> <li><strong><%= server.consequent_name %></strong> count is <%= server.statistics_hash["consequent_count"] %></li>
</ul> </ul>
</div>
<% end %>
<p>You can try to fix this alias. This will clear the cache and re-save all posts associated with <strong><%= @correction.antecedent_name %></strong>.</p>
<%= form_tag(tag_alias_correction_path(:tag_alias_id => @correction.tag_alias_id)) do %>
<%= submit_tag "Fix" %>
<%= submit_tag "Cancel" %>
<% end %>
<%= render "tag_aliases/secondary_links" %>
<% content_for(:page_title) do %>
Tag Alias Correction - <%= Danbooru.config.app_name %>
<% end %>
</div> </div>
<% end %> </div>
<p>You can try to fix this alias. This will clear the cache and re-save all posts associated with <strong><%= @correction.antecedent_name %></strong>.</p>
<%= form_tag(tag_alias_correction_path(:tag_alias_id => @correction.tag_alias_id)) do %>
<%= submit_tag "Fix" %>
<%= submit_tag "Cancel" %>
<% end %>
<%= render "tag_aliases/secondary_links" %>
<% content_for(:page_title) do %>
Tag Alias Correction - <%= Danbooru.config.app_name %>
<% end %>

View File

@@ -1,5 +1,5 @@
<div id="c-tag-aliases"> <div id="c-tag-alias-requests">
<div id="a-request-new"> <div id="a-new">
<h1>Tag Alias Request</h1> <h1>Tag Alias Request</h1>
<%= error_messages_for :tag_alias_request %> <%= error_messages_for :tag_alias_request %>

View File

@@ -1,20 +1,24 @@
<h1>Tag Alias: <%= @tag_alias.antecedent_name %> -&gt; <%= @tag_alias.consequent_name %></h1> <div id="c-tag-aliases">
<div id="a-show">
<h1>Tag Alias: <%= @tag_alias.antecedent_name %> -&gt; <%= @tag_alias.consequent_name %></h1>
<ul> <ul>
<li><strong>From</strong> <%= link_to @tag_alias.antecedent_name, posts_path(:tags => @tag_alias.antecedent_name) %></li> <li><strong>From</strong> <%= link_to @tag_alias.antecedent_name, posts_path(:tags => @tag_alias.antecedent_name) %></li>
<li><strong>To</strong> <%= link_to @tag_alias.consequent_name, posts_path(:tags => @tag_alias.consequent_name) %></li> <li><strong>To</strong> <%= link_to @tag_alias.consequent_name, posts_path(:tags => @tag_alias.consequent_name) %></li>
<% if @tag_alias.forum_topic_id %> <% if @tag_alias.forum_topic_id %>
<li><strong>Reference</strong> <%= link_to "topic ##{@tag_alias.forum_topic_id}", forum_topic_path(@tag_alias.forum_topic_id) %></li> <li><strong>Reference</strong> <%= link_to "topic ##{@tag_alias.forum_topic_id}", forum_topic_path(@tag_alias.forum_topic_id) %></li>
<% end %> <% end %>
<li><strong>Creator</strong> <%= link_to_user @tag_alias.creator %></li> <li><strong>Creator</strong> <%= link_to_user @tag_alias.creator %></li>
<li><strong>Date</strong> <%= @tag_alias.created_at %></li> <li><strong>Date</strong> <%= @tag_alias.created_at %></li>
<% if @tag_alias.respond_to?(:reason) && @tag_alias.reason.present? %> <% if @tag_alias.respond_to?(:reason) && @tag_alias.reason.present? %>
<li><strong>Reason</strong> <%= format_text @tag_alias.reason %></li> <li><strong>Reason</strong> <%= format_text @tag_alias.reason %></li>
<% end %> <% end %>
</ul> </ul>
<%= render "tag_aliases/secondary_links" %> <%= render "tag_aliases/secondary_links" %>
<% content_for(:page_title) do %> <% content_for(:page_title) do %>
Tag Alias - <%= Danbooru.config.app_name %> Tag Alias - <%= Danbooru.config.app_name %>
<% end %> <% end %>
</div>
</div>

View File

@@ -1,23 +1,27 @@
<h1>Fix Tag: <%= @correction.tag.name %></h1> <div id="c-tag-corrections">
<div id="a-new">
<h1>Fix Tag: <%= @correction.tag.name %></h1>
<% @correction.each_server do |server| %> <% @correction.each_server do |server| %>
<div style="margin-bottom: 1em;"> <div style="margin-bottom: 1em;">
<h2>Server: <%= server.hostname %></h2> <h2>Server: <%= server.hostname %></h2>
<ul> <ul>
<li><strong>category actual</strong>: <%= @correction.tag.category %></li> <li><strong>category actual</strong>: <%= @correction.tag.category %></li>
<li><strong>category memcache</strong>: <%= server.statistics_hash["category_cache"] %></li> <li><strong>category memcache</strong>: <%= server.statistics_hash["category_cache"] %></li>
<li><strong>post count memcache</strong>: <%= server.statistics_hash["post_fast_count_cache"] %></li> <li><strong>post count memcache</strong>: <%= server.statistics_hash["post_fast_count_cache"] %></li>
<li><strong>post count db cache</strong>: <%= @correction.tag.post_count %></li> <li><strong>post count db cache</strong>: <%= @correction.tag.post_count %></li>
<li><strong>post count actual:</strong> <%= @correction.tag.real_post_count %></li> <li><strong>post count actual:</strong> <%= @correction.tag.real_post_count %></li>
</ul> </ul>
</div>
<% end %>
<%= form_tag(tag_correction_path(:tag_id => @correction.tag.id)) do %>
<%= submit_tag "Fix" %>
<%= submit_tag "Cancel" %>
<% end %>
<% content_for(:page_title) do %>
Tag Correction - <%= Danbooru.config.app_name %>
<% end %>
</div> </div>
<% end %> </div>
<%= form_tag(tag_correction_path(:tag_id => @correction.tag.id)) do %>
<%= submit_tag "Fix" %>
<%= submit_tag "Cancel" %>
<% end %>
<% content_for(:page_title) do %>
Tag Correction - <%= Danbooru.config.app_name %>
<% end %>

View File

@@ -1,5 +1,5 @@
<div id="c-tag-implications"> <div id="c-tag-implication-requests">
<div id="a-request-new"> <div id="a-new">
<h1>Tag Implication Request</h1> <h1>Tag Implication Request</h1>
<%= error_messages_for :tag_implication_request %> <%= error_messages_for :tag_implication_request %>

View File

@@ -1,5 +1,5 @@
<div id="c-tag-aliases"> <div id="c-tag-implications">
<div id="a-new"> <div id="a-edit">
<h1>Edit Tag Implication</h1> <h1>Edit Tag Implication</h1>
<%= error_messages_for :tag_implication %> <%= error_messages_for :tag_implication %>

View File

@@ -1,17 +1,21 @@
<h1>Tag Implication: <%= @tag_implication.antecedent_name %> -&gt; <%= @tag_implication.consequent_name %></h1> <div id="c-tag-implications">
<div id="a-show">
<h1>Tag Implication: <%= @tag_implication.antecedent_name %> -&gt; <%= @tag_implication.consequent_name %></h1>
<ul> <ul>
<li><strong>From</strong> <%= link_to @tag_implication.antecedent_name, posts_path(:tags => @tag_implication.antecedent_name) %></li> <li><strong>From</strong> <%= link_to @tag_implication.antecedent_name, posts_path(:tags => @tag_implication.antecedent_name) %></li>
<li><strong>To</strong> <%= link_to @tag_implication.consequent_name, posts_path(:tags => @tag_implication.consequent_name) %></li> <li><strong>To</strong> <%= link_to @tag_implication.consequent_name, posts_path(:tags => @tag_implication.consequent_name) %></li>
<% if @tag_implication.forum_topic_id %> <% if @tag_implication.forum_topic_id %>
<li><strong>Reference</strong> <%= link_to "topic ##{@tag_implication.forum_topic_id}", forum_topic_path(@tag_implication.forum_topic_id) %></li> <li><strong>Reference</strong> <%= link_to "topic ##{@tag_implication.forum_topic_id}", forum_topic_path(@tag_implication.forum_topic_id) %></li>
<% end %> <% end %>
<li><strong>Creator</strong> <%= link_to_user @tag_implication.creator %></li> <li><strong>Creator</strong> <%= link_to_user @tag_implication.creator %></li>
<li><strong>Date</strong> <%= @tag_implication.created_at %></li> <li><strong>Date</strong> <%= @tag_implication.created_at %></li>
<% if @tag_implication.respond_to?(:reason) && @tag_implication.reason.present? %> <% if @tag_implication.respond_to?(:reason) && @tag_implication.reason.present? %>
<li><strong>Reason</strong> <%= format_text @tag_implication.reason %></li> <li><strong>Reason</strong> <%= format_text @tag_implication.reason %></li>
<% end %> <% end %>
</ul> </ul>
</div>
</div>
<%= render "tag_implications/secondary_links" %> <%= render "tag_implications/secondary_links" %>

View File

@@ -1,41 +1,45 @@
<h1>Upload #<%= @upload.id %></h1> <div id="c-uploads">
<div id="a-show">
<h1>Upload #<%= @upload.id %></h1>
<ul>
<li>Date: <%= @upload.created_at %></li>
<li>Source: <%= @upload.source %></li>
<li>Tags: <%= @upload.tag_string %></li>
</ul>
<% if @upload.is_completed? %>
<p>This upload has finished processing. <%= link_to "View the post", post_path(@upload.post_id) %>.</p>
<% elsif @upload.is_pending? %>
<p>This upload is waiting to be processed. Please wait a few seconds.</p>
<% elsif @upload.is_processing? %>
<p>This upload is being processed. Please wait a few seconds.</p>
<% elsif @upload.is_duplicate? %>
<p>This upload is a duplicate: <%= link_to "post ##{@upload.duplicate_post_id}", post_path(@upload.duplicate_post_id) %></p>
<% else %>
<p>An error occurred: <%= @upload.status %></p>
<% if CurrentUser.user.is_builder? %>
<ul> <ul>
<% @upload.backtrace.to_s.split(/\n/).each do |line| %> <li>Date: <%= @upload.created_at %></li>
<li><%= line %></li> <li>Source: <%= @upload.source %></li>
<% end %> <li>Tags: <%= @upload.tag_string %></li>
</ul> </ul>
<% end %>
<% if @upload.is_downloadable? %>
<%= form_tag(upload_path(@upload), :method => :put) do %>
<% submit_tag "Retry" %>
<% end %>
<% end %>
<% end %>
<p> <% if @upload.is_completed? %>
You can <%= link_to "upload another file", new_upload_path %> or <%= link_to "view your current uploads", uploads_path(:search => {:uploader_id => CurrentUser.id}) %>. <p>This upload has finished processing. <%= link_to "View the post", post_path(@upload.post_id) %>.</p>
<% if CurrentUser.user.is_moderator? && @upload.is_pending? %> <% elsif @upload.is_pending? %>
<%= link_to "Force update", upload_path(@upload, :format => "js"), :remote => true, :method => :put %>. <p>This upload is waiting to be processed. Please wait a few seconds.</p>
<% end %> <% elsif @upload.is_processing? %>
</p> <p>This upload is being processed. Please wait a few seconds.</p>
<% elsif @upload.is_duplicate? %>
<p>This upload is a duplicate: <%= link_to "post ##{@upload.duplicate_post_id}", post_path(@upload.duplicate_post_id) %></p>
<% else %>
<p>An error occurred: <%= @upload.status %></p>
<% if CurrentUser.user.is_builder? %>
<ul>
<% @upload.backtrace.to_s.split(/\n/).each do |line| %>
<li><%= line %></li>
<% end %>
</ul>
<% end %>
<% if @upload.is_downloadable? %>
<%= form_tag(upload_path(@upload), :method => :put) do %>
<% submit_tag "Retry" %>
<% end %>
<% end %>
<% end %>
<p>
You can <%= link_to "upload another file", new_upload_path %> or <%= link_to "view your current uploads", uploads_path(:search => {:uploader_id => CurrentUser.id}) %>.
<% if CurrentUser.user.is_moderator? && @upload.is_pending? %>
<%= link_to "Force update", upload_path(@upload, :format => "js"), :remote => true, :method => :put %>.
<% end %>
</p>
</div>
</div>
<%= render "posts/partials/common/secondary_links" %> <%= render "posts/partials/common/secondary_links" %>

View File

@@ -1,5 +1,5 @@
<div id="c-user-feedbacks"> <div id="c-user-feedbacks">
<div id="a-new"> <div id="a-edit">
<h1>Edit User Feedback</h1> <h1>Edit User Feedback</h1>
<div id="preview"> <div id="preview">

View File

@@ -1,46 +1,48 @@
<div id="c-user-name-change-requests"> <div id="c-user-name-change-requests">
<h1>Name Change Requests</h1> <div id="a-index">
<h1>Name Change Requests</h1>
<table class="striped" width="100%">
<thead> <table class="striped" width="100%">
<tr> <thead>
<th>User</th>
<th>Request</th>
<th>Reason</th>
<th>Status</th>
<th>Date</th>
<th></th>
</tr>
</thead>
<tbody>
<% @change_requests.each do |change_request| %>
<tr> <tr>
<td><%= link_to_user change_request.user %></td> <th>User</th>
<td> <th>Request</th>
<strong><%= change_request.original_name %></strong> -> <th>Reason</th>
<strong><%= change_request.desired_name %></strong> <th>Status</th>
</td> <th>Date</th>
<td> <th></th>
<% if CurrentUser.is_admin? || CurrentUser.user == change_request.user %>
<%= change_request.change_reason %>
<% end %>
</td>
<td>
<%= change_request.status %>
<% if change_request.approved? %>
by <%= link_to_user change_request.approver %>
<% elsif change_request.rejected? %>
for reason: <%= link_to change_request.rejection_reason %>
<% end %>
</td>
<td><%= compact_time change_request.created_at %></td>
<td><%= link_to "view", user_name_change_request_path(change_request) %></td>
</tr> </tr>
<% end %> </thead>
</tbody> <tbody>
</table> <% @change_requests.each do |change_request| %>
<tr>
<%= numbered_paginator(@change_requests) %> <td><%= link_to_user change_request.user %></td>
<td>
<strong><%= change_request.original_name %></strong> ->
<strong><%= change_request.desired_name %></strong>
</td>
<td>
<% if CurrentUser.is_admin? || CurrentUser.user == change_request.user %>
<%= change_request.change_reason %>
<% end %>
</td>
<td>
<%= change_request.status %>
<% if change_request.approved? %>
by <%= link_to_user change_request.approver %>
<% elsif change_request.rejected? %>
for reason: <%= link_to change_request.rejection_reason %>
<% end %>
</td>
<td><%= compact_time change_request.created_at %></td>
<td><%= link_to "view", user_name_change_request_path(change_request) %></td>
</tr>
<% end %>
</tbody>
</table>
<%= numbered_paginator(@change_requests) %>
</div>
</div> </div>
<%= render "secondary_links" %> <%= render "secondary_links" %>

View File

@@ -1,20 +1,24 @@
<h1>Name Change Request</h1> <div id="c-user-name-change-requests">
<div id="a-new">
<h1>Name Change Request</h1>
<p>You can request a name change once per week. Your previous names will still <p>You can request a name change once per week. Your previous names will still
be visible on your profile to other Danbooru members, but they won't be visible be visible on your profile to other Danbooru members, but they won't be visible
to search engines.</p> to search engines.</p>
<%= error_messages_for "change_request" %> <%= error_messages_for "change_request" %>
<%= form_tag(user_name_change_requests_path, :class => "simple_form") do %> <%= form_tag(user_name_change_requests_path, :class => "simple_form") do %>
<div class="input"> <div class="input">
<label for="desired_name">Desired Name</label> <label for="desired_name">Desired Name</label>
<%= text_field_tag "desired_name" %> <%= text_field_tag "desired_name" %>
</div>
<div class="input">
<%= submit_tag "Submit", :data => { :disable_with => "Submitting..." } %>
</div>
<% end %>
</div> </div>
</div>
<div class="input">
<%= submit_tag "Submit", :data => { :disable_with => "Submitting..." } %>
</div>
<% end %>
<%= render "secondary_links" %> <%= render "secondary_links" %>

View File

@@ -1,88 +1,90 @@
<div id="c-user-name-change-requests"> <div id="c-user-name-change-requests">
<h1>Name Change Request</h1> <div id="a-show">
<h1>Name Change Request</h1>
<table class="aligned-vertical"> <table class="aligned-vertical">
<tbody> <tbody>
<tr> <tr>
<th>Date</th> <th>Date</th>
<td> <td>
<%= compact_time @change_request.created_at %> <%= compact_time @change_request.created_at %>
<% if @change_request.updated_at - @change_request.created_at > 5.minutes %> <% if @change_request.updated_at - @change_request.created_at > 5.minutes %>
(updated <%= time_ago_in_words_tagged @change_request.updated_at %>) (updated <%= time_ago_in_words_tagged @change_request.updated_at %>)
<% end %>
</td>
</tr>
<tr>
<th>User</th>
<td><%= link_to_user @change_request.user %></td>
</tr>
<tr>
<th>Request</th>
<td>
<strong><%= @change_request.original_name %></strong> ->
<strong><%= @change_request.desired_name %></strong>
</td>
</tr>
<tr>
<th>Reason</th>
<td><%= @change_request.change_reason %></td>
</tr>
<tr>
<th>Status</th>
<td>
<%= @change_request.status %>
<% if @change_request.approved? %>
by <%= link_to_user @change_request.approver %>
<% elsif @change_request.rejected? %>
for reason: <%= link_to @change_request.rejection_reason %>
<% end %>
</td>
</tr>
</tbody>
</table>
<% if @change_request.pending? && CurrentUser.user.is_admin? %>
<section>
<h2>Feedback</h2>
<ul>
<% @change_request.feedback.each do |feedback| %>
<li class="feedback-category-<%= feedback.category %>">
<p><%= feedback.body %></p>
<p class="info">Submitted by <%= link_to_user feedback.creator.name %> <%= time_ago_in_words_tagged feedback.created_at %></p>
</li>
<% end %> <% end %>
</td> </ul>
</tr> </section>
<tr>
<th>User</th> <section>
<td><%= link_to_user @change_request.user %></td> <h2>Statistics</h2>
</tr> <ul>
<tr> <li>Level: <%= @change_request.user.level_string %></li>
<th>Request</th> <li>Uploads: <%= link_to @change_request.user.post_upload_count, posts_path("user:#{@change_request.user.name}") %></li>
<td> <li>Updates: <%= link_to @change_request.user.post_update_count, post_versions_path(:search => {:updater_id => @change_request.user.id}) %></li>
<strong><%= @change_request.original_name %></strong> -> <li>Notes: <%= link_to @change_request.user.note_update_count, note_versions_path(:search => {:updater_id => @change_request.user.id}) %></li>
<strong><%= @change_request.desired_name %></strong> <li>Favorites: <%= @change_request.user.favorite_count %></li>
</td> </ul>
</tr> </section>
<tr>
<th>Reason</th> <section>
<td><%= @change_request.change_reason %></td> <h2>Options</h2>
</tr> <%= form_tag(approve_user_name_change_request_path(@change_request)) do %>
<tr> <%= submit_tag "Approve" %>
<th>Status</th>
<td>
<%= @change_request.status %>
<% if @change_request.approved? %>
by <%= link_to_user @change_request.approver %>
<% elsif @change_request.rejected? %>
for reason: <%= link_to @change_request.rejection_reason %>
<% end %>
</td>
</tr>
</tbody>
</table>
<% if @change_request.pending? && CurrentUser.user.is_admin? %>
<section>
<h2>Feedback</h2>
<ul>
<% @change_request.feedback.each do |feedback| %>
<li class="feedback-category-<%= feedback.category %>">
<p><%= feedback.body %></p>
<p class="info">Submitted by <%= link_to_user feedback.creator.name %> <%= time_ago_in_words_tagged feedback.created_at %></p>
</li>
<% end %> <% end %>
</ul>
</section>
<section> <%= form_tag(reject_user_name_change_request_path(@change_request), :class => "simple_form") do %>
<h2>Statistics</h2> <div class="input">
<ul> <label>Reason</label>
<li>Level: <%= @change_request.user.level_string %></li> <%= text_field_tag "reason" %>
<li>Uploads: <%= link_to @change_request.user.post_upload_count, posts_path("user:#{@change_request.user.name}") %></li> </div>
<li>Updates: <%= link_to @change_request.user.post_update_count, post_versions_path(:search => {:updater_id => @change_request.user.id}) %></li>
<li>Notes: <%= link_to @change_request.user.note_update_count, note_versions_path(:search => {:updater_id => @change_request.user.id}) %></li>
<li>Favorites: <%= @change_request.user.favorite_count %></li>
</ul>
</section>
<section> <div class="input">
<h2>Options</h2> <%= submit_tag "Reject" %>
<%= form_tag(approve_user_name_change_request_path(@change_request)) do %> </div>
<%= submit_tag "Approve" %> <% end %>
<% end %> </section>
<% end %>
<%= form_tag(reject_user_name_change_request_path(@change_request), :class => "simple_form") do %> </div>
<div class="input">
<label>Reason</label>
<%= text_field_tag "reason" %>
</div>
<div class="input">
<%= submit_tag "Reject" %>
</div>
<% end %>
</section>
<% end %>
</div> </div>
<%= render "secondary_links" %> <%= render "secondary_links" %>