{% set currentNatureRaw = query.nature|default(filters.nature == 'vente' ? 'V' : 'L') %} {% set currentNature = currentNatureRaw|upper in ['V', 'VENTE'] ? 'V' : 'L' %} {% set currentType = query.type|default('BUREAUX') %} {% set currentSurfaceMin = query.smin|default('') %} {% set currentSurfaceMax = query.smax|default('') %} {% set currentBudgetMin = query.bmin|default('') %} {% set currentBudgetMax = query.bmax|default('') %} {% set currentLocalisations = query.localisation|default([]) %} {% set currentPrestations = query.prestations|default([]) %} {% set currentLocalisationLabels = [] %} {% for localisation in localisations %} {% if localisation.slug in currentLocalisations %} {% set currentLocalisationLabels = currentLocalisationLabels|merge([localisation.libelle]) %} {% endif %} {% endfor %} {% set currentBudgetUnit = query.bunit|default(currentNature == 'V' ? 'sale' : 'month') %} {% set currentBudgetUnit = currentNature == 'V' ? 'sale' : (currentBudgetUnit == 'm2_year' ? 'm2_year' : 'month') %} {% set currentNatureLabel = currentNature == 'V' ? 'Vente' : 'Location' %} {% set currentTypeLabel = { 'BUREAUX': 'Bureaux', 'ACTIVITE - ENTREPOTS': 'Entrepôts & activités', 'LOCAL COMMERCIAL': 'Locaux commerciaux', 'TERRAIN': 'Terrains' }[currentType]|default('Type de bien') %} {% set currentSurfaceLabel = 'Surface' %} {% if currentSurfaceMin and currentSurfaceMax %} {% set currentSurfaceLabel = currentSurfaceMin ~ ' - ' ~ currentSurfaceMax ~ ' m²' %} {% elseif currentSurfaceMin %} {% set currentSurfaceLabel = 'Dès ' ~ currentSurfaceMin ~ ' m²' %} {% elseif currentSurfaceMax %} {% set currentSurfaceLabel = 'Jusqu’à ' ~ currentSurfaceMax ~ ' m²' %} {% endif %} {% set currentBudgetLabel = 'Budget' %} {% set currentBudgetSuffix = currentNature == 'V' ? '€' : (currentBudgetUnit == 'm2_year' ? '€ / m² / an' : '€ / mois') %} {% if currentBudgetMin and currentBudgetMax %} {% set currentBudgetLabel = currentBudgetMin ~ ' - ' ~ currentBudgetMax ~ ' ' ~ currentBudgetSuffix %} {% elseif currentBudgetMin %} {% set currentBudgetLabel = 'Dès ' ~ currentBudgetMin ~ ' ' ~ currentBudgetSuffix %} {% elseif currentBudgetMax %} {% set currentBudgetLabel = 'Jusqu’à ' ~ currentBudgetMax ~ ' ' ~ currentBudgetSuffix %} {% endif %} {% set currentLocalisationLabel = 'Localisation' %} {% if currentLocalisationLabels|length == 1 %} {% set currentLocalisationLabel = currentLocalisationLabels|first %} {% elseif currentLocalisationLabels|length > 1 %} {% set currentLocalisationLabel = currentLocalisationLabels|length ~ ' localisations' %} {% endif %}
{% for prestation in currentPrestations %} {% endfor %}