Merge pull request #3067 from evazion/fix-3065

Fix #3065: <div> id incorrect for certain controllers
This commit is contained in:
Albert Yi
2017-05-22 12:15:47 -07:00
committed by GitHub
34 changed files with 285 additions and 318 deletions

View File

@@ -42,7 +42,7 @@
<% end %>
<td><%= artist_version.is_active? %></td>
<% if artist_version.visible? %>
<td><ul><%= artist_version_urls_diff(artist_version) %></ul></td>
<td><%= artist_version_urls_diff(artist_version) %></td>
<% else %>
<td></td>
<% end %>

View File

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

View File

@@ -1,5 +1,5 @@
<div id="c-explore-posts">
<div id="a-index">
<div id="a-missed-searches">
<h1>Missed Searches (past seven days)</h1>
<table class="striped" width="100%">

View File

@@ -1,5 +1,5 @@
<div id="c-explore-posts">
<div id="a-index">
<div id="a-popular">
<h1>Popular: <%= @post_set.presenter.range_text %></h1>
<%= @post_set.presenter.nav_links(self) %>
@@ -18,4 +18,4 @@
<% content_for(:html_header) do %>
<meta name="description" content="The most popular posts per day">
<% end %>
<% end %>

View File

@@ -1,5 +1,5 @@
<div id="c-explore-posts">
<div id="a-index">
<div id="a-searches">
<h1>Popular Searches: <%= @search_service.date %> (by <%= @search_service.scale %>)</h1>
<table class="striped" width="100%">

View File

@@ -3,9 +3,13 @@
<h1>IP Addresses</h1>
<% if params[:search][:user_id].present? || params[:search][:user_name].present? %>
<%= render "ip_listing" %>
<div id="p-ip-listing">
<%= render "ip_listing" %>
</div>
<% else %>
<%= render "user_listing" %>
<div id="p-user-listing">
<%= render "user_listing" %>
</div>
<% end %>
</div>
</div>

View File

@@ -1,4 +1,4 @@
<div id="c-pools">
<div id="c-pool-versions">
<div id="a-diff">
<h1>Pool Version Comparison: <%= @pool_version.name %></h1>

View File

@@ -1,4 +1,4 @@
<div id="c-pools">
<div id="c-pool-versions">
<div id="a-index">
<h1>Pool History</h1>

View File

@@ -1,4 +1,4 @@
<div id="c-post-flags">
<div id="c-post-events">
<div id="a-index">
<h1>Flags &amp; Appeals</h1>

View File

@@ -1,5 +1,5 @@
<div id="c-post-versions">
<div id="a-index">
<div id="c-upload-tags-report">
<div id="a-show">
<h1>Upload tag changes report for <%= @user.pretty_name %></h1>
<table class="striped">
<thead>

View File

@@ -1,5 +1,5 @@
<div id="terms-of-service">
<div class="section">
<div id="c-static">
<div id="a-terms-of-service">
<h1>Rules</h1>
<p>Please read the following before using the site:</p>

View File

@@ -1,4 +1,4 @@
<div id="c-users">
<div id="c-user-reverts">
<div id="a-new">
<h1>Revert Changes</h1>

View File

@@ -1,5 +1,5 @@
<div id="c-users">
<div id="a-upgrade-information">
<div id="c-user-upgrades">
<div id="a-new">
<h1>Upgrade Account</h1>
<% unless params[:user_id] %>

View File

@@ -1,5 +1,5 @@
<div id="c-users">
<div id="a-upgrade-result">
<div id="c-user-upgrades">
<div id="a-show">
<% if flash[:success] %>
<h1>Congradulations!</h1>

View File

@@ -1,102 +0,0 @@
<div id="c-users">
<div id="a-upgrade-information">
<h1>Upgrade Your Account</h1>
<p class="copy">Want more searching power? Upgrade your account and become a power user of the best database of anime artwork on the internet.</p>
<div id="feature-comparison">
<table>
<thead>
<tr>
<th></th>
<th>Basic</th>
<th>Gold</th>
<th>Platinum</th>
</tr>
</thead>
<tbody>
<colgroup id="labels"></colgroup>
<colgroup id="basic"></colgroup>
<colgroup id="gold"></colgroup>
<colgroup id="platinum"></colgroup>
<tr>
<td>Cost</td>
<td>Free</td>
<td>$20<p class="cost-footnote">One time fee</p></td>
<td>$40<p class="cost-footnote">One time fee</p></td>
</tr>
<tr>
<td>Tag Limit</td>
<td>2</td>
<td>6</td>
<td>12</td>
</tr>
<tr>
<td>Favorite Limit</td>
<td>10,000</td>
<td>20,000</td>
<td>Unlimited</td>
</tr>
<tr>
<td>Page Limit</td>
<td>1,000</td>
<td>2,000</td>
<td>5,000</td>
</tr>
<% if SavedSearch.enabled? %>
<tr>
<td>Saved Searches</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<% end %>
<tr>
<td>See Censored Tags</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>API Hourly Limit</td>
<td>3,000</td>
<td>10,000</td>
<td>20,000</td>
</tr>
<tr>
<td>Database Timeout</td>
<td>3 sec</td>
<td>6 sec</td>
<td>9 sec</td>
</tr>
<tr>
<td>Variable Posts Per Page</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Name Changes</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
</tbody>
</table>
</div>
<p><strong>Upgrading from Gold to Platinum will only cost $20.</strong> If you have any further questions or concerns, feel free to contact me at <%= mail_to Danbooru.config.contact_email, nil, :encode => :javascript %>.</p>
<% if CurrentUser.user.level < User::Levels::GOLD %>
<%= stripe_button("Upgrade to Gold", 2000) %>
<%= stripe_button("Upgrade to Platinum", 4000) %>
<% elsif CurrentUser.user.level < User::Levels::PLATINUM %>
<%= stripe_button("Upgrade Gold to Platinum", 2000) %>
<% end %>
</div>
</div>
<%= render "secondary_links" %>
<% content_for(:page_title) do %>
Upgrade - <%= Danbooru.config.app_name %>
<% end %>

View File

@@ -0,0 +1,38 @@
<div id="p-global-listing">
<table width="100%" class="striped">
<thead>
<tr>
<th>Title</th>
<th width="3%">Del</th>
<th width="5%"></th>
<% if CurrentUser.is_moderator? %>
<th width="10%">IP Address</th>
<% end %>
<th width="26%">Last edited</th>
</tr>
</thead>
<tbody>
<% @wiki_page_versions.each do |wiki_page_version| %>
<tr>
<td class="category-<%= wiki_page_version.category_name %>">
<%= link_to wiki_page_version.title, wiki_page_version_path(wiki_page_version) %>
</td>
<td><%= wiki_page_version.is_deleted? ? "Y" : "" %></td>
<td><%= link_to "wiki", wiki_page_path(wiki_page_version.wiki_page_id) %></td>
<% if CurrentUser.is_moderator? %>
<td>
<%= link_to_ip wiki_page_version.updater_ip_addr %>
</td>
<% end %>
<td>
<%= compact_time(wiki_page_version.updated_at) %>
<% if wiki_page_version.updater %>
by
<%= link_to_user wiki_page_version.updater %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>

View File

@@ -0,0 +1,56 @@
<div id="p-page-listing">
<%= form_tag(diff_wiki_page_versions_path, :method => :get) do %>
<table width="100%" class="striped">
<thead>
<tr>
<th width="3%"></th>
<th width="2%"></th>
<th width="2%"></th>
<th>Title</th>
<th width="3%">Del</th>
<th width="5%"></th>
<% if CurrentUser.is_moderator? %>
<th width="10%">IP Address</th>
<% end %>
<th width="26%">Last edited</th>
</tr>
</thead>
<tbody>
<% @wiki_page_versions.each_with_index do |wiki_page_version, i| %>
<tr>
<td>
<% if i < @wiki_page_versions.length - 1 %>
<%= link_to "diff", diff_wiki_page_versions_path(:otherpage => wiki_page_version.id, :thispage => @wiki_page_versions[i + 1].id) %>
<% else %>
diff
<% end %>
</td>
<td><%= radio_button_tag "thispage", wiki_page_version.id, (i == 1) %></td>
<td><%= radio_button_tag "otherpage", wiki_page_version.id, (i == 0) %></td>
<td class="category-<%= wiki_page_version.category_name %>">
<%= link_to wiki_page_version.title, wiki_page_version_path(wiki_page_version) %>
</td>
<td><%= wiki_page_version.is_deleted? ? "Y" : "" %></td>
<td><%= link_to "wiki", wiki_page_path(wiki_page_version.wiki_page_id) %></td>
<% if CurrentUser.is_moderator? %>
<td>
<%= link_to_ip wiki_page_version.updater_ip_addr %>
</td>
<% end %>
<td>
<%= compact_time(wiki_page_version.updated_at) %>
<% if wiki_page_version.updater %>
by
<%= link_to_user wiki_page_version.updater %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= submit_tag "Diff" %>
<% end %>
</div>

View File

@@ -1,4 +1,4 @@
<div id="c-wiki-pages">
<div id="c-wiki-page-versions">
<div id="a-diff">
<h1>Wiki Page: <%= @thispage.title %></h1>

View File

@@ -1,77 +1,14 @@
<div id="c-wiki-pages">
<div id="c-wiki-page-versions">
<div id="a-index">
<%= render "wiki_pages/sidebar" %>
<section id="content">
<h1>Wiki Pages</h1>
<%= form_tag(diff_wiki_page_versions_path, :method => :get) do %>
<table width="100%" class="striped">
<thead>
<tr>
<% if params[:search] && params[:search][:wiki_page_id] && @wiki_page_versions.length > 1 %>
<th width="3%"></th>
<th width="2%"></th>
<th width="2%"></th>
<% end %>
<th>Title</th>
<th width="3%">Del</th>
<th width="5%"></th>
<% if CurrentUser.is_moderator? %>
<th width="10%">IP Address</th>
<% end %>
<th width="26%">Last edited</th>
</tr>
</thead>
<tbody>
<% @wiki_page_versions.each_with_index do |wiki_page_version, i| %>
<tr>
<% if params[:search] && params[:search][:wiki_page_id] && @wiki_page_versions.length > 1 %>
<td>
<% if i < @wiki_page_versions.length - 1 %>
<%= link_to "diff", diff_wiki_page_versions_path(:otherpage => wiki_page_version.id, :thispage => @wiki_page_versions[i + 1].id) %>
<% else %>
diff
<% end %>
</td>
<td>
<% if i == 1 %>
<%= radio_button_tag "thispage", wiki_page_version.id, :checked => true %>
<% else %>
<%= radio_button_tag "thispage", wiki_page_version.id %>
<% end %>
</td>
<td>
<% if i == 0 %>
<%= radio_button_tag "otherpage", wiki_page_version.id, :checked => true %>
<% else %>
<%= radio_button_tag "otherpage", wiki_page_version.id %>
<% end %>
</td>
<% end %>
<td class="category-<%= wiki_page_version.category_name %>"><%= link_to wiki_page_version.title, wiki_page_version_path(wiki_page_version) %></td>
<td><%= wiki_page_version.is_deleted? ? "Y" : "" %></td>
<td><%= link_to "wiki", wiki_page_path(wiki_page_version.wiki_page_id) %></td>
<% if CurrentUser.is_moderator? %>
<td>
<%= link_to_ip wiki_page_version.updater_ip_addr %>
</td>
<% end %>
<td>
<%= compact_time(wiki_page_version.updated_at) %>
<% if wiki_page_version.updater %>
by
<%= link_to_user wiki_page_version.updater %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% if params[:search] && params[:search][:wiki_page_id] %>
<%= submit_tag "Diff" %>
<% end %>
<% if params.dig(:search, :wiki_page_id).present? %>
<%= render "page_listing" %>
<% else %>
<%= render "global_listing" %>
<% end %>
<%= numbered_paginator(@wiki_page_versions) %>

View File

@@ -1,4 +1,4 @@
<div id="c-wiki-pages">
<div id="c-wiki-page-versions">
<div id="a-show">
<%= render "wiki_pages/sidebar" %>