{% extends "auth/admin.base.html.j2" %}


{% block pagemenu %}
  {{ super() }}
  {% if current_menu.active_item.parent.children and user is defined %}
    {% for item in current_menu.active_item.parent.children %}
      {% if item.itemmenu is defined and item.itemmenu() and not user.is_admin %}
        {% if current_menu.active_item._endpoint != item._endpoint %}
          {{  btn_a(text=item.text,
                    icon=item.icon,
                    type='light',
                    size='sm',
                    url=url_for(item._endpoint,
                                username=user.username)) }}
        {% endif %}
      {% endif %}
    {% endfor %}
  {% endif %}
{% endblock pagemenu %}
