{% extends 'admin/base.html' %} {% block tail_js %} {{ super() }} {% if session.get('xadm_edit_mode', False) %} {% endif %} {% endblock %} {% block access_control %} {{ super() }} {% if (current_user.is_authenticated in (True, False) and current_user.is_authenticated) or (current_user.is_authenticated != False and current_user.is_authenticated()) %}
{{ current_user.login }}
{% else %}
Log in  
{% endif %} {% endblock %} {% block page_body %} {{ super() }} {% if request.endpoint == 'admin.index' %}
{% if (current_user.is_authenticated in (True, False) and current_user.is_authenticated) or (current_user.is_authenticated != False and current_user.is_authenticated()) %} {% if current_user.has_role(config.get('XADMIN_ROLE', False)) %}

Dear "{{ current_user.name }}" welcome to xAdmin

{% for cat in admin_view.admin._menu %}

{% if cat._cached_url %} {{ cat.name }} {% else %} {% if cat._children.__len__() > 0 %} {{ cat.name }} {% endif %} {% endif %}

{% endfor %} {% else %}

You are not authorized superuser!

{% endif %} {% else %}

Welcome to xAdmin


admin role: {{ config['XADMIN_ROLE'] }}, edit role: {{ config['XADMIN_EDIT_ROLE'] }}

Warning: Only authorized users are allowed to be here. Please login using your credentials.

{% endif %}
{% endif %} {% endblock page_body %}