<section class="main">
  <h1>Osallistujat</h1>

  <table>
    <thead>
      <tr>
        <th>Etunimi</th>
        <th>Sukunimi</th>
        <th>Sähköposti</th>
        <th>Puhelinnumero</th>
        <th>Torstai</th>
        <th>Perjantai</th>
        <th>Lauantai</th>
        <th>Kimppakyyti</th>
        <th>Majoitus</th>

        <th></th>
      </tr>
    </thead>
    <tbody>
    <%= for visitor <- @visitors do %>
        <tr>
          <td><%= visitor.fname %></td>
          <td><%= visitor.lname %></td>
          <td><%= visitor.email %></td>
          <td><%= visitor.tel %></td>
          <td><%= visitor.date1 %></td>
          <td><%= visitor.date2 %></td>
          <td><%= visitor.date3 %></td>
          <td><%= visitor.shared %></td>
          <td><%= visitor.accom %></td>

          <td class="actions">
            <span><%= link "Lisätietoja", to: Routes.admin_visitor_path(@conn, :show, visitor) %></span>
            <span><%= link "Muokkaa", to: Routes.admin_visitor_path(@conn, :edit, visitor) %></span>
            <span><%= link "Poista", to: Routes.admin_visitor_path(@conn, :delete, visitor), method: :delete, data: [confirm: "Oletko varma?"] %></span>
          </td>
        </tr>
    <% end %>
    </tbody>
  </table>
</section>
