{% extends "user_profile/user.html" %}
{% block before_css %}
    <link href="{{'/bootstrap/css/bootstrap.css'|media}}" rel="stylesheet" type="text/css" />
{% endblock %}
{% block profilesection %}{% trans %}inbox{% endtrans %}{% endblock %}
{% block usercontent %}
<div class="inbox" style="padding-top:5px;font-size:13px;">
    {% set re_count = request.user.new_response_count +
            request.user.seen_response_count
    %}
    {% if need_inbox_sections_nav %}
        <div id="re_sections">
            {% trans %}Sections:{% endtrans %}
            {% set sep = joiner('|') %}
            {#{{ sep() }}
            <a href="{{request.user.get_absolute_url()}}?sort=inbox&section=messages"
                {% if inbox_section == 'messages' %}class="on"{% endif %}
            >{% trans %}messages{% endtrans %}</a>#}
            {% if re_count > 0 %}{{ sep() }}
                <a href="{{request.user.get_absolute_url()}}?sort=inbox&section=forum"
                    {% if inbox_section == 'forum' %}class="on"{% endif %}
                >
                    {% trans %}forum responses (<span class="response-count">{{re_count}}</span>){% endtrans -%}
                </a>
            {% endif %}
            {% if group_join_requests_count %}{{ sep() }}
            <a href="{{request.user.get_absolute_url()}}?sort=inbox&section=join_requests"
                {% if inbox_section == 'join_requests' %}class="on"{% endif %}
            >
                {% trans %}group join requests{% endtrans %}
            </a>
            {% endif %}
        </div>
    {% endif %}
    {% block inbox_content %}
    {% endblock %}
</div>
{% endblock %}
{% block userjs %}
    <script type="text/javascript">
        var askbot = askbot || {};
        askbot['urls'] = askbot['urls'] || {};
        askbot['urls']['clearNewNotifications'] = '{{ url('clear_new_notifications') }}';
        askbot['urls']['deleteNotifications'] = '{{ url('delete_notifications') }}';
        $(document).ready(function(){
            $('body').addClass('inbox-{{ inbox_section }}');
            setup_inbox();
        });
    </script>
{% endblock %}
