{% extends 'user/base.html'  %}
{% load core i18n profile_tags assets common_tags %}

{% block body_id %}profile-page{% endblock %}
{% block header_block %}{% endblock %}

{% block content %}
<div id="user-profile">
  <div id="user-profile-left">
    {% profile_score request profile %}
    {% profile_ranking request profile %}
    {% profile_teams request profile %}
  </div>
  <div id="user-profile-center">
    {% profile_user request profile %}
  </div>
  <div id="user-profile-right">
    {% profile_activity profile request_lang %}
  </div>
</div>
<div id="user-profile-bottom">
  {% profile_social profile %}
</div>
{% endblock %}

{% block scripts_extra %}
{{ block.super }}
{% if user == object %}
{% assets 'js_user_app' %}
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
{% endassets %}
<script type="text/javascript">
  $(function() {
      PTL.user.init({
          userData: {{ user.field_values|to_js }},
          appRoot: '{{ user.get_absolute_url }}',
      });
  });
</script>
{% endif %}
{% endblock %}
