Commit 488bfa39 authored by Chrystel Moreau's avatar Chrystel Moreau
Browse files

dashboard ADMIN

parent aeee77ee
......@@ -9,19 +9,19 @@ use Psr\Http\Message\ResponseInterface as Response;
final class DashboardAdminAction
{
private $view;
private $logger;
private $em;
private $view;
private $logger;
private $em;
public function __construct(Twig $view, LoggerInterface $logger, EntityManagerInterface $em)
{
public function __construct(Twig $view, LoggerInterface $logger, EntityManagerInterface $em)
{
$this->view = $view;
$this->logger = $logger;
$this->em = $em;
}
}
public function __invoke(Request $request, Response $response, $args)
{
public function __invoke(Request $request, Response $response, $args)
{
$this->logger->info("dashboard admin page action dispatched");
$params = $request->getQueryParams();
......
......@@ -9,34 +9,44 @@ use Psr\Http\Message\ResponseInterface as Response;
final class DashboardAdminOrganismeAction
{
private $view;
private $logger;
private $em;
private $view;
private $logger;
private $em;
public function __construct(Twig $view, LoggerInterface $logger, EntityManagerInterface $em)
{
$this->view = $view;
$this->logger = $logger;
$this->em = $em;
}
public function __construct(Twig $view, LoggerInterface $logger, EntityManagerInterface $em)
{
$this->view = $view;
$this->logger = $logger;
$this->em = $em;
}
public function __invoke(Request $request, Response $response, $args)
public function __invoke(Request $request, Response $response, $args)
{
$this->logger->info("dashboard admin organisme page action dispatched");
$this->logger->info("dashboard admin page action dispatched");
$params = $request->getQueryParams();
$token = $params['token'];
$roleSI = $request->getAttribute('roleSI');
$params = $request->getQueryParams();
$token = $params['token'];
$roleSI = $request->getAttribute('roleSI');
if ($roleSI != 'admin') {
return $response->withStatus(401);
}
if ($roleSI != 'admin') {
return $response->withStatus(401);
}
$this->view->render($response, 'dashboard_admin_organisme.twig', [
'page' => 'dashboard-admin-organisme',
'token' => $token
]);
$organismes = $this->getOrganismes();
$this->view->render($response, 'dashboard_admin_organisme.twig', [
'page' => 'dashboard-admin-organisme',
'token' => $token,
'organismes' => $organismes
]);
return $response;
return $response;
}
private function getOrganismes()
{
$dql = "SELECT o FROM App\Entity\Organisme o ORDER BY o.nbPlaces DESC";
$query = $this->em->createQuery($dql);
return $query->getResult();
}
}
......@@ -9,34 +9,45 @@ use Psr\Http\Message\ResponseInterface as Response;
final class DashboardAdminParticipantAction
{
private $view;
private $logger;
private $em;
private $view;
private $logger;
private $em;
public function __construct(Twig $view, LoggerInterface $logger, EntityManagerInterface $em)
{
$this->view = $view;
$this->logger = $logger;
$this->em = $em;
}
public function __construct(Twig $view, LoggerInterface $logger, EntityManagerInterface $em)
{
$this->view = $view;
$this->logger = $logger;
$this->em = $em;
}
public function __invoke(Request $request, Response $response, $args)
public function __invoke(Request $request, Response $response, $args)
{
$this->logger->info("dashboard admin participant page action dispatched");
$this->logger->info("dashboard admin page action dispatched");
$params = $request->getQueryParams();
$token = $params['token'];
$roleSI = $request->getAttribute('roleSI');
$params = $request->getQueryParams();
$token = $params['token'];
$roleSI = $request->getAttribute('roleSI');
if ($roleSI != 'admin') {
return $response->withStatus(401);
}
if ($roleSI != 'admin') {
return $response->withStatus(401);
}
$this->view->render($response, 'dashboard_admin_participant.twig', [
'page' => 'dashboard-admin-participant',
'token' => $token
]);
$participants = $this->getParticipants();
$this->view->render($response, 'dashboard_admin_participant.twig', [
'page' => 'dashboard-admin-participant',
'token' => $token,
'participants' => $participants
]);
return $response;
return $response;
}
private function getParticipants()
{
$dql = "SELECT p FROM App\Entity\Participant p ORDER BY p.nom";
$query = $this->em->createQuery($dql);
return $query->getResult();
}
}
......@@ -9,34 +9,44 @@ use Psr\Http\Message\ResponseInterface as Response;
final class DashboardAdminThematiqueAction
{
private $view;
private $logger;
private $em;
private $view;
private $logger;
private $em;
public function __construct(Twig $view, LoggerInterface $logger, EntityManagerInterface $em)
{
$this->view = $view;
$this->logger = $logger;
$this->em = $em;
}
public function __invoke(Request $request, Response $response, $args)
public function __construct(Twig $view, LoggerInterface $logger, EntityManagerInterface $em)
{
$this->view = $view;
$this->logger = $logger;
$this->em = $em;
}
public function __invoke(Request $request, Response $response, $args)
{
$this->logger->info("dashboard admin thematique page action dispatched");
$this->logger->info("dashboard admin page action dispatched");
$params = $request->getQueryParams();
$token = $params['token'];
$roleSI = $request->getAttribute('roleSI');
$params = $request->getQueryParams();
$token = $params['token'];
$roleSI = $request->getAttribute('roleSI');
if ($roleSI != 'admin') {
return $response->withStatus(401);
}
if ($roleSI != 'admin') {
return $response->withStatus(401);
}
$this->view->render($response, 'dashboard_admin_thematique.twig', [
'page' => 'dashboard-admin-thematique',
'token' => $token
]);
$thematiques = $this->getThematiques();
return $response;
$this->view->render($response, 'dashboard_admin_thematique.twig', [
'page' => 'dashboard-admin-thematique',
'token' => $token,
'thematiques' => $thematiques
]);
return $response;
}
private function getThematiques()
{
$dql = "SELECT t FROM App\Entity\Thematique t ORDER BY t.id";
$query = $this->em->createQuery($dql);
return $query->getResult();
}
}
......@@ -46,7 +46,7 @@ class Organisme
public function getNbPlaces()
{
return $this->nbPlace;
return $this->nbPlaces;
}
public function setNbPlaces($nbPlaces)
......
<!DOCTYPE html>
<html>
<head>
<title>JDEV 2017</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="images/favicon.png" />
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="styles/style.css">
</head>
<body>
<header>
<div class="navbar-jdev navbar-jdev-fixed">
<!-- Logo -->
<a href="index.php" class="navbar-jdev-brand">
<img src="images/jdevlogo2017_min.png" />
</a>
<!-- Right Navigation -->
<div class="navbar-jdev-right hidden-xs hidden-sm">
<a href="inscription" class="navbar-jdev-item navbar-jdev-link">Inscription</a>
<a href="programme" class="navbar-jdev-item navbar-jdev-link">Programme</a>
<div class="dropdown">
<a class="navbar-jdev-item navbar-jdev-link" href="information" id="navInfo" data-toggle="dropdown" >
Informations
</a>
<div class="dropdown-menu" aria-labelledby="navInfo">
<a class="dropdown-item navbar-jdev-sitem" href="info-acces">Informations Accès</a>
<a class="dropdown-item navbar-jdev-sitem" href="info-hebergement">Informations Hébergement</a>
<a class="dropdown-item navbar-jdev-sitem" href="info-generales">Informations générales</a>
<a class="dropdown-item navbar-jdev-sitem" href="contact">Contacts</a>
</div>
</div>
<a href="connexion" class="navbar-jdev-item navbar-jdev-btn btn-treehouse">Connexion</a>
</div>
<!-- Dropdown appearing on mobile only -->
<div class="navbar-jdev-item hidden-md hidden-lg">
<div class="dropdown">
<i class="fa fa-bars dropdown-toggle" data-toggle="dropdown"></i>
<ul class="dropdown-menu dropdown-menu-right navbar-jdev-dropdown-menu">
<li><a href="inscription">Inscription</a></li>
<li><a href="programme">Programme</a></li>
<li><a href="info-acces">Informations Accès</a></li>
<li><a href="info-hebergement">Informations Hébergement</a></li>
<li><a href="info-generales">Informations générales</a></li>
<li><a href="contact">Contacts</a></li>
<li class="divider" role="separator"></li>
<li><a href="connexion" class="btn-treehouse">Connexion</a></li>
</ul>
</div>
</div>
</div>
</header>
<main>
{% block content %}{% endblock %}
</main>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/bootstrap-validator/dist/validator.min.js"></script>
<script src="bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<script src="js/inscription.js"></script>
<script src="js/connexion.min.js"></script>
<script src="js/new_passwd.min.js"></script>
<script src="js/admin.min.js"></script>
</body>
</html>
{% extends "base.twig" %}
{% extends "base_backoffice.twig" %}
{% block title %}Admin{% endblock %}
{% block content %}
<div class="container">
<!--
<nav class="hidden-xs hidden-sm navbar-dashboard">
<h3 class="navbar-dashboard-item-title">Dashboard ADMIN Menu</h3>
<h3 class="navbar-dashboard-item-title">Dashboard Menu</h3>
<ul class="navbar-dashboard-item-list">
<li class="navbar-dashboard-item active">
<a href="dashboard-admin?token={{ token }}"><i class="fa fa-home"></i> Home</a>
</li>
<li class="navbar-dashboard-item">
<a href="dashboard-admin-inscription?token={{ token }}"><i class="fa fa-address-card-o"></i> Inscription</a>
<a href="dashboard-admin-organisme?token={{ token }}"><i class="fa fa-cogs"></i> Organisme</a>
</li>
<li class="navbar-dashboard-item">
<a href="dashboard-admin-participant?token={{ token }}"><i class="fa fa-user"></i> Participant</a>
</li>
<li class="navbar-dashboard-item">
<a href="dashboard-admin-thematique?token={{ token }}"><i class="fa fa-cogs"></i> Thématique</a>
</li>
......@@ -26,12 +27,12 @@
<a href="dashboard-admin-salle?token={{ token }}"><i class="fa fa-cogs"></i> Salle</a>
</li>
<li class="navbar-dashboard-item">
<a href="dashboard-admin-organisme?token={{ token }}"><i class="fa fa-cogs"></i> Organisme</a>
<a href="dashboard-admin-inscription?token={{ token }}"><i class="fa fa-address-card-o"></i> Inscription</a>
</li>
</ul>
</nav>
-->
{% block content_dashboard_admin %}{% endblock %}
</div>
{% endblock %}
......@@ -4,17 +4,39 @@
{% block content_dashboard_admin %}
<div class="content-dashboard">
<div class="title-main">
<div class="title-main-content">Dashboard Admin Organisme</div>
<div class="title-main-content">Gestion des Organismes</div>
</div>
<div>
<h4><i class="fa fa-check-square-o"></i> Gestion des Organismes</h4>
<ul>
<li>Affichage</li>
<li>Ajout</li>
<li>Edition</li>
<li>Suppression</li>
</ul>
{% if organismes %}
<div class="table-responsive">
<table class="table table-striped table-bordered">
<thead>
<tr>
<td width="20%">Label</td>
<td width="20%">Nb Places Pré-Payées</td>
<td width="20%">Nb Places Restantes</td>
</tr>
</thead>
<tbody>
{% for organisme in organismes %}
<tr>
<td>{{ organisme.getLabel() }}</td>
{% if organisme.getNbPlaces() != 0 %}
<td><span class="badge badge-inverse">{{ organisme.getNbPlaces() }}</span></td>
<td><span class="badge badge-inverse">{{ organisme.getNbLibres() }}</span></td>
{% else %}
<td><span>{{ organisme.getNbPlaces() }}</span></td>
<td><span>{{ organisme.getNbLibres() }}</span></td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<p>pas encore d'inscrits</p>
{% endif %}
</div>
</div>
{% endblock %}
......@@ -4,20 +4,64 @@
{% block content_dashboard_admin %}
<div class="content-dashboard">
<div class="title-main">
<div class="title-main-content">Dashboard Admin Participants</div>
<div class="title-main-content">Gestion des Participants</div>
</div>
<div>
<h4><i class="fa fa-check-square-o"></i> Gestion des Participants</h4>
<ul>
<li>Affichage</li>
<li>Ajout</li>
<li>Edition</li>
<li>Suppression</li>
<li>Accès au parcours individuel</li>
<li>Affichage du QR-code </li>
<li>Affichage du badge</li>
</ul>
{% if participants %}
<div class="table-responsive">
<table class="table table-striped table-bordered">
<thead>
<tr>
<td width="5%">Email</td>
<td width="25%">Participant</td>
<td width="30%">Organisme</td>
<td width="10%">Role</td>
<td width="5%">Statut</td>
<td>Paiement</td>
</tr>
</thead>
<tbody>
{% for participant in participants %}
<tr>
<td><a href="mailto:{{ participant.getEmail() }}"><i class="fa fa-envelope-o"></i></a></td>
<td>{{ participant.getNom()|upper }} {{ participant.getPrenom() }}</td>
<td>{{ participant.getOrganisme().getLabel() }}</td>
<td>{{ participant.getRole() }}</td>
{% if participant.getRole() == 'Organisateur' %}
{% if participant.getAccesValide() == true %}
<td><i class="fa fa-check-circle-o"></i></td>
<td>-</td>
{% else %}
<td><i class="fa fa-pause"></i></td>
<td>-</td>
{% endif %}
{% else %}
{% if participant.getPassPrepaye() == true %}
<td><i class="fa fa-check-circle-o"></i></td>
<td>Place Pré-Payée</td>
{% else %}
{% if participant.getAccesValide() == true %}
<td><i class="fa fa-check-circle-o"></i></td>
<td>Azur-Colloque</td>
{% else %}
<td><i class="fa fa-credit-card"></i></td>
<td>Azur-Colloque</td>
{% endif %}
{% endif %}
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<p>pas encore d'inscrits</p>
{% endif %}
</div>
</div>
{% endblock %}
......@@ -4,17 +4,32 @@
{% block content_dashboard_admin %}
<div class="content-dashboard">
<div class="title-main">
<div class="title-main-content">Dashboard Admin Thématique</div>
<div class="title-main-content">Gestion des Thématiques</div>
</div>
<div>
<h4><i class="fa fa-check-square-o"></i> Gestion des Thématiques</h4>
<ul>
<li>Affichage</li>
<li>Ajout</li>
<li>Edition</li>
<li>Suppression</li>
</ul>
{% if thematiques %}
<div class="table-responsive">
<table class="table table-striped table-bordered">
<thead>
<tr>
<td></td>
<td width="20%"></td>
</tr>
</thead>
<tbody>
{% for thematique in thematiques %}
<tr>
<td>{{ thematique.getNom() }}</td>
<td><a href="http://devlog.cnrs.fr/jdev2017/t{{ thematique.getId() }}" target="_blank"><i class="fa fa-external-link"></i></a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<p>pas encore d'inscrits</p>
{% endif %}
</div>
</div>
{% endblock %}
......@@ -124,7 +124,7 @@
<div class="info-pratique-img" style="background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.2)), url('images/hotel2_min.png');">
</div>
<div class="info-pratique-text">
<p>Les JDEV vous propose une liste d'hotels situés proches de la conférence.</p>
<p>Le comité des JDEV vous propose une liste d'hotels situés proches de la conférence.</p>
<a href="info-hebergement" class="btn btn-info">Informations Hébergement</a>
</div>
</div>
......
......@@ -3,8 +3,8 @@
position: fixed;
top: 0;
left: 0;
width: 240px;
height: 80vh;
width: 220px;
height: 100vh;
padding-top: 70px;
background: rgba(236, 239, 241, 0.8);
box-shadow: 3px 0 6px rgba(0,0,0,0.24);
......@@ -65,8 +65,17 @@
color: #59a3e2;
}
.content-dashboard {
//margin-left: 180px;
margin-left: 0px;
margin-left: 190px;
//margin-left: 0px;
}
.fa-check-circle-o {
color: #158c38;
}
.fa-pause {
color: #ec971f;
}
.fa-credit-card {
color: #0d539e;
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment