AffichageProfil #45
Merged
leo.tuaillon
merged 5 commits from AffichageProfil
into master
1 year ago
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SqlDialectMappings">
|
||||
<file url="file://$PROJECT_DIR$/php/src/gateway/AlumniGateway.php" dialect="GenericSQL" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,122 @@
|
||||
/* profil.css */
|
||||
.profiles-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
gap: 20px;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.profile {
|
||||
width: calc(50% - 20px); /* Ajustez la largeur si nécessaire pour correspondre au design */
|
||||
border: 1px solid #ccc; /* Bordure comme dans l'image */
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
margin-bottom: 20px;
|
||||
display: flex;
|
||||
align-items: center; /* Alignement vertical */
|
||||
}
|
||||
|
||||
.profile-image-container {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #f0f0f0;
|
||||
flex-shrink: 0; /* Empêche le conteneur de rétrécir */
|
||||
}
|
||||
|
||||
.profile-image-container img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.profile-details {
|
||||
padding: 10px;
|
||||
flex-grow: 1; /* Permet à ce div de prendre l'espace restant */
|
||||
}
|
||||
|
||||
.profile-details p {
|
||||
margin: 5px 0;
|
||||
font-weight: bold; /* Texte en gras comme dans l'image */
|
||||
}
|
||||
|
||||
.profile-details .job-title {
|
||||
color: #007bff;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
.profile-details a {
|
||||
display: block; /* Prend toute la largeur du conteneur */
|
||||
background: #007bff;
|
||||
color: #fff;
|
||||
padding: 5px 15px;
|
||||
text-decoration: none;
|
||||
border-radius: 5px;
|
||||
font-size: 14px;
|
||||
margin-top: 10px; /* Espace au-dessus du lien */
|
||||
text-align: center; /* Centre le texte dans le lien */
|
||||
}
|
||||
|
||||
.profile-details a:hover {
|
||||
background: #0056b3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* profil.css */
|
||||
.pagination {
|
||||
display: flex;
|
||||
padding-left: 0;
|
||||
list-style: none;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.page-link {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: 0.5rem 0.75rem;
|
||||
margin-left: -1px;
|
||||
line-height: 1.25;
|
||||
color: #007bff;
|
||||
background-color: #fff;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
||||
|
||||
.page-link:hover {
|
||||
color: #0056b3;
|
||||
text-decoration: none;
|
||||
background-color: #e9ecef;
|
||||
border-color: #dee2e6;
|
||||
}
|
||||
|
||||
.page-item:first-child .page-link {
|
||||
margin-left: 0;
|
||||
border-top-left-radius: 0.25rem;
|
||||
border-bottom-left-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.page-item:last-child .page-link {
|
||||
border-top-right-radius: 0.25rem;
|
||||
border-bottom-right-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.page-item.active .page-link {
|
||||
z-index: 1;
|
||||
color: #fff;
|
||||
background-color: #007bff;
|
||||
border-color: #007bff;
|
||||
}
|
||||
|
||||
.page-item.disabled .page-link {
|
||||
color: #6c757d;
|
||||
pointer-events: none;
|
||||
cursor: auto;
|
||||
background-color: #fff;
|
||||
border-color: #dee2e6;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Profils des Alumnis</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="{{ dir }}/public/css/profil.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
{% include "menu.html" %}
|
||||
</header>
|
||||
<h1 class="text-center my-4">Les Alumnis :</h1>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 col-md-8">
|
||||
<div class="profiles-container">
|
||||
{% for profil in profils %}
|
||||
<div class="profile d-flex">
|
||||
<div class="profile-image-container">
|
||||
<img src="{{ dir }}/public/assets/{{ profil.image ?: 'default.png' }}" alt="Image de profil">
|
||||
</div>
|
||||
<div class="profile-details">
|
||||
<p>{{ profil.prenom }} {{ profil.nom }}</p>
|
||||
<p class="job-title">Développeur web chez CGI FRANCE</p>
|
||||
<a href="{{ 'voir_profil.php?id=' ~ profil.id }}" class="btn btn-primary">Voir le détail du profil</a>
|
||||
{% if user.role == 'admin' %}
|
||||
<a href="{{ 'bloquer_profil.php?id=' ~ profil.id }}" class="btn btn-danger">Bannir l'utilisateur</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>Aucun profil trouvé.</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav aria-label="Page navigation example">
|
||||
<ul class="pagination justify-content-center">
|
||||
<li class="page-item {% if page <= 1 %}disabled{% endif %}">
|
||||
<a class="page-link" href="{{ dir }}/getProfilByPage/{{ page - 1 }}" tabindex="-1">Précédente</a>
|
||||
</li>
|
||||
|
||||
{% for i in 1..nombreTotalPages %}
|
||||
<li class="page-item {% if page == i %}active{% endif %}">
|
||||
<a class="page-link" href="{{ dir }}/getProfilByPage/{{ i }}">{{ i }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
{% if page < nombreTotalPages %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ dir }}/getProfilByPage/{{ page + 1 }}">Suivante</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="#">Suivante</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue