<div id="c-artists">
  <div id="a-show">
    <h1>Artist: <%= @artist.name.tr("_", " ") %></h1>

    <% unless @artist.notes.blank? %>
      <div class="prose">
        <%= format_text(@artist.notes) %>
      </div>

      <p><%= link_to "View wiki page", @artist.wiki_page %></p>
    <% end %>

    <div>
      <ul>
        <li><strong>Status</strong> <%= @artist.status %></li>
        <% 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 %>
      </ul>
    </div>

    <div class="recent-posts">
      <h1>Recent Posts</h1>
      <div style="margin: 1em 0;">
        <%= @post_set.presenter.post_previews_html(self) %>
      </div>
    </div>

    <%= render "secondary_links" %>
  </div>
</div>

<% content_for(:page_title) do %>
  Artist - <%= @artist.name %> - <%= Danbooru.config.app_name %>
<% end %>
