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

{% block title %}{% trans "Manage Category" %}{% endblock %}
{% block section %}manage-category{% endblock %}
{% block left_slot %}
    {{ categories_portlet|safe }}
{% endblock %}

{% block content %}
    <div class="site-actions">
        <a class="add"
           href="{% url lfs_manage_add_top_category %}">
            {% trans 'Add Top Category' %}
        </a>
        {% if category %}
            <a class="add"
               href="{% url lfs_manage_add_category category.id %}">
                {% trans 'Add Category' %}
            </a>
            <a class="delete delete-link"
                 dialog_message="{{ dialog_message }}"
                 href="{% url lfs_delete_category category.id %}">
                 {% trans 'Delete Category' %}</a>
            <a class="preview popup-link"
               href="{% url lfs.catalog.views.category_view category.slug %}">
                {% trans 'View Category' %}
            </a>
            <a class="preview"
               href="{% url lfs.catalog.views.category_view category.slug %}">
                {% trans 'Goto Category' %}
            </a>
        {% endif %}
    </div>
    <div id="category-tabs"
         data="#category_{{ category.id }}">
        <ul>
            <li class="ui-tabs-nav-item"><a href="#data">{{ category.name }}</a></li>
            <li class="ui-tabs-nav-item"><a href="#view">{% trans 'View' %}</a></li>
            <li class="ui-tabs-nav-item"><a href="{% url lfs_load_products_tab category.id %}">{% trans 'Products' %}</a></li>
            <li class="ui-tabs-nav-item"><a href="#seo">{% trans 'SEO' %}</a></li>
            <li class="ui-tabs-nav-item"><a href="#portlets">{% trans 'Portlets' %}</a></li>
        </ul>
        <div id="data">
            {{ data|safe }}
        </div>
        <div id="view">
            {{ view|safe }}
        </div>
        <div id="seo">
            {{ seo|safe }}
        </div>
        <div id="portlets">
            {{ portlets|safe }}
        </div>
    </div>
{% endblock %}