{% extends "base_template.html" %} {% block title %}{{ _('Admin Dashboard') }}{% endblock %} {% block content %}

{{ _('Admin Dashboard') }}

{% if is_admin %} {{ ngettext('%(num)d model', '%(num)d models', models|length) }} {% endif %}
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} {% endfor %} {% endif %} {% endwith %} {% if not is_admin %} {# Staff land here from the top bar and the sidebar. The cards below open the generic CRUD, which is not theirs, so what they get is a pointer to the sections their own features put in the sidebar. #}

{{ _('Welcome. The sections you can work on are listed in the sidebar.') }}

{{ _('Pick one to get started.') }}

{% elif models %}
{% for model in models %}
{{ model.name }}

{{ ngettext('%(num)d column', '%(num)d columns', model.columns) }}

{{ model.count }}
{% if model.name == 'User' and users_url %} {{ _('Manage accounts') }} {% else %} {{ _('Browse') }} + {{ _('New') }} {% endif %}
{% endfor %}
{% else %}
{{ _('No models discovered. Make sure your features are loaded and have SQLAlchemy models defined.') }}
{% endif %} {% endblock %}