{%- extends "admin/_base.html" %}

{% from "admin/macros/vocabularies.html" import m_vocabulary with context %}

{%- block content %}
  {%- for group in vocabularies |sort %}
    <h2><a href="{{ url_for('.vocabularies_group', group=group or '_') }}">{{ group or _('Global') }}</a></h2>

    {%- for voc in vocabularies[group] %}
      {% call m_vocabulary(voc) %}
        <div class="text-right">
          <a href="{{ url_for('.vocabularies_new', group=group or '_', Model=voc.Meta.name) }}" class="btn btn-default">
            <i class="glyphicon glyphicon-plus"></i>
            {{ _('Add new value') }}
          </a>
        </div>
      {%- endcall %}
    {%- endfor %} {# voc in groups #}

  {%- endfor %} {# groups #}
{%- endblock %}
