{% extends 'partials/base.html.twig' %} {% import 'user-manager-macros.html.twig' as macros %} {% set title = "PLUGIN_ADMIN_ADDON_USER_MANAGER.USER_MANAGER"|tu %} {% block titlebar %} {% if not user %}
{{ "PLUGIN_ADMIN.ADD"|tu }}

{{ "PLUGIN_ADMIN_ADDON_USER_MANAGER.USER_MANAGER"|tu }}

{% else %}
{{ "PLUGIN_ADMIN.BACK"|tu }} {% if exists %} {{ "PLUGIN_ADMIN.DELETE"|tu }} {{ "PLUGIN_ADMIN_ADDON_USER_MANAGER.LOGIN_AS"|tu }} {% endif %}

{{ "PLUGIN_ADMIN.USER"|tu }}: {{ user.username|e }}

{% endif %} {% endblock %} {% set ps = config.system.param_sep %} {% set appendUrl = '?filter=' ~ filter|url_encode %} {% block content %} {% if not user %} {% set style = listStyle|default('grid') %}

{{ "PLUGIN_ADMIN_ADDON_USER_MANAGER.USERS"|tu }}

{% if filterException %}

{{ "PLUGIN_ADMIN_ADDON_USER_MANAGER.FILTER_ERROR"|tu }}

{{ filterException.message }}

{% endif %}
{{ "PLUGIN_ADMIN_ADDON_USER_MANAGER.HELP"|tu }}
{% if style != 'grid' %}{% else %}{% endif %} {% if style != 'list' %}{% else %}{% endif %}
{% if users is empty %}

{{ "PLUGIN_ADMIN_ADDON_USER_MANAGER.NO_RESULTS"|tu }}

{% else %} {% if style == 'list' %}
{{ "PLUGIN_ADMIN.USERNAME"|tu }}
{{ "PLUGIN_ADMIN_ADDON_USER_MANAGER.ACTIONS"|tu }}
{% endif %} {% for user in users %}
{% if style == 'grid' %}
{% else %}
{% endif %}
{% endfor %} {% endif %}
{{ "PLUGIN_ADMIN_ADDON_USER_MANAGER.BULK_ACTION"|tu }}
{{ macros.pagination(pagination, uri.route(true) ~ '/listStyle' ~ ps ~ listStyle, ps, appendUrl) }}
{% for field in fields %} {% if field.type %} {% if field.name == 'username' %} {% set field = field|merge({ validate: field.validate|merge({ pattern: grav.config.system.username_regex })}) %} {% endif %}
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
{% endif %} {% endfor %}
{% for field in bulkFields %} {% if field.type %} {% if field.name == 'groups' %} {% set field = field|merge({options: groupnames}) %} {% endif %} {% if field.name == 'permissions' %} {% set field = field|merge({selectize: { options: permissions }}) %} {% endif %}
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
{% endif %} {% endfor %}
{% else %}

{{ user.username }}

{% include 'partials/blueprints.html.twig' with { data: user, blueprints: blueprints } %}

{{ "PLUGIN_ADMIN.MODAL_CHANGED_DETECTED_TITLE"|tu }}

{{ "PLUGIN_ADMIN.MODAL_CHANGED_DETECTED_DESC"|tu }}


{% endif %} {% endblock %}