gmarche/src/Admin/views/dashboard.twig

108 lines
4.9 KiB
Twig

{% extends 'layout.twig' %}
{% block title "Ğ1-Marché - Tableau de bord" %}
{% block body %}
<div class="container" style="color:floralwhite;background-color: #333333;padding: 1rem;">
<div class="container tab-de-bord">
<h3 style="display:inline-block;">Tableau de bord - </h3>
<h4 style="display:inline-block;">
{% if affiche_role() == 0 %} Super Admin{% endif %}
{% if affiche_role() == 1 %} Admin général{% endif %}
{% if affiche_role() == 2 %} Admin Antenne{% endif %}
</h4>
</h3>
</div>
<p></p>
{% if affiche_role() == 0 %}
<h4>Liste des admins généraux</h4>
<ul class="list-group list-group-flush">
{% for admin_gen in liste_adminGeneral %}
<a style="color:black;" href="" title="{{ admin_gen.username }}">
<li class="liste_antennes list-group-item" style="padding: .2rem 1.25rem;">
{{ admin_gen.username }}
</li>
</a>
{% endfor %}
</ul>
{% endif %}
<p></p>
{% if (affiche_role() == 0 or affiche_role() == 1) %}
<h4>Liste des admins Antenne</h4>
<ul class="list-group list-group-flush">
{% for admin_ant in liste_adminAntenne %}
<a style="color:black;" href="" title="{{ admin_ant.username }}">
<li class="liste_antennes list-group-item" style="padding: .2rem 1.25rem;">
{{ admin_ant.username }}
</li>
</a>
{% endfor %}
</ul>
{% endif %}
<p></p>
{% if affiche_role()==0 or affiche_role()==1 or affiche_role()==2 %}
<h4>Liste des régions/antennes</h4>
<ul class="list-group list-group-flush">
{% set antenne = '' %}
{% set region = '' %}
{% for item in listeAntennes %}
{% if (item.regionName != region) %}
<li class="liste_antennes list-group-item" style="color:black;
background-color:lightgoldenrodyellow;padding: .2rem 1.25rem;">
{{ item.regionName }}
</li>
<a style="color:black;" href="" title="{{ item.regionName }}">
<li class="liste_antennes list-group-item" style="background-color:#8fbc8f;padding: .2rem 1.25rem;">
{{ item.antenneName }}
</li>
</a>
{% else %}
<a style="color:black;" href="" title="{{ item.regionName }}">
<li class="liste_antennes list-group-item" style="background-color:#8fbc8f;padding: .2rem 1.25rem;">
{{ item.antenneName }}
</li>
</a>
{% endif %}
{% set antenne = item.antenneName %}
{% set region = item.regionName %}
{% endfor %}
</ul>
{% endif %}
<p></p>
{% if affiche_role()==0 or affiche_role()==1 or affiche_role()==2 %}
<h4>Liste des utilisateurs</h4>
<ul class="list-group list-group-flush">
{% for item2 in liste_users_suivi %}
<a style="color:black;" href="{{ path('dashboard.user',{user:item2.username}) }}" title="{{ item2.username }}">
<li class="liste_antennes list-group-item" style="padding: .2rem 1.25rem;">
{{ item2.username }}
{% set antenne_suivie = item2.suiviantenne|split('|') %}
{% for antenn in antenne_suivie %}
{% for item in listeAntennes %}
{% if (item.id == antenn) %}
- {{ item.antenneName }}
{% endif %}
{% endfor %}
{% endfor %}
{% if not (item2.actif) %}
<button class="btn btn-primary">DESACTIVE</button>
{% endif %}
</li>
</a>
{% endfor %}
</ul>
{% endif %}
<p></p>
{% if (affiche_role()== 0 or affiche_role()== 1) %}
<h4>Gestion d'une antenne</h4>
{% endif %}
<p></p>
{% if affiche_role()==0 or affiche_role()==1 or affiche_role()==2 %}
<h4>Gestion d'un G-Marché</h4>
{% endif %}
<div class="row">
{{ widgets | raw }}
</div>
</div>
{% endblock %}