<!--
- post_set
 -->

<div id="excerpt" style="display: none;">
  <% if post_set.has_artist? %>
    <% post_set.artist.tap do |artist| %>
      <% if artist.visible? %>
        <% unless artist.notes.blank? %>
          <div class="prose">
            <%= format_text(artist.notes) %>
          </div>
        <% end %>

        <div>
          <%= render "artists/summary", artist: artist %>
          <%= artist_alias_and_implication_list(artist) %>

          <p class="links">
            <%= link_to "View wiki", artist.wiki_page %> |
            <%= link_to "View artist", artist_path(artist.id) %>
          </p>
        </div>
      <% end %>
    <% end %>
  <% elsif post_set.has_wiki? %>
    <% post_set.wiki_page.tap do |wiki_page| %>
      <div class="prose">
        <% if wiki_page.other_names.present? %>
          <p><%= wiki_page_other_names_list(wiki_page) %></p>
        <% end %>

        <%= format_text(wiki_page.presenter.excerpt) %>
        <%= wiki_page_alias_and_implication_list(wiki_page) %>

        <p class="links">
          <%= link_to "View wiki", wiki_page_path(wiki_page.id) %>
        </p>
      </div>
    <% end %>
  <% elsif post_set.has_pool? %>
    <% post_set.pool.tap do |pool| %>
      <h4>
        <%= pool.pretty_category %>:
        <%= link_to pool.pretty_name, pool_path(pool), :class => "pool-category-#{pool.category}" %>
        <% if pool.is_deleted? %>
          <span class="inactive">(deleted)</span>
        <% end %>
      </h4>

      <div id="description" class="prose">
        <%= format_text(post_set.pool.description) %>
      </div>

      <p class="links">
        <%= link_to "View pool", pool_path(post_set.pool.id) %>
      </p>
    <% end %>
  <% elsif post_set.has_favgroup? %>
    <h4>
      Favorite Group:
      <%= link_to post_set.favgroup.pretty_name, favorite_group_path(post_set.favgroup) %>
    </h4>
    Creator: <%= link_to_user post_set.favgroup.creator %>
  <% else %>
    <% if post_set.tag_string.present? %>
      <p>There is currently no wiki page for the tag "<%= post_set.tag_string %>". You can <%= link_to "create one", new_wiki_page_path(:wiki_page => {:title => post_set.tag_string}) %>.</p>

      <%= alias_and_implication_list(post_set.tag) %>
    <% end %>
  <% end %>
</div>
