{% extends "FOSUserBundle::layout.html.twig" %}

{% import "PackagistWebBundle::macros.html.twig" as macros %}

{% block fos_user_content %}
<section class="col-md-9">
    {%- if app.user.apiToken %}
        <h3 class="font-normal profile-title">{{ 'profile.your_api_token'|trans }}</h3>

        <div class="input-group api-token-group clearfix">
            <input id="api-token" type="text" class="form-control" value="" data-api-token="{{ app.user.apiToken }}" readonly="readonly">
            <span class="input-group">
                <button class="btn btn-success btn-show-api-token" type="button">{{ 'profile.show_api_token'|trans }}</button>
            </span>
        </div>

        <p>{{ 'profile.api_token_explain'|trans({ '%path_about%':path('about') })|raw }}</p>

        <hr>
    {%- endif %}

    {% embed "PackagistWebBundle:Web:list.html.twig" with {noLayout: 'true', showAutoUpdateWarning: true} %}
        {% block content_title %}
            <h3 class="font-normal">{{ 'packages.yours'|trans }}</h3>
        {% endblock %}
    {% endembed %}
</section>
{% endblock %}
