{% set cover = get_profile_cover(profile) %}
<div class="row">
<div class="col-md-12">
<div class="profile-block">
<div class="profile-block-thumb cover-container" {% if cover %}style="background: url('{{ asset(cover) | imagine_filter('cover') }}?{{ profile.cover.createdDate|date('U') }}') no-repeat center"{% endif %}></div>
<div class="profile-toolbar">
{% if is_granted('ROLE_CREATOR', profile) %}
<a class="btn btn-sm btn-primary" href="{{ path('profile_cover_upload', {profile: profile.id}) }}">
{{ 'Upload cover'|trans({}, 'profile_view') }}
</a>
{#<div class="btn-group">
<button type="button" class="btn btn-sm btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ 'Options'|trans({}, 'profile_view') }}
</button>
<div class="dropdown-menu dropdown-menu-right">
<h6 class="dropdown-header">{{ 'Cover'|trans({}, 'profile_view') }}</h6>
<a class="dropdown-item" href="{{ path('profile_cover_upload', {profile: profile.id}) }}">
{{ 'Upload image'|trans({}, 'profile_view') }}
</a>
</div>
</div>#}
{% else %}
{% if isFollow is defined %}
{% include 'profile/partials/buttons/follow.html.twig' %}
{% endif %}
{% endif %}
</div>
<div class="profile-img">
{% set avatar = get_profile_avatar(profile) %}
{% if is_granted('ROLE_CREATOR', profile) %}
<a href="{{ path('profile_avatar_upload', {profile: profile.id}) }}">
<img src="{{ avatar }}{% if profile.avatar %}?{{ profile.avatar.createdDate|date('U') }}{% endif %}" class="img-thumbnail">
<button class="btn btn-sm btn-success btn-block change-avatar">
{{ 'Change avatar'|trans({}, 'profile_avatar') }}
</button>
</a>
{% else %}
<a href="{{ avatar }}" data-toggle="lightbox">
<img src="{{ avatar }}" class="img-thumbnail">
</a>
{% endif %}
</div>
<div class="profile-name">
<h2>{{ profile.name }}</h2>
{{ get_profile_info(profile, app.user)|raw }}
</div>
{% set links = get_profile_links(profile) %}
<div class="profile-block-link text-right">
{% if links|length %}
{% for link in links %}
<a data-toggle="tooltip" target="{{ link.target }}" href="{{ link.url }}" title="{{ link.label }}"><img src="{{ link.icon }}"></a>
{% endfor %}
{% endif %}
{% if is_granted('ROLE_CREATOR', profile) %}
<a href="{{ path('profile_links', {'profile': profile.id}) }}" class="btn btn-primary btn-sm">
{{ 'Manage links'|trans({}, 'profile_view') }}
</a>
{% endif %}
</div>
{#{% include 'profile/partials/menu.html.twig' %}#}
</div>
</div>
</div>