<h2 class="page-header">Search Reservation</h2>
<form action="/reservations" method="GET">
    <div class="form-row">
        <div class="form-item">
            <label>Timeslot</label>
            <input type="text" name="timeslot" value="<%= searchOptions.timeslot %>">
        </div>
    </div>

    <div class="form-row">
        <div class="form-item">
            <label>Reserve After</label>
            <input type="date" name="reserveAfter" value="<%= searchOptions.reserveAfter %>">
        </div>
        <div class="form-item">
            <label>Reserve Before</label>
            <input type="date" name="reserveBefore" value="<%= searchOptions.reserveBefore %>">
        </div>
    </div>

    <div class="form-row form-row-end btn-row">
        <button class="btn btn-primary" type="submit">Search</button>
    </div>
</form>
<br>
<% reservations.forEach(reservation=> { %>
    <div class="author-row">
        <div class="author-name">
            <%= reservation.timeslot %>
        </div>
        <div class="author-name">
            <%= reservation.date.toDateString() %>
        </div>
    </div>
    <div class="form-row form-row-end btn-row">
        <a class="btn btn-primary" href="/reservations/<%= reservation.id %>">View</a>
        <a class="btn btn-primary" href="/reservations/<%= reservation.id %>/edit">Edit</a>

        <%- include('../partials/deleteForm', { url: `/reservations/${reservation.id}` }) %>
    </div>
    <% }) %>