{% extends request.is_ajax|yesno:'bajax.html,base.html' %}
{% load i18n %}

{% block title %}{{ abon.get_full_name }}{% endblock %}

{% block breadcrumb %}
    <ol class="breadcrumb">
        <li><span class="glyphicon glyphicon-home"></span></li>
        <li><a href="{% url 'abonapp:group_list' %}">{% trans 'User groups' %}</a></li>
        <li><a href="{% url 'abonapp:people_list' group.pk %}">{{ group.title }}</a></li>
        <li class="active">{{ abon.fio }}</li>
    </ol>
{% endblock %}

{% block page-header %}
    <small>{% trans 'Ballance' %} <i class="glyphicon glyphicon-ruble"></i>
        <b>{{ abon.ballance|floatformat:2 }}</b>
    </small>
{% endblock %}

{% block main %}
    <ul class="nav nav-tabs nav-justified">

        {% url 'abonapp:abon_home' group.pk abon.username as abon_home %}
        <li{% if abon_home == request.path %} class="active"{% endif %}>
            <a href="{{ abon_home }}">{% trans 'Sub information' %}</a>
        </li>

        {% url 'abonapp:abon_services' group.pk abon.username as abserv %}
        <li{% if abserv == request.path %} class="active"{% endif %}>
            <a href="{{ abserv }}">{% trans 'Services' %}</a>
        </li>

        {% url 'abonapp:abon_phistory' group.pk abon.username as abphist %}
        <li{% if abphist == request.path %} class="active"{% endif %}>
            <a href="{{ abphist }}">{% trans 'Payments' %}</a>
        </li>

        {% url 'abonapp:task_log' group.pk abon.username as abtasklog %}
        <li{% if abtasklog == request.path %} class="active"{% endif %}>
            <a href="{{ abtasklog }}">{% trans 'History of tasks' %}</a>
        </li>

    </ul>

    <div class="tab-content">
        <div class="tab-pane active">
            {% block content %}{% endblock %}
        </div>
    </div>
{% endblock %}
