{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% blocktrans with snippet_type_name_plural=snippet_type_name_plural|capfirst %}Snippets {{ snippet_type_name_plural }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}menu-snippets{% endblock %}
{% block content %}

    <header class="nice-padding">
        <div class="row row-flush">
            <div class="left col9">
                <h1 class="icon icon-snippet">{% blocktrans with snippet_type_name_plural=snippet_type_name_plural|capfirst %}Snippets <span>{{ snippet_type_name_plural }}</span>{% endblocktrans %}</h1>
            </div>
            <div class="right col3">
                <a href="{% url 'wagtailsnippets_create' content_type.app_label content_type.model %}" class="button bicolor icon icon-plus">{% blocktrans %}Add {{ snippet_type_name }}{% endblocktrans %}</a>
                {# TODO: figure out a way of saying "Add a/an [foo]" #}
            </div>
        </div>
    </header>
    <div class="nice-padding">
        {% if items %}
            {% include "wagtailsnippets/snippets/list.html" %}
        {% else %}
            {% url 'wagtailsnippets_create' content_type.app_label content_type.model as wagtailsnippets_create_url %}
            <p class="no-results-message">{% blocktrans %}No {{ snippet_type_name_plural }} have been created. Why not <a href="{{ wagtailsnippets_create_url }}">add one</a>?{% endblocktrans %}</p>
        {% endif %}
    </div>
{% endblock %}
