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

{% block title %}{% trans 'Tasks' %}{% endblock %}

{% block breadcrumb %}
    <ol class="breadcrumb">
        <li><span class="glyphicon glyphicon-home"></span></li>
        <li class="active">{% trans 'Tasks' %}</li>
    </ol>
{% endblock %}

{% block page-header %}
    {% trans 'Tasks to be performed' %}
{% endblock %}


{% block main %}

    <ul class="nav nav-tabs">

        {% url 'taskapp:home' as taskhome %}
        <li{% if taskhome == request.path %} class="active"{% endif %}>
            <a href="{{ taskhome }}">
                {% trans 'New tasks' %}
            </a>
        </li>

        {% url 'taskapp:finished_tasks' as taskfin %}
        <li{% if taskfin == request.path %} class="active"{% endif %}>
            <a href="{{ taskfin }}">
                {% trans 'Completed tasks' %}
            </a>
        </li>

        {% url 'taskapp:own_tasks' as taskown %}
        <li{% if taskown == request.path %} class="active"{% endif %}>
            <a href="{{ taskown }}">
                {% trans 'Scheduled tasks me' %}
            </a>
        </li>

        {% url 'taskapp:failed_tasks' as taskfailed %}
        <li{% if taskfailed == request.path %} class="active"{% endif %}>
            <a href="{{ taskfailed }}">
                {% trans 'Failed tasks' %}
            </a>
        </li>

        {% url 'taskapp:my_tasks' as taskmy %}
        <li{% if taskmy == request.path %} class="active"{% endif %}>
            <a href="{{ taskmy }}">
                {% trans 'All my tasks' %}
            </a>
        </li>

    </ul>

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

{% endblock %}
