{% extends 'django_ledger/layouts/content_layout_1.html' %}
{% load i18n %}
{% load static %}
{% load django_ledger %}

{% block aux_menu %}
    {% if unit_model %}
        <div class="column is-12">{% period_navigation 'unit-ic' %}</div>
    {% elif entity %}
        <div class="column is-12">{% period_navigation 'entity-ic' %}</div>
    {% elif ledger %}
        <div class="column is-12">{% period_navigation 'ledger-ic' %}</div>
    {% endif %}
{% endblock %}

{% block header_buttons %}
    {% if ledger %}
        <a class="button is-dark is-outlined"
           href="{% url 'django_ledger:ledger-list' entity_slug=view.kwargs.entity_slug %}">
            <span class="icon">{% icon 'bi:arrow-left' 16 %}</span>
            <span>{% trans 'Ledgers' %}</span>
        </a>
    {% elif entity %}
        <a class="button is-dark is-outlined"
           href="{% url 'django_ledger:entity-dashboard' entity_slug=view.kwargs.entity_slug %}">
            <span class="icon">{% icon 'bi:arrow-left' 16 %}</span>
            <span>{% trans 'Dashboard' %}</span>
        </a>
    {% endif %}
    <a class="button is-info is-outlined" href="?by_unit=1">
        <span class="icon">{% icon 'bi:diagram-3' 16 %}</span>
        <span>{% trans 'By Unit' %}</span>
    </a>
    <a class="button is-link is-outlined" href="{{ request.path }}?format=pdf">
        <span class="icon">{% icon 'bi:file-earmark-pdf' 16 %}</span>
        <span>{% trans 'PDF' %}</span>
    </a>
{% endblock %}

{% block view_content %}
    {% income_statement_table io_model=object %}
{% endblock %}
