{% extends 'luxuryadmin/base.html' %}
{% load staticfiles %}
{% load thumbnail %}
{% load icanhaz %}
{% load widget_tweaks %}
{% block admin_content %}

    <ul id="adminBreadcrumbs">
        <li><a href="{% url luxuryadmin:collection %}" title="">Admin</a></li>
        <li><a href="{% url luxuryadmin:categories %}" title="">Manage categories</a></li>
        <li>{% if category %}{{ category }}{% else %}Add new category{% endif %}</li>
    </ul>
    {% include 'luxuryadmin/snippets/nav.html' with on='categories' %}
    <h1>{% if category %}Edit - &#91;{{ category }}&#93;{% else %}Add new category{% endif %}</h1>
    <div class="adminPageWrapper">
            <form method="POST" class="categoryForm"
            {% if category %}
                action="{% url luxuryadmin:category category=category.id %}"
            {% else %}
                action="{% url luxuryadmin:category %}"
            {% endif %}
            class="categoryForm category" enctype="multipart/form-data">
			<div class="actions top">
				<input type="submit" value="save category"/>
			</div>
            <div id="infoForm">
                {% csrf_token %}
                <fieldset class="">
                    <legend>Category details</legend>
                    {{ form.as_p }}
                </fieldset>
            </div>
            <div class="actions">
                <input type="submit" value="save category"/>
            </div>
        </form>
    </div>
{% endblock %}