<div class="card advertItem__wrapper">
<div class="card-body advertItem__body">
<div class="row">
<div class="col-3 col-sm-3 col-lg-3 col-xl-2 avatar-wrapper">
<img src="{{ advert.user.avatarUrl ?: asset('build/images/avatar.png') }}" class="teacher-avatar"
alt="{{ advert.user.firstName }}">
{% if advert.user.ratingAverage %}
<p class="mt-2 pl-2 small"><i class="fas fa-star text-warning"></i> {{ advert.user.ratingAverage|rating }}</p>
{% endif %}
</div>
<div class="col-9 col-sm-9 col-lg-9 col-xl-10 col-main">
<div class="row">
<div class="col-md-8 col-lg-9">
<a href="{{ path('advert_offer_detail', {'id': advert.id, 'slug': advert.slug}) }}">
<h6 class="text-primary item-title">{{ advert.title }}</h6>
</a>
<p class="small">{{ advert.user.fullName }}</p>
{% if advert.priceTime == 1 %}
{% set priceTimeText = 'priceTime.45.label'|trans({}, 'forms') %}
{% elseif advert.priceTime == 2 %}
{% set priceTimeText = 'priceTime.60.label'|trans({}, 'forms') %}
{% endif %}
<p class="mb-3 mt-3">
{% if advert.priceAlternative %}
{% if advert.priceAlternative == 1 %}
{% set priceAlternativeText = 'priceAlternative.deal.label'|trans({}, 'forms') %}
{% elseif advert.priceAlternative == 2 %}
{% set priceAlternativeText = 'priceAlternative.text.label'|trans({}, 'forms') %}
{% elseif advert.priceAlternative == 3 %}
{% set priceAlternativeText = 'priceAlternative.offer.label'|trans({}, 'forms') %}
{% elseif advert.priceAlternative == 4 %}
{% set priceAlternativeText = 'priceAlternative.gratis.label'|trans({}, 'forms') %}
{% endif %}
<img src="{{ asset('build/images/svg/icons/label.svg') }}" class="mr-1 mb-1" alt="price"> <strong>{{ priceAlternativeText }}</strong>
{% else %}
<img src="{{ asset('build/images/svg/icons/label.svg') }}" class="mr-1 mb-1" alt="price"> <strong>{{ 'advert.price'|trans({'price': advert.price}, 'advert') }}</strong> <span class="price-time">{{ priceTimeText }}</span>
{% endif %}
</p>
</div>
<div class="d-none d-md-flex col-md-4 col-lg-3 col-xl-3 text-center">
<p class="mb-1">
{% if userAdmin is defined and userAdmin %}
{% if advert.visibilityStatus == 1 %}
<a href="{{ path('advert_offer_manage', {'id': advert.id}) }}"
class="btn btn-secondary btn-radius">
{{ 'btn.edit.label'|trans({}, 'forms') }}
</a>
{% elseif advert.visibilityStatus == 0 %}
<a href="{{ path('advert_offer_manage', {'id': advert.id}) }}"
class="btn btn-secondary btn-radius">
{{ 'btn.publish.label'|trans({}, 'forms') }}
</a>
{% endif %}
{% else %}
<a href="{{ path('advert_offer_detail', {'id': advert.id, 'slug': advert.slug}) }}"
class="btn btn-secondary btn-radius">
{{ 'btn.show.label'|trans({}, 'forms') }}<i class="fas fa-chevron-right ml-2 d-lg-none d-xl-inline"></i>
</a>
{% endif %}
</p>
<p class="mb-0">
{% if userAdmin is defined and userAdmin and advert.visibilityStatus == 1 %}
<a href="{{ path('user_my_advert_offers_hide', {'id': advert.id}) }}" class="action-link">
{{ 'btn.hide.label'|trans({}, 'forms') }}
</a>
{% endif %}
</p>
</div>
</div>
<p class="small item-brief">{{ advert.brief }}</p>
<div class="row">
<div class="col-md-6">
<p class="small advert-attribute">
<span class="advert-subject">
{% if disable_subject_link is defined and disable_subject_link %}
<img src="{{ asset('build/images/svg/icons/book.svg') }}" class="mr-1 mb-1" alt="book"> {{ advert.subject.name }}
{% else %}
<img src="{{ asset('build/images/svg/icons/book.svg') }}" class="mr-1 mb-1" alt="book"> <a href="{{ path('advert_list', {'filterContainer': advert_list_url({'subject': advert.subject.slug})}) }}">{{ advert.subject.name }}</a>
{% endif %}
</span>
<span class="ml-3">
<img src="{{ asset('build/images/svg/icons/map.svg') }}" class="mr-1 mb-1" alt="map">
{% for city in advert.cities %}
<span class="advert-city">{{ city.name }}{{ not loop.last ? ',' : '' }}</span>
{% endfor %}
</span>
</p>
</div>
<div class="col-md-6 text-md-right">
{% if advert.user.hasActiveSubscription %}
<span class="recommended-badge">
<img src="{{ asset('build/images/svg/icons/like.svg') }}" class="like-icon" alt="{{ 'recommendedBadge.label'|trans({}, 'advert') }}" />
<span class="badge-text">{{ 'recommendedBadge.label'|trans({}, 'advert') }}</span>
</span>
{% else %}
<p class="small advert-attribute">
<span class="date-created">{{ date_compared_day_name(advert.createdAt) }}</span> -
<span class="view-count">{{ 'view.count'|trans({'viewCount': advert.viewCount|default(0)}, 'advert') }}</span>
</p>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{#{% if userAdmin is defined and userAdmin %}#}
{#<div class="card-footer advertItem__footer">#}
{#<div class="row">#}
{#<div class="col">#}
{#<p class="small align-text-bottom bottom-info">#}
{#<span class="status-info">#}
{#{% if advert.visibilityStatus == 1 %}#}
{#<span class="text-success"><i class="fas fa-check-square pr-1"></i> {{ 'status.published'|trans({}, 'advert') }}</span>#}
{#{% elseif advert.visibilityStatus == 0 %}#}
{#<span class="text-danger"><i class="fas fa-eye-slash pr-1"></i> {{ 'status.hidden'|trans({}, 'advert') }}</span>#}
{#{% endif %}#}
{#</span>#}
{#<span class="view-count"><i class="fas fa-eye"></i> {{ advert.viewCount|default(0) }}x prezreté</span>#}
{#<span>Vložené <span class="text-lowercase">{{ date_compared_day_name(advert.createdAt) }}</span></span>#}
{#</p>#}
{#</div>#}
{#<div class="col-3 text-right">#}
{#<a href="{{ path('user_my_advert_offers_delete', {'id': advert.id}) }}" class="btn text-danger">#}
{#<i class="fas fa-times"></i> {{ 'btn.delete.label'|trans({}, 'forms') }}#}
{#</a>#}
{#</div>#}
{#</div>#}
{#</div>#}
{#{% endif %}#}
</div>