{% extends 'Frontend/_templates/default.html.twig' %}{% block page_title %}Lettings{% endblock %}{% block meta_tags %}{% endblock %}{% block content %} <div class="block-heading"> <div class="container"> <h1>Properties To Let</h1> </div> </div> <div class="block-image " style="background-image: url('{{ file_helper.thumbnail(asset('build/images/lettings-intro.jpg'), 1900, 600) }}')"></div> <div class="block-propertyfilter"> <div class="container"> <form> <div class="row"> <div class="col-md-4"> <div class="form-group mb-4"> <label class="form-label">Bedrooms</label> <div class="row"> <div class="col-6"> <select class="form-select form-select-lg" name="min_bedrooms"> <option value="">No min</option> {% for i in range(1, 10) %} <option value="{{ i }}" {{ (i == propertyFilter.min_bedrooms|default(null) ? 'selected' : '') }}>{{ i }}</option> {% endfor %} </select> </div> <div class="col-6"> <select class="form-select form-select-lg" name="max_bedrooms"> <option value="">No max</option> {% for i in range(1, 14) %} <option value="{{ i }}" {{ (i == propertyFilter.max_bedrooms|default(null) ? 'selected' : '') }}>{{ i }}</option> {% endfor %} </select> </div> </div> </div> <div class="form-group"> <label class="form-label">Bathrooms</label> <select class="form-select form-select-lg" name="bathrooms"> <option value="">Any</option> {% for i in range(1, 10) %} <option value="{{ i }}" {{ (i == propertyFilter.bathrooms|default(null) ? 'selected' : '') }}>{{ i }}</option> {% endfor %} </select> </div> </div> <div class="col-md-4"> <div class="form-group mb-4"> <label class="form-label">Area</label> <select class="form-select form-select-lg" name="area"> <option value="">Any</option> {% for someArea in allAreas %} <option value="{{ someArea.id }}" {{ (someArea == propertyFilter.area|default(null) ? 'selected' : '') }}>{{ someArea.name }}</option> {% endfor %} </select> </div> <div class="form-group"> <label class="form-label">Property Type</label> <select class="form-select form-select-lg" name="type"> <option value="">Any</option> {% for someType in allTypes %} <option value="{{ someType.id }}" {{ (someType == propertyFilter.type|default(null) ? 'selected' : '') }}>{{ someType.name }}</option> {% endfor %} </select> </div> </div> <div class="col-md-4"> <div class="form-group mb-4"> <label class="form-label">Rent PCM</label> <div class="row"> <div class="col-6"> <select class="form-select form-select-lg" name="min_price"> <option value="">No min</option> {% for i in range(1, 26) %} <option value="{{ 200 + (i*50) }}" {{ ((200 + (i*50)) == propertyFilter.min_price|default(null) ? 'selected' : '') }}>{{ 200 + (i*50) }}</option> {% endfor %} </select> </div> <div class="col-6"> <select class="form-select form-select-lg" name="max_price"> <option value="">No max</option> {% for i in range(1, 26) %} <option value="{{ 200 + (i*50) }}" {{ ((200 + (i*50)) == propertyFilter.max_price|default(null) ? 'selected' : '') }}>{{ 200 + (i*50) }}</option> {% endfor %} </select> </div> </div> </div> <div class="form-group"> <label class="form-label">Availability</label> <select class="form-select form-select-lg"> <option value="">Now</option> <option value="">1 Month</option> <option value="">3 Months</option> <option value="">6 Months</option> <option value="">Any</option> </select> </div> </div> </div> <div class="text-center mt-5"> <button class="btn btn-primary btn-lg">Search properties <i class="fas fa-fw fa-search"></i></button> </div> </form> </div> </div> <div class="block-propertylist"> {% if properties is not empty %} <div class="container-fluid"> {% include "Frontend/Properties/_inc/propertyGrid.html.twig" with {properties: properties, opt: {cols: 4}} %} </div> <div class="container"> {{ knp_pagination_render(properties) }} </div> {% else %} <div class="container"> <div class="p-4 bg-light"> <p class="m-0"> Sorry, we couldn't find any properties matching your search. </p> </div> </div> {% endif %} </div>{% endblock %}