<section class="main">
  <h1>HALLINTA - Esiintyjät</h1>

  <table>
    <thead>
      <tr>
        <th>Nimi</th>
        <th>Vahvistettu</th>
        <th>Prioriteetti</th>
      </tr>
    </thead>
    <tbody>
    <%= for performer <- @performers do %>
        <tr>
          <td><%= performer.name %></td>
          <td><%= performer.confirmed %></td>

          <td class="actions">
            <span><%= link "Esiintyjäsivu", to: Routes.performer_path(@conn, :show, performer) %></span>
            <span><%= link "Muokkaa", to: Routes.admin_performer_path(@conn, :edit, performer) %></span>
            <span><%= link "Poista", to: Routes.admin_performer_path(@conn, :delete, performer), method: :delete, data: [confirm: "Haluatko poistaa esiintyjän #{performer.name}?"] %></span>
          </td>
        </tr>
    <% end %>
    </tbody>
  </table>

  <span><%= link "Uusi esiintyjä", to: Routes.admin_performer_path(@conn, :new) %></span>
</section>
