{% extends "layout.html" %}
{% from "_macros.html" import render_roles %}
{%- block title -%}
{{ _('Profile') }}
{%- endblock -%}
{% block content %}

<h1>{{ current_user.email }}</h1>

<h2>{{ _('Profile') }}</h2>

<div class="list-group">
    <a href="{{ url_for('security.change_password') }}" class="list-group-item">
        {{ _fsdomain('Change password') }}
        <i class="fa fa-caret-right"></i>
    </a>
</div>

<h2>{{ _('Settings') }}</h2>

<div class="list-group">
    <a href="{{ url_for('user_notifications') }}" class="list-group-item">
        {{ _('Notifications') }}
        <i class="fa fa-caret-right"></i>
    </a>
    <a href="{{ url_for('oauth2_tokens') }}" class="list-group-item">
        {{ _('Applications') }}
        <i class="fa fa-caret-right"></i>
    </a>
</div>

{% if current_user.has_permission('oauth2_client:read') %}
<h2>{{ _('Developer') }}</h2>

<div class="list-group">
    <a href="{{ url_for('oauth2_clients') }}" class="list-group-item">
        {{ _('OAuth2 clients') }}
        <i class="fa fa-caret-right"></i>
    </a>
</div>
{% endif %}

{% endblock %}