<h2 class="page-header">Search Rental</h2>
<form action="/rentals" method="GET">
    <div class="form-row">
        <div class="form-item">
            <label>Status</label>
            <input type="text" name="status" value="<%= searchOptions.status %>">
        </div>
        <div class="form-item">
            <label>Rental ID</label>
            <input type="text" name="rentalID" value="<%= searchOptions.rentalID %>">
        </div>
    </div>
    <div class="form-row">
        <div class="form-item">
            <label>Rent After</label>
            <input type="date" name="rentalAfter" value="<%= searchOptions.rentalAfter %>">
        </div>
        <div class="form-item">
            <label>Rent Before</label>
            <input type="date" name="rentalBefore" value="<%= searchOptions.rentalBefore %>">
        </div>
    </div>
    <div class="form-row form-row-end btn-row">
        <button class="btn btn-primary" type="submit">Search</button>
    </div>
</form>
<br>
<% rentals.forEach(rental=> { %>
    <div class="author-row">
        <div class="author-name">
            <%= rental.rentalID %>
        </div>
        <div class="author-name">
            <%= rental.status %>
        </div>
    </div>
    <div class="form-row form-row-end btn-row">
        <a class="btn btn-primary" href="/rentals/<%= rental.id %>">View</a>
        <a class="btn btn-primary" href="/rentals/<%= rental.id %>/edit">Edit</a>

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