artists: unify show and show_or_new templates.
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
<% page_title "#{@artist.pretty_name.titleize} | Artist Profile" %>
|
||||
<%= render "secondary_links" %>
|
||||
|
||||
<div id="c-artists">
|
||||
<div id="a-show">
|
||||
<% if @artist.is_banned? && !policy(@artist).can_view_banned? %>
|
||||
<p>The artist requested removal of this page.</p>
|
||||
<% else %>
|
||||
<%= yield %>
|
||||
|
||||
<% if @artist.tag.present? && @artist.tag.post_count > 0 %>
|
||||
<div class="recent-posts">
|
||||
<h2 class="recent-posts-header">
|
||||
<%= link_to "Posts", posts_path(tags: @artist.name) %>
|
||||
</h2>
|
||||
|
||||
<%= render "posts/partials/common/inline_blacklist" %>
|
||||
|
||||
<%= render_post_gallery(@artist.tag.posts.limit(8), tags: @artist.name) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end%>
|
||||
</div>
|
||||
</div>
|
||||
@@ -16,8 +16,9 @@
|
||||
|
||||
<% if artist.is_banned? && !policy(artist).can_view_banned? %>
|
||||
<p>The artist requested removal of this page.</p>
|
||||
<% elsif artist.new_record? %>
|
||||
<p>This artist entry does not exist. <%= link_to "Create new artist entry", new_artist_path(artist: { name: artist.name }), rel: "nofollow" %>.</p>
|
||||
<% else %>
|
||||
|
||||
<% if artist.other_names.present? %>
|
||||
<div>
|
||||
<% artist.other_names.map do |other_name| %>
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
<% page_title "#{@artist.pretty_name.titleize} | Artist Profile" %>
|
||||
<% noindex if @artist.is_banned? %>
|
||||
<%= render "secondary_links" %>
|
||||
|
||||
<%= render layout: "show" do %>
|
||||
<div>
|
||||
<%= render "summary", artist: @artist %>
|
||||
<div id="c-artists">
|
||||
<div id="a-show">
|
||||
<% if @artist.is_banned? && !policy(@artist).can_view_banned? %>
|
||||
<p>The artist requested removal of this page.</p>
|
||||
<% else %>
|
||||
<%= render "artists/summary", artist: @artist %>
|
||||
|
||||
<% if @artist.tag.present? && @artist.tag.post_count > 0 %>
|
||||
<div class="recent-posts">
|
||||
<h2 class="recent-posts-header">
|
||||
<%= link_to "Posts", posts_path(tags: @artist.name) %>
|
||||
</h2>
|
||||
|
||||
<%= render "posts/partials/common/inline_blacklist" %>
|
||||
|
||||
<%= render_post_gallery(@artist.tag.posts.limit(8), tags: @artist.name) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end%>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<%= render layout: "show" do %>
|
||||
<div>
|
||||
<p>This artist entry does not exist. <%= link_to "Create new artist entry", new_artist_path(artist: { name: params[:name] }), rel: "nofollow" %>.</p>
|
||||
</div>
|
||||
<% end %>
|
||||
1
app/views/artists/show_or_new.html.erb
Symbolic link
1
app/views/artists/show_or_new.html.erb
Symbolic link
@@ -0,0 +1 @@
|
||||
show.html.erb
|
||||
Reference in New Issue
Block a user