{% extends "manage/manage_base.html" %}
{% load i18n %}

{% block left_slot %}
    <div class="navigation-left-title">
        {% trans "Taxes" %}
    </div>

    {% for tax in taxes %}
        <div>
            <a href="{% url lfs_manage_tax tax.id %}"
               class="selectable {% ifequal tax.id current_id %}selected{% endifequal %}">
               {{ tax.rate }}%
            </a>
        </div>
    {% endfor %}
{% endblock %}

{% block content %}

    <div class="site-actions">

        <span class="label">{% trans 'Rate' %}: {{ tax.rate }}%</span>

        <a class="add"
           href="{% url lfs_add_tax %}">{% trans 'Add Tax' %}</a>

        <a class="delete confirmation-link"
           data="{% trans 'Delete?' %}"
           href="{% url lfs_delete_tax tax.id %}">{% trans 'Delete Tax' %}</a>
    </div>

    <div id="manage-tabs">
        <ul>
            <li class="ui-tabs-nav-item"><a href="#data">{% trans 'Tax' %}</a></li>
        </ul>

        <div id="data">
            <h2>{% trans 'Tax' %}</h2>
            <form action="{% url lfs_manage_tax tax.id %}"
                  method="post"
                  enctype="multipart/form-data">
                {% include "manage/lfs_form.html" %}
                <input type="submit"
                       value="{% trans 'Add tax' %}">
            </form>
        </div>
    </div>

    <script>
        $(function() {
            tinyMCE.execCommand('mceAddControl', true, 'id_body');
        });
    </script>
{% endblock %}