src/Aqarmap/Bundle/ListingBundle/Resources/views/CompoundSearch/compoundSearchForm.html.twig line 1

Open in your IDE?
  1. <div id="searchFormContainer" class="searchFormContainer">
  2.     <div class="filterHeader visible-sm visible-xs">
  3.         <div class="sectionContainer">
  4.             <button type="button" class="btnReset {% if app.request.get('_locale') == 'ar' %}right{% else %}left{% endif %}" id="reset-compound-planner">
  5.                 {{ 'layout.compound_planner.filters'|trans }}
  6.             </button>
  7.             <button class="btnCancel
  8.                                                                                                                     {% if app.request.get('_locale') == 'ar' %}left{% else %}right{% endif %}" onclick="closeCompoundFilter('searchFormContainer')">
  9.                 {{ 'layout.compound_planner.cancel'|trans }}
  10.             </button>
  11.         </div>
  12.     </div>
  13.     <div class="searchBox" ng-cloak ng-controller="compoundPlannerController">
  14.         {% set cachedCompoundsLocations = cachedCompoundsData['cachedCompoundsLocations'] %}
  15.         {% set cachedPropertyTypes = cachedCompoundsData['cachedPropertyTypes'] %}
  16.         {{ form_start(compoundSearchForm, {attr: {'ng-content-loaded': '', 'callback': 'init();setCheckedCompoundLocations('~checkedCompoundLocations | json_encode()~');setCheckedPropertyTypes('~checkedPropertyTypes | json_encode()~'); setCompoundLocations('~cachedCompoundsLocations~');setPropertyTypes('~cachedPropertyTypes~');', 'class': 'compound-planner-form'}}) }}
  17.         {% set compoundLocationFilter = app.request.query.get("compoundLocations") %}
  18.         {% set propertyTypesFilter = app.request.query.get("propertyTypes") %}
  19.         {% set priceLevel = app.request.query.get("priceLevels") %}
  20.         {% set compoundStatus = app.request.query.get("compoundStatus") %}
  21.         {% set keywordFilter = app.request.query.get("keywords") %}
  22.         {% set finishType = app.request.query.get("finishTypes") %}
  23.         {% set paymentMethod = app.request.query.get("paymentMethods") %}
  24.         {% set developerExperience = app.request.query.get("developerExperience") %}
  25.         {% set deliveryYears = app.request.query.get("deliveryYears") %}
  26.         {#Location#}
  27.         <div class="search-form">
  28.             <div class="form-section">
  29.                 <div class="page-header">
  30.                     <div class="panel">
  31.                         <a class="btn-collapse-container {% if compoundLocationFilter == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#LocationsContainer" aria-expanded="true">
  32.                             <label>{{ 'layout.compound_planner.locations'|trans }}</label>
  33.                             <label class="btn_collapse btn_float">
  34.                                 <span class="btn-minus"></span>
  35.                             </label>
  36.                         </a>
  37.                         <div id="LocationsContainer" class="panel-collapse collapse {% if compoundLocationFilter != null%}show{% endif %}" aria-expanded="true">
  38.                             <div class="panel-body marginTop15">
  39.                                 {{ form_widget(compoundSearchForm.compoundLocation, {attr: {'value': 'ng::getCheckedCompoundLocations()::'}}) }}
  40.                                 <tree-view class="w-100" depth="3" model="getCompoundLocations()" key="compoundLocation" callback-fn="toggleTick(item, key)"></tree-view>
  41.                             </div>
  42.                         </div>
  43.                     </div>
  44.                 </div>
  45.             </div>
  46.         </div>
  47.         {#Property Types#}
  48.         <div class="search-form">
  49.             <div class="form-section">
  50.                 <div class="page-header">
  51.                     <div class="panel">
  52.                         <a class="btn-collapse-container {% if propertyTypesFilter == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#PropertyTypesContainer" aria-expanded="true">
  53.                             <label>{{ 'layout.compound_planner.property_types'|trans }}</label>
  54.                             <label class="btn_collapse btn_float">
  55.                                 <span class="btn-minus"></span>
  56.                             </label>
  57.                         </a>
  58.                         {% set propertyTypesHideFrom = 5 %}
  59.                         <div id="PropertyTypesContainer" class="panel-collapse collapse {% if propertyTypesFilter != null %}show{% endif %} nestedContainer" data-hidestartfrom="{{ propertyTypesHideFrom }}" aria-expanded="true">
  60.                             <div class="panel-body marginTop15">
  61.                                 {{ form_widget(compoundSearchForm.propertyTypes, {attr: {'value': 'ng::getCheckedPropertyTypes()::'}}) }}
  62.                                 <tree-view class="w-100" depth="3" model="getPropertyTypes()" key="propertyType" callback-fn="toggleTick(item, key)"></tree-view>
  63.                             </div>
  64.                         </div>
  65.                     </div>
  66.                 </div>
  67.             </div>
  68.         </div>
  69.         {#Get range sliders values from url#}
  70.         {% set areaRange = app.request.get('areaRange') | default("0,0") | split(',') %}
  71.         {% set areaFrom = areaRange[0] %}
  72.         {% set areaTo = areaRange[1] %}
  73.         {% set priceRange = app.request.get('priceRange') | default("0,0") | split(',') %}
  74.         {% set priceFrom = priceRange[0] %}
  75.         {% set priceTo = priceRange[1] %}
  76.         {% set priceMeterRange = app.request.get('priceMeterRange') | default("0,0") | split(',') %}
  77.         {% set priceMeterFrom = priceMeterRange[0] %}
  78.         {% set priceMeterTo = priceMeterRange[1] %}
  79.         {#price Level#}
  80.         <div class="search-form">
  81.             <div class="form-section">
  82.                 <div class="page-header tab-content">
  83.                     <div class="panel tab-pane active show" id="price_level">
  84.                         <div class="btn-collapse-container {% if priceLevel == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#PriceLevelContainer" aria-expanded="true">
  85.                             <label>{{ 'layout.compound_planner.price_level'|trans }}</label>
  86.                             <a class="btn_collapse btn_float">
  87.                                 <span class="btn-minus"></span>
  88.                             </a>
  89.                         </div>
  90.                         <div id="PriceLevelContainer" class="panel-collapse collapse {% if priceLevel != null %}show{% endif %}" aria-expanded="true" ng-cloak>
  91.                             <div class="panel-body marginTop15">
  92.                                 {% set selectedPriceLevels = app.request.get('priceLevels') | json_encode()%}
  93.                                 <ul class="unstyled padding-0" ng-content-loaded callback="initFilter('priceLevel', {{selectedPriceLevels}})">
  94.                                     {% for p in compoundSearchForm.priceLevel|keys %}
  95.                                         {% set index = compoundSearchForm.priceLevel.vars.choices[p].value %}
  96.                                         <li>
  97.                                             {{form_widget(attribute(compoundSearchForm.priceLevel,p),
  98.                                                 {attr: {'class': 'styled-checkbox', 'ng-model': 'priceLevel[' ~ index ~ ']', 'ng-true-value': "'" ~ index ~ "'", 'ng-false-value': '0', 'ng-change': 'getCountFeedback();', 'ng-class': 'filtersFeedback.priceLevel[' ~ index ~ '] ? "" : "disabled" '}}
  99.                                             ) }}
  100.                                             {% if 'token' not in form_label(attribute(compoundSearchForm.priceLevel,p)) %}
  101.                                                 {{form_label(attribute(compoundSearchForm.priceLevel,p)) }}
  102.                                                 <span ng-class="filtersFeedback.priceLevel[{{index}}] ? '' : 'disabled'">{{ '(ng::filtersFeedback.priceLevel[' ~ index ~ '] || 0::)' }}</span>
  103.                                             {% endif %}
  104.                                         </li>
  105.                                     {% endfor %}
  106.                                 </ul>
  107.                             </div>
  108.                         </div>
  109.                     </div>
  110.                 </div>
  111.             </div>
  112.         </div>
  113.         {#Status#}
  114.         <div class="search-form moreFilter">
  115.             <div class="form-section">
  116.                 <div class="page-header">
  117.                     <div class="panel">
  118.                         <a class="btn-collapse-container {% if compoundStatus == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#StatusContainer" aria-expanded="true">
  119.                             <label>{{ 'layout.compound_planner.status'|trans }}</label>
  120.                             <label class="btn_collapse btn_float">
  121.                                 <span class="btn-minus"></span>
  122.                             </label>
  123.                         </a>
  124.                         <div id="StatusContainer" class="panel-collapse collapse {% if compoundStatus != null%}show{% endif %}" aria-expanded="true" ng-cloak>
  125.                             <div class="panel-body marginTop15">
  126.                                 {% set selectedCompoundStatus = app.request.get('compoundStatus') | json_encode() %}
  127.                                 <ul class="unstyled padding-0" ng-content-loaded callback="initFilter('compoundStatus', {{selectedCompoundStatus}})">
  128.                                     {% for c in compoundSearchForm.compoundStatus|keys %}
  129.                                         {% set index = compoundSearchForm.compoundStatus.vars.choices[c].value %}
  130.                                         <li>
  131.                                             {{form_widget(attribute(compoundSearchForm.compoundStatus,c), {attr: {'class': 'styled-checkbox', 'ng-model': 'compoundStatus[' ~ index ~ ']', 'ng-true-value': "'" ~ index ~ "'", 'ng-false-value': '0', 'ng-change': 'getCountFeedback()', 'ng-class': 'filtersFeedback.compoundStatus[' ~ index ~ '] ? "" : "disabled" '}}) }}
  132.                                             {% if 'token' not in form_label(attribute(compoundSearchForm.compoundStatus,c)) %}
  133.                                                 {{form_label(attribute(compoundSearchForm.compoundStatus,c)) }}
  134.                                                 <span ng-class="filtersFeedback.compoundStatus[{{index}}] ? '' : 'disabled'">{{ '(ng::filtersFeedback.compoundStatus[' ~ index ~ '] || 0::)' }}</span>
  135.                                             {% endif %}
  136.                                         </li>
  137.                                     {% endfor %}
  138.                                 </ul>
  139.                             </div>
  140.                         </div>
  141.                     </div>
  142.                 </div>
  143.             </div>
  144.         </div>
  145.         {#finish type#}
  146.         <div class="search-form moreFilter">
  147.             <div class="form-section">
  148.                 <div class="page-header">
  149.                     <div class="panel">
  150.                         <a class="btn-collapse-container {% if finishType == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#FinishTypeContainer" aria-expanded="true">
  151.                             <label>{{ 'layout.compound_planner.finish_type'|trans }}</label>
  152.                             <label class="btn_collapse btn_float">
  153.                                 <span class="btn-minus"></span>
  154.                             </label>
  155.                         </a>
  156.                         <div id="FinishTypeContainer" class="panel-collapse collapse {% if finishType != null %}show{% endif %}" aria-expanded="true" ng-cloak>
  157.                             <div class="panel-body marginTop15">
  158.                                 {% set selectedFinishType = app.request.get('finishTypes') | json_encode() %}
  159.                                 <ul class="unstyled padding-0" ng-content-loaded callback="initFilter('finishType', {{selectedFinishType}})">
  160.                                     {% for c in compoundSearchForm.finishType|keys %}
  161.                                         {% set index = compoundSearchForm.finishType.vars.choices[c].value %}
  162.                                         <li>
  163.                                             {{form_widget(attribute(compoundSearchForm.finishType,c), {attr: {'class': 'styled-checkbox', 'ng-model': 'finishType.'~index, 'ng-true-value': "'" ~ index ~ "'" , 'ng-false-value': '0', 'ng-change': 'getCountFeedback();', 'ng-class': 'filtersFeedback.finishType.' ~ index ~ ' ? "" : "disabled" '}}) }}
  164.                                             {% if 'token' not in form_label(attribute(compoundSearchForm.finishType,c)) %}
  165.                                                 {{form_label(attribute(compoundSearchForm.finishType,c), index|trans) }}
  166.                                                 <span ng-class="filtersFeedback.finishType.{{index}} ? '' : 'disabled'">
  167.                                                     {{ '(ng::filtersFeedback.finishType.' ~ index ~ ' || 0::)' }}
  168.                                                 </span>
  169.                                             {% endif %}
  170.                                         </li>
  171.                                     {% endfor %}
  172.                                 </ul>
  173.                             </div>
  174.                         </div>
  175.                     </div>
  176.                 </div>
  177.             </div>
  178.         </div>
  179.         {#Payment Method#}
  180.         <div class="search-form moreFilter">
  181.             <div class="form-section">
  182.                 <div class="page-header">
  183.                     <div class="panel">
  184.                         <a class="btn-collapse-container {% if paymentMethod == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#PaymentMethodContainer" aria-expanded="true">
  185.                             <label>{{ 'layout.compound_planner.payment_method'|trans }}</label>
  186.                             <label class="btn_collapse btn_float">
  187.                                 <span class="btn-minus"></span>
  188.                             </label>
  189.                         </a>
  190.                         <div id="PaymentMethodContainer" class="panel-collapse collapse {% if paymentMethod != null %}show{% endif %}" aria-expanded="true" ng-cloak>
  191.                             <div class="panel-body marginTop15">
  192.                                 {% set selectedPaymentMethod = app.request.get('paymentMethods') | json_encode() %}
  193.                                 <ul class="unstyled padding-0" ng-content-loaded callback="initFilter('paymentMethod', {{selectedPaymentMethod}})">
  194.                                     {% for method in compoundSearchForm.paymentMethod|keys %}
  195.                                         {% set index = compoundSearchForm.paymentMethod.vars.choices[method].value %}
  196.                                         <li>
  197.                                             {{form_widget(attribute(compoundSearchForm.paymentMethod,method), {attr: {'class': 'styled-checkbox', 'ng-model': 'paymentMethod[' ~ index ~ ']', 'ng-true-value': "'" ~ index ~ "'", 'ng-false-value': '0', 'ng-change': 'getCountFeedback();', 'ng-class': 'filtersFeedback.paymentMethod[' ~ index ~ '] ? "" : "disabled" '}}) }}
  198.                                             {% if 'token' not in form_label(attribute(compoundSearchForm.paymentMethod,method)) %}
  199.                                                 {{form_label(attribute(compoundSearchForm.paymentMethod,method)) }}
  200.                                                 <span ng-class="filtersFeedback.paymentMethod[{{index}}] ? '' : 'disabled'">
  201.                                                     {{ '(ng::filtersFeedback.paymentMethod[' ~ index ~ '] || 0::)' }}
  202.                                                 </span>
  203.                                             {% endif %}
  204.                                         </li>
  205.                                     {% endfor %}
  206.                                 </ul>
  207.                             </div>
  208.                         </div>
  209.                     </div>
  210.                 </div>
  211.             </div>
  212.         </div>
  213.         {# Developer Experience #}
  214.         <div class="search-form moreFilter">
  215.             <div class="form-section">
  216.                 <div class="page-header">
  217.                     <div class="panel">
  218.                         <a class="btn-collapse-container {% if developerExperience == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#DeveloperExperienceContainer" aria-expanded="true">
  219.                             <label>{{ 'layout.compound_planner.developer_experience'|trans }}</label>
  220.                             <label class="btn_collapse btn_float">
  221.                                 <span class="btn-minus"></span>
  222.                             </label>
  223.                         </a>
  224.                         <div id="DeveloperExperienceContainer" class="panel-collapse collapse {% if developerExperience != null %}show{% endif %}" aria-expanded="true" ng-cloak>
  225.                             <div class="panel-body marginTop15">
  226.                                 {% set selectedDeveloperExperience = app.request.get('developerExperience') | json_encode() %}
  227.                                 <ul class="unstyled padding-0" ng-content-loaded callback="initFilter('developerExperiences', {{ selectedDeveloperExperience }})">
  228.                                     {% for c in compoundSearchForm.developerExperience|keys %}
  229.                                         {% set index = compoundSearchForm.developerExperience.vars.choices[c].value %}
  230.                                         <li>
  231.                                             {{ form_widget(attribute(compoundSearchForm.developerExperience,c), {attr: {'class': 'styled-checkbox', 'ng-model': 'developerExperiences.'~index, 'ng-true-value': "'" ~ index ~ "'" , 'ng-false-value': '0', 'ng-change': 'getCountFeedback();', 'ng-class': 'filtersFeedback.' ~ index ~ ' ? "" : "" '}}) }}
  232.                                             {% if 'token' not in form_label(attribute(compoundSearchForm.developerExperience,c)) %}
  233.                                                 {{ form_label(attribute(compoundSearchForm.developerExperience,c)) }}
  234.                                                 <span ng-class="filtersFeedback.{{ index }} ? '' : 'disabled'">
  235.                                                     {{ '(ng::filtersFeedback.' ~ index ~ ' || 0::)' }}
  236.                                                 </span>
  237.                                             {% endif %}
  238.                                         </li>
  239.                                     {% endfor %}
  240.                                 </ul>
  241.                             </div>
  242.                         </div>
  243.                     </div>
  244.                 </div>
  245.             </div>
  246.         </div>
  247.         {# Deleviery Year Experience #}
  248.         <div class="search-form moreFilter">
  249.             <div class="form-section">
  250.                 <div class="page-header">
  251.                     <div class="panel">
  252.                         <a class="btn-collapse-container {% if deliveryYears == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#deliveryYearContainer" aria-expanded="true">
  253.                             <label>{{ 'layout.compound_planner.delivery_year'|trans }}</label>
  254.                             <label class="btn_collapse btn_float">
  255.                                 <span class="btn-minus"></span>
  256.                             </label>
  257.                         </a>
  258.                         <div id="deliveryYearContainer" class="panel-collapse collapse {% if deliveryYears != null %}show{% endif %}" aria-expanded="true" ng-cloak>
  259.                             <div class="panel-body marginTop15">
  260.                                 {% set selectedDeliveryYears =  deliveryYears| json_encode() %}
  261.                                 <ul class="unstyled padding-0" ng-content-loaded callback="initFilter('deliveryYears', {{ selectedDeliveryYears }})">
  262.                                     {% for c in compoundSearchForm.deliveryYears|keys %}
  263.                                         {% set index = compoundSearchForm.deliveryYears.vars.choices[c].value %}
  264.                                         <li>
  265.                                             {{ form_widget(attribute(compoundSearchForm.deliveryYears,c), {attr: {'class': 'styled-checkbox', 'ng-model': 'deliveryYears['~index~']', 'ng-true-value': "'" ~ index ~ "'" , 'ng-false-value': '0', 'ng-change': 'getCountFeedback();', 'ng-class': 'filtersFeedback.deliveryYears[' ~ index ~ '] ? "" : "" '}}) }}
  266.                                             {% if 'token' not in form_label(attribute(compoundSearchForm.deliveryYears,c)) %}
  267.                                                 {{ form_label(attribute(compoundSearchForm.deliveryYears,c)) }}
  268.                                                 <span ng-class="filtersFeedback.deliveryYears[{{ index }}]? '' : 'disabled'">
  269.                                                     {{ '(ng::filtersFeedback.deliveryYears[' ~ index ~ '] || 0::)' }}
  270.                                                 </span>
  271.                                             {% endif %}
  272.                                         </li>
  273.                                     {% endfor %}
  274.                                 </ul>
  275.                             </div>
  276.                         </div>
  277.                     </div>
  278.                 </div>
  279.             </div>
  280.         </div>
  281.         {#Keywords Search#}
  282.         <div class="search-form moreFilter">
  283.             <div class="form-section">
  284.                 <div class="page-header">
  285.                     <div class="panel">
  286.                         <a id="compoundNameCollapseBtn" class="btn-collapse-container {% if keywordFilter == null %}collapsed{% endif %}" data-toggle="collapse" data-target="#KeywordContainer" aria-expanded="true">
  287.                             <label>
  288.                                 {{ get_setting('general', 'country') == 'SA' ? 'layout.compound_planner.search_for_ksa'|trans : 'layout.compound_planner.search_for'|trans }}
  289.                             </label>
  290.                             <label class="btn_collapse btn_float">
  291.                                 <span class="btn-minus"></span>
  292.                             </label>
  293.                         </a>
  294.                         {% set selectedKeywords = app.request.get('keywords') | json_encode() %}
  295.                         <div id="KeywordContainer" class="panel-collapse collapse {% if keywordFilter != null %}show{% endif %}" aria-expanded="true">
  296.                             <div class="panel-body marginTop15 KeywordContainerContainer">
  297.                                 <div class="mapBin" ng-content-loaded callback="initKeywordFilter({{ selectedKeywords }})">
  298.                                     <i class="fa fa-search location-icon"></i>
  299.                                 </div>
  300.                                 <div class="drop-down-container">
  301.                                     {% set keyword_placeholder = get_setting('general', 'country') == 'SA' ? 'layout.compound_planner.search_for_placeholder_ksa'|trans : 'layout.compound_planner.search_for_placeholder'|trans  %}
  302.                                     {{ form_widget(compoundSearchForm.keyword, {attr: {'class': 'select2-select', 'data-placeholder': keyword_placeholder, 'name': 'filters[]', 'ng-model': 'keyword', 'ng-change': 'getCountFeedback();'}}) }}
  303.                                 </div>
  304.                             </div>
  305.                         </div>
  306.                     </div>
  307.                 </div>
  308.             </div>
  309.         </div>
  310.         <div class="search-form last" ng-content-loaded callback="initFeedback();">
  311.             <div class="form-section">
  312.                 <div class="page-header">
  313.                     <div class="panel">
  314.                         <div class="panel-collapse collapse show" aria-expanded="true" ng-cloak>
  315.                             <div class="panel-body KeywordContainerContainer">
  316.                                 <div class="btnContainer">
  317.                                     <div class="btnlarge">
  318.                                         <button class="btn btn-blue-curved" type="submit">{{ 'layout.compound_planner.search'|trans }}&#160;<span>(ng::totalFeedback::)</span>
  319.                                         </button>
  320.                                     </div>
  321.                                     <div class="btnSmall">
  322.                                         {% if app.request.attributes.get('_route') == 'compound_search' or app.request.attributes.get('_route') == 'compound_search_with_location' %}
  323.                                             <a class="btn btn-white text-blue rounded-pill" id="reset-compound-planner" href="{{ path('compound_search') }}">{{ 'layout.compound_planner.reset'|trans }}</a>
  324.                                         {% else %}
  325.                                             <span class="btn btn-white text-blue rounded-pill reset-compound-planner" ng-click="resetValues();getCountFeedback();">
  326.                                                 {{ 'layout.compound_planner.reset'|trans }}
  327.                                             </span>
  328.                                         {% endif %}
  329.                                     </div>
  330.                                 </div>
  331.                             </div>
  332.                         </div>
  333.                     </div>
  334.                 </div>
  335.             </div>
  336.         </div>
  337.         {{ form_end(compoundSearchForm) }}
  338.     </div>
  339. </div>