{% extends "base.html.twig" %}
{% import '@AqarmapListing/Default/macros/paginationMeta.twig' as macros %}
{# Page title #}
{% block title %}{{ parent() }} • {{ user.fullName|default(user.username) }} {% endblock %}
{% block metatags %}
<meta name="robots" content="noindex">
{% endblock %}
{% block htmlhead %}
{% set firstListingArray = entity.items|first %}
{% set firstListing = firstListingArray ? firstListingArray ['listing']: NULL %}
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="{{ "%s%s"|format('@', 'layout.app_name'|trans) }}" />
<meta name="twitter:creator" content="{{ "%s%s"|format('@', 'layout.app_name'|trans) }}" />
<meta property="og:title" content="{{ 'user.sharing.title'|trans({'%user%': user.username}) }}"/>
<meta property="og:description" content="{{ 'user.sharing.description'|trans }}" />
<meta property="og:image" content="{% if firstListing and firstListing.mainPhoto %}{{ custom_vich_uploader_asset(firstListing.mainPhoto.file, 'file') | thumbnail('large')}}{% endif %}" />
<meta property="og:site_name" content="{{ 'layout.app_name'|trans }}" />
<meta property="fb:app_id" content="{{ facebook_app_id }}"/>
<link rel="canonical" href="{{ url('aqarmap_user_listings', {id: user.id, page: app.request.get('page', null)}) }}"/>
{{ macros.pagination_meta(entity) }}
{% endblock %}
{% block categorizedStylesheets -%}
<link rel="stylesheet" href="{{ asset('builds/css/customerListingsBuild'~ (app.environment == 'dev' ? '' : '.min') ~'.css') }}" />
{% endblock %}
{% block body %}
{% set currentUser = app.user %}
{% set isMobile = isMobileAgent(app.request.headers.get('User-Agent')) %}
{% set currentUserEmail = currentUser ? currentUser.email : '' %}
{% set location = null %}
<section ng-controller="quickLeadController">
<div class="container">
<div class="row">
<div class="col">
<div class="page-header">
<h1>{{ 'user_settings.properties'|trans({'%user_name%': user.fullName|default(user.username)}) }}</h1>
</div>
</div>
{% if user.logo and user.isValidLogo %}
<div class="col">
<div class="page-header img-responsive pull-right flip">
<img style="margin-bottom: 15px;" src="{{ custom_vich_uploader_asset(user.logo, 'file') | thumbnail('logo') }}" alt="user-logo">
</div>
</div>
{% endif %}
</div>
<div class="row">
{% if entity.items is not empty %}
{% include '@AqarmapListing/ListingSearch/listingCardVertical.html.twig' with {'listings': entity.items, 'mainListing': false, 'isRelatedToListing': false, 'defaultResults' : false, 'topSellersResults' : false, 'isRelatedResults' : false , 'cardGridSize': 'col-md-4 col-6', 'disablePhotosCount': true , 'leadSourcePage': 'seller_profile'}%}
{% else %}
<p>{{ 'user_settings.no_listings'|trans }}</p>
{% endif %}
</div>
<!-- Pagination -->
{{ knp_pagination_render(entity) }}
<!-- /Pagination -->
</div>
</section>
{{ include('@AqarmapListingBundle/Listing/listingPhoneModal.html.twig') }}
<div ng-controller="listingLeadsWizardController" ng-init="initFormWizard()">
{{ include('@AqarmapUserBundle/User/listingMultiStepLeadModal.html.twig') }}
</div>
<div ng-controller="afterLeadController" >
{% include '@AqarmapListingBundle/Listing/afterLeadModal.html.twig' %}
{% include "@AqarmapListingBundle/Listing/mortgageModal.html.twig" %}
{% include "@AqarmapListingBundle/Listing/similarListingsModal.html.twig" %}
<div ng-controller="RatingController">
{% include "@AqarmapListing/Listing/ratingFormModal.html.twig" %}
{% include "@AqarmapListing/Listing/ratingProblemsModal.html.twig" %}
</div>
<div ng-controller="FeaturedCompaniesController"
ng-init="setTopCompaniesData();
fetchFeaturedCompanies();"
>
<div ng-if="!isTopCompaniesEmpty()" ng-cloak>
{% include "@AqarmapListingBundle/Listing/topSellersLogosModal.html.twig" with {trigger: '', eventAction:''}%}
</div>
</div>
</div>
{{ include('@AqarmapUserBundle/User/RegistrationSurvey.html.twig') }}
{% endblock %}
{% block categorizedJavascripts %}
<script src="{{ asset('builds/js/buildCustomerListings'~ (app.environment == 'dev' ? '' : '.min') ~'.js') }}"></script>
{% endblock %}