hide more pages for banned artists #2132

This commit is contained in:
r888888888
2016-01-27 17:02:03 -08:00
parent eadcaaa32a
commit b8f14b6fee
12 changed files with 117 additions and 87 deletions

View File

@@ -24,11 +24,15 @@
<tbody>
<% @artist_versions.each do |artist_version| %>
<tr class="<%= cycle 'even', 'odd' %>">
<td>
<%= link_to artist_version.name, artist_path(artist_version.artist_id) %>
</td>
<td><%= artist_version_other_names_diff(artist_version) %></td>
<td><%= artist_version.group_name %></td>
<% if artist_version.visible? %>
<td><%= link_to artist_version.name, artist_path(artist_version.artist_id) %></td>
<td><%= artist_version_other_names_diff(artist_version) %></td>
<td><%= artist_version.group_name %></td>
<% else %>
<td></td>
<td></td>
<td></td>
<% end %>
<td><%= compact_time artist_version.created_at %></td>
<td><%= link_to_user artist_version.updater %></td>
<% if CurrentUser.is_moderator? %>
@@ -37,11 +41,11 @@
</td>
<% end %>
<td><%= artist_version.is_active? %></td>
<td>
<ul>
<%= artist_version_urls_diff(artist_version) %>
</ul>
</td>
<% if artist_version.visible? %>
<td><ul><%= artist_version_urls_diff(artist_version) %></ul></td>
<% else %>
<td></td>
<% end %>
<% if CurrentUser.is_member? %>
<td>
<%= link_to "Revert to", revert_artist_path(artist_version.artist_id, :version_id => artist_version.id), :method => :put, :data => {:confirm => "Are you sure you want to revert to this version?"} %>

View File

@@ -1,7 +1,12 @@
<div id="c-artists">
<div id="a-edit">
<h1>Edit Artist</h1>
<%= render "form" %>
<% if @artist.visible? %>
<%= render "form" %>
<% else %>
<p>The artist requested removal of this page.</p>
<% end %>
</div>
</div>

View File

@@ -2,7 +2,7 @@
<div id="a-show">
<h1>Artist: <%= link_to @artist.pretty_name, posts_path(:tags => @artist.name), :class => "tag-type-#{@artist.category_name}" %></h1>
<% if @artist.notes.present? && (!@artist.is_banned? || CurrentUser.user.is_member?) %>
<% if @artist.notes.present? && @artist.visible? %>
<div class="prose">
<%= format_text(@artist.notes) %>
</div>
@@ -10,34 +10,39 @@
<p><%= link_to "View wiki page", @artist.wiki_page %></p>
<% end %>
<div>
<ul>
<li><strong>Status</strong> <%= @artist.status %></li>
<% if @artist.visible? %>
<div>
<ul>
<li><strong>Status</strong> <%= @artist.status %></li>
<% if !@artist.is_banned? || CurrentUser.user.is_member? %>
<% if @artist.has_tag_alias? %>
<li><strong>Tag Alias</strong> <%= @artist.tag_alias_name %></li>
<% if !@artist.is_banned? || CurrentUser.user.is_member? %>
<% if @artist.has_tag_alias? %>
<li><strong>Tag Alias</strong> <%= @artist.tag_alias_name %></li>
<% end %>
<% if @artist.other_names.present? %>
<li><strong>Other Names</strong> <%= link_to_artists(@artist.other_names.split(/ /)) %></li>
<% end %>
<% if @artist.group_name.present? %>
<li><strong>Group</strong> <%= link_to_artist(@artist.group_name) %></li>
<% end %>
<% if @artist.members.any? %>
<li><strong>Members</strong> <%= link_to_artists(@artist.members.map(&:name)) %></li>
<% end %>
<% @artist.urls.each do |url| %>
<li>
URL: <%= link_to h(url.to_s), h(url.to_s) %>
<% if CurrentUser.user.is_moderator? %>
(<%= link_to("mass edit", edit_moderator_tag_path(:antecedent => "-#{@artist.name} source:#{ArtistUrl.normalize_for_search(url.to_s)}", :consequent => @artist.name)) %>)
<% end %>
</li>
<% end %>
<% end %>
<% if @artist.other_names.present? %>
<li><strong>Other Names</strong> <%= link_to_artists(@artist.other_names.split(/ /)) %></li>
<% end %>
<% if @artist.group_name.present? %>
<li><strong>Group</strong> <%= link_to_artist(@artist.group_name) %></li>
<% end %>
<% if @artist.members.any? %>
<li><strong>Members</strong> <%= link_to_artists(@artist.members.map(&:name)) %></li>
<% end %>
<% @artist.urls.each do |url| %>
<li>
URL: <%= link_to h(url.to_s), h(url.to_s) %>
<% if CurrentUser.user.is_moderator? %>
(<%= link_to("mass edit", edit_moderator_tag_path(:antecedent => "-#{@artist.name} source:#{ArtistUrl.normalize_for_search(url.to_s)}", :consequent => @artist.name)) %>)
<% end %>
</li>
<% end %>
<% end %>
</ul>
</div>
</ul>
</div>
<% else %>
<p>The artist requested removal of this page.</p>
<% end %>
<%= render "secondary_links" %>
</div>

View File

@@ -4,43 +4,45 @@
<div id="excerpt" style="display: none;">
<% if post_set.has_artist? %>
<% unless post_set.artist.notes.blank? %>
<div class="prose">
<%= format_text(post_set.artist.notes) %>
<% if post_set.artist.visible? %>
<% unless post_set.artist.notes.blank? %>
<div class="prose">
<%= format_text(post_set.artist.notes) %>
</div>
<p><%= link_to "View wiki page", post_set.artist.wiki_page %></p>
<% end %>
<div>
<ul>
<li><strong>Status</strong> <%= post_set.artist.status %></li>
<% if post_set.artist.has_tag_alias? %>
<li><strong>Tag Alias</strong> <%= post_set.artist.tag_alias_name %></li>
<% end %>
<% if post_set.artist.other_names.present? %>
<li><strong>Other Names</strong> <%= link_to_artists(post_set.artist.other_names.split(/ /)) %></li>
<% end %>
<% if post_set.artist.group_name.present? %>
<li><strong>Group</strong> <%= link_to_artist(post_set.artist.group_name) %></li>
<% end %>
<% if post_set.artist.members.any? %>
<li><strong>Members</strong> <%= link_to_artists(post_set.artist.members.map(&:name)) %></li>
<% end %>
<% post_set.artist.urls.each do |url| %>
<li>
URL: <%= link_to h(url.to_s), h(url.to_s) %>
<% if CurrentUser.user.is_moderator? %>
(<%= link_to("mass edit", edit_moderator_tag_path(:antecedent => "-#{post_set.artist.name} source:#{ArtistUrl.normalize_for_search(url.to_s)}", :consequent => post_set.artist.name)) %>)
<% end %>
</li>
<% end %>
</ul>
<%= artist_alias_and_implication_list(post_set.artist) %>
<p><%= link_to "View artist", artist_path(post_set.artist.id) %></p>
</div>
<p><%= link_to "View wiki page", post_set.artist.wiki_page %></p>
<% end %>
<div>
<ul>
<li><strong>Status</strong> <%= post_set.artist.status %></li>
<% if post_set.artist.has_tag_alias? %>
<li><strong>Tag Alias</strong> <%= post_set.artist.tag_alias_name %></li>
<% end %>
<% if post_set.artist.other_names.present? %>
<li><strong>Other Names</strong> <%= link_to_artists(post_set.artist.other_names.split(/ /)) %></li>
<% end %>
<% if post_set.artist.group_name.present? %>
<li><strong>Group</strong> <%= link_to_artist(post_set.artist.group_name) %></li>
<% end %>
<% if post_set.artist.members.any? %>
<li><strong>Members</strong> <%= link_to_artists(post_set.artist.members.map(&:name)) %></li>
<% end %>
<% post_set.artist.urls.each do |url| %>
<li>
URL: <%= link_to h(url.to_s), h(url.to_s) %>
<% if CurrentUser.user.is_moderator? %>
(<%= link_to("mass edit", edit_moderator_tag_path(:antecedent => "-#{post_set.artist.name} source:#{ArtistUrl.normalize_for_search(url.to_s)}", :consequent => post_set.artist.name)) %>)
<% end %>
</li>
<% end %>
</ul>
<%= artist_alias_and_implication_list(post_set.artist) %>
<p><%= link_to "View artist", artist_path(post_set.artist.id) %></p>
</div>
<% elsif post_set.has_wiki? %>
<div class="prose">
<% if post_set.wiki_page.other_names.present? %>

View File

@@ -8,7 +8,7 @@
<% if post.is_banned? %>
<div class="ui-corner-all ui-state-highlight notice notice-deleted">
This post was removed because it was requested by the artist
The artist requested removal of this page
</div>
<% end %>

View File

@@ -1,5 +1,7 @@
<h1>Access Denied</h1>
<p>You do not have permission to visit this page.</p>
<%= link_to "Go back", :back, :rel => "prev" %>
<% content_for(:page_title) do %>

View File

@@ -2,11 +2,15 @@
<div id="a-diff">
<h1>Wiki Page: <%= @thispage.title %></h1>
<p>Showing differences between <%= compact_time @thispage.updated_at %> (<%= link_to_user @thispage.updater %>) and <%= compact_time @otherpage.updated_at %> (<%= link_to_user @otherpage.updater %>)</p>
<% if @thispage.visible? %>
<p>Showing differences between <%= compact_time @thispage.updated_at %> (<%= link_to_user @thispage.updater %>) and <%= compact_time @otherpage.updated_at %> (<%= link_to_user @otherpage.updater %>)</p>
<div>
<%= wiki_page_diff(@thispage, @otherpage) %>
</div>
<div>
<%= wiki_page_diff(@thispage, @otherpage) %>
</div>
<% else %>
<p>The artist requested removal of this page.</p>
<% end %>
</div>
</div>

View File

@@ -13,7 +13,7 @@
<%= format_text(@wiki_page_version.body) %>
<% else %>
<p>This artist has requested removal of their information.</p>
<p>The artist has requested removal of this page.</p>
<% end %>
</div>
</section>

View File

@@ -4,7 +4,12 @@
<section id="content">
<h1>Edit Wiki</h1>
<%= render "form" %>
<% if @wiki_page.visible? %>
<%= render "form" %>
<% else %>
<p>The artist requested removal of this page.</p>
<% end %>
</section>
</div>
</div>