{% extends "base.html.twig" %}

{% trans_default_domain 'www' %}

{% block title %}{{ 'home.title'|trans }}{% endblock %}
{% block page_title %}{% endblock %}

{% block body %}

    <h3>{{ 'home.quick.title'|trans }}</h3>

    {% if app.user.isAdmin() %}

        <div class="alert admin-zone">

            <div class="home-quick"> 
                <a href="{{ path('admin_users_list') }}" class="nav-link font-italic text-dark">
                    <span class="mr-3"><i class="fa fa-calendar-days fa-fw"></i></span>
                    {{ 'admin.users.title'|trans({}, 'admin')|raw }}
                </a>
            </div>

            <div class="home-quick"> 
                <a class='btn btn-action btn-sm' href='{{ path('admin_user_new') }}'>
                    <i class='fa fa-plus fa-fw icon'></i>
                    <span>
                        {{ 'admin.user.actions.new'|trans({}, 'admin')|raw }}
                    </span>
                </a>
            </div>
        
        </div>

        <h3>{{ 'admin.system.title'|trans({}, 'admin') }}</h3>

        <div class="alert system-zone">

            <h5>{{ 'admin.system.images-cache.title'|trans({}, 'admin') }}</h5>

            <a href="{{ path('admin_system_generate_missing_cached_images') }}" class="btn btn-primary">
                {{ 'admin.system.images-cache.generate-missing'|trans({}, 'admin') }}
            </a>
            <a href="{{ path('admin_system_regenerate_cached_images') }}" class="btn btn-primary">
                {{ 'admin.system.images-cache.regenerate'|trans({}, 'admin') }}
            </a>
        </div>

    {% endif %}

{% endblock %}