diff --git a/src/main/java/fr/but/infoetu/MeetingPlannr/security/Security.java b/src/main/java/fr/but/infoetu/MeetingPlannr/security/Security.java index 2b4046b6b51f7af73b65daf364181c62e33e0fb9..6b66c61151aa05a5ac84adf0d3bed52ad81f9512 100644 --- a/src/main/java/fr/but/infoetu/MeetingPlannr/security/Security.java +++ b/src/main/java/fr/but/infoetu/MeetingPlannr/security/Security.java @@ -69,7 +69,7 @@ public class Security { .csrf().disable() .authorizeHttpRequests((authorize) -> authorize .dispatcherTypeMatchers(DispatcherType.FORWARD).permitAll() - .requestMatchers(mvc.pattern("/public/**"),mvc.pattern("styles/**")).permitAll() + .requestMatchers(mvc.pattern("/public/**"),mvc.pattern("styles/**"), mvc.pattern("/common/**")).permitAll() .requestMatchers(mvc.pattern("/perform_login")).permitAll() .requestMatchers(mvc.pattern("/user/**")).authenticated() .requestMatchers(mvc.pattern("/admin/**")).hasRole("ADMIN") diff --git a/src/main/resources/import.sql b/src/main/resources/import.sql index d66ef5adb52b2278d9b9af35a0465a2753b1ec5c..cf67af896aac9f20999ce3bd736f1b7eaddf1bf7 100644 --- a/src/main/resources/import.sql +++ b/src/main/resources/import.sql @@ -29,7 +29,6 @@ INSERT INTO requests (reason, description, uno) VALUES ('Réunion de planificati INSERT INTO requests (reason, description, uno) VALUES ('Bilan trimestriel', 'Evaluation des résultats du trimestre', 6); INSERT INTO requests (reason, description, uno) VALUES ('Session de développement', 'Session de codage en équipe', 6); --- Création des meetings liés aux requests INSERT INTO meeting (date, uno, rno) VALUES ('2024-03-20', 6, (SELECT rno FROM requests WHERE reason = 'Rendez-vous pour discussion projet')); INSERT INTO meeting (date, uno, rno) VALUES ('2024-03-25', 6, (SELECT rno FROM requests WHERE reason = 'Point d''avancement mensuel')); INSERT INTO meeting (date, uno, rno) VALUES ('2024-04-01', 6, (SELECT rno FROM requests WHERE reason = 'Réunion de planification')); diff --git a/src/main/resources/static/styles/main.css b/src/main/resources/static/styles/main.css index 947458f3296941c81bacd64a4cf4615caea08fa3..82a70d89e34a4cbe9da803f99e2f03e9d6cebd55 100644 --- a/src/main/resources/static/styles/main.css +++ b/src/main/resources/static/styles/main.css @@ -1,4 +1,9 @@ -/* Style de base */ +* { + margin: 0; + padding: 0; + overflow-x: hidden; +} + body { font-family: Arial, sans-serif; margin: 0; @@ -11,12 +16,12 @@ h1, h2 { } .container { max-width: 800px; - margin: 90px auto 80px auto; /* Réduit la marge du haut */ - padding: 0 30px 30px 30px; /* Supprime le padding du haut */ + margin: 90px auto 80px auto; + padding: 0 30px 30px 30px; background-color: #fff; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.08); - min-height: calc(100vh - 140px); /* Ajout d'une hauteur minimale */ + min-height: calc(80vh - 140px); display: flex; flex-direction: column; } @@ -271,16 +276,11 @@ button.back:hover { flex-shrink: 0; } -/* Header Styles - Updated */ .app-header { background: linear-gradient(135deg, #0056b3, #007bff); color: white; - padding: 1rem; /* Réduit légèrement le padding */ - position: fixed; - top: 0; - left: 0; - right: 0; - z-index: 1000; + padding: 1rem; + width: 100%; box-shadow: 0 2px 10px rgba(0,0,0,0.1); } @@ -323,17 +323,17 @@ button.back:hover { opacity: 0.9; } -/* Footer - Updated */ + .app-footer { background: linear-gradient(135deg, #333, #222); color: white; padding: 1.5rem; - position: fixed; - bottom: 0; - left: 0; - right: 0; text-align: center; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); + position: sticky; + margin-top: auto; + bottom: 0; + width: 100%; } .footer-content { @@ -343,7 +343,6 @@ button.back:hover { opacity: 0.9; } -/* Cards Style */ .meeting-item { background: white; border-radius: 10px; @@ -357,5 +356,3 @@ button.back:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.15); } - -/* ...existing code... */ diff --git a/src/main/webapp/WEB-INF/jsp/common/footer.jsp b/src/main/webapp/WEB-INF/jsp/common/footer.jsp index 9642d63044b7c8edda97e5afd7d92b3b5fd88ae6..b67b6497783a9c641864748efcfcc457319663c4 100644 --- a/src/main/webapp/WEB-INF/jsp/common/footer.jsp +++ b/src/main/webapp/WEB-INF/jsp/common/footer.jsp @@ -1,6 +1,6 @@ <%@ page contentType="text/html;charset=UTF-8" language="java" %> <footer class="app-footer"> <div class="footer-content"> - <p>© 2024 MeetingPlannr - Tous droits réservés</p> + <p>© 2024 MeetingPlannr | Votre gestionnaire de rendez-vous intelligent</p> </div> </footer> diff --git a/src/main/webapp/WEB-INF/jsp/common/header.jsp b/src/main/webapp/WEB-INF/jsp/common/header.jsp index 246a40937dbaa3ccb84889a4807fa1617999a4c2..21e8f5e609d0f80c4f559794783c959bce2d9fd4 100644 --- a/src/main/webapp/WEB-INF/jsp/common/header.jsp +++ b/src/main/webapp/WEB-INF/jsp/common/header.jsp @@ -3,11 +3,12 @@ <div class="header-content"> <div class="logo"> <a href="${pageContext.request.contextPath}/user/listeAction"> + <span class="logo-icon">📅</span> <h1>MeetingPlannr</h1> </a> </div> <div class="header-subtitle"> - Gestionnaire de rendez-vous + Simplifiez la gestion de vos rendez-vous </div> </div> </header> diff --git a/src/main/webapp/WEB-INF/jsp/public/login.jsp b/src/main/webapp/WEB-INF/jsp/public/login.jsp index 0b5499d2a582a0d60940a6670e0374ed6110c3ff..8a24099105ba7622a90907e288c5f8d3bd146831 100644 --- a/src/main/webapp/WEB-INF/jsp/public/login.jsp +++ b/src/main/webapp/WEB-INF/jsp/public/login.jsp @@ -1,4 +1,4 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> <!DOCTYPE html> <html> <head> @@ -6,6 +6,7 @@ <link rel="stylesheet" href="${pageContext.request.contextPath}/styles/main.css"> </head> <body> + <%@ include file="../common/header.jsp" %> <div class="container"> <h2>Login</h2> <form action="${pageContext.request.contextPath}/public/perform_login" method="POST"> @@ -17,7 +18,7 @@ <label for="password">Mot de passe :</label> <input type="password" id="password" name="password" placeholder="Entrez votre mot de passe"> </div> - <button type="submit">Se connecter</button> + <button type="submit" class="submit">Se connecter</button> <a href="register"> Créer un nouveau compte </a> @@ -40,6 +41,6 @@ } %> </div> - + <%@ include file="../common/footer.jsp" %> </body> </html> diff --git a/src/main/webapp/WEB-INF/jsp/public/register.jsp b/src/main/webapp/WEB-INF/jsp/public/register.jsp index 33d548832c6f0bcb7969dde2553388ebce16b481..8109a6cd9439d9a333761943956c10f9f53a7f5e 100644 --- a/src/main/webapp/WEB-INF/jsp/public/register.jsp +++ b/src/main/webapp/WEB-INF/jsp/public/register.jsp @@ -1,4 +1,4 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> <!DOCTYPE html> <html> <head> @@ -6,6 +6,7 @@ <link rel="stylesheet" href="${pageContext.request.contextPath}/styles/main.css"> </head> <body> + <%@ include file="../common/header.jsp" %> <div class="form-container"> <h1>Register</h1> <form action="register" method="post"> @@ -34,7 +35,7 @@ <input type="password" id="password" name="password"> </div> <div class="form-group"> - <button type="submit">Register</button> + <button type="submit" class="submit">Register</button> <a href="login"> Se connecter </a> @@ -49,5 +50,6 @@ } %> </div> + <%@ include file="../common/footer.jsp" %> </body> </html> diff --git a/src/main/webapp/WEB-INF/jsp/user/detailRendezVous.jsp b/src/main/webapp/WEB-INF/jsp/user/detailRendezVous.jsp index b8c9e1ae0baefde48f6ed577b018944c538e56f8..38b74bb93640325ed43d3ebed01e03ab0d38f554 100644 --- a/src/main/webapp/WEB-INF/jsp/user/detailRendezVous.jsp +++ b/src/main/webapp/WEB-INF/jsp/user/detailRendezVous.jsp @@ -1,4 +1,4 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> <!DOCTYPE html> <html> <head> @@ -7,6 +7,7 @@ <link rel="stylesheet" href="${pageContext.request.contextPath}/styles/main.css"> </head> <body> + <%@ include file="../common/header.jsp" %> <div class="container"> <div class="banner"> <h1>Détail du rendez-vous</h1> @@ -27,5 +28,6 @@ <button class="logout" onclick="if(confirm('Êtes-vous sûr de vouloir supprimer ce rendez-vous?')) window.location.href='${pageContext.request.contextPath}/user/meetings/delete/${meeting.mno}'">Supprimer</button> </div> </div> + <%@ include file="../common/footer.jsp" %> </body> </html> diff --git a/src/main/webapp/WEB-INF/jsp/user/editMeeting.jsp b/src/main/webapp/WEB-INF/jsp/user/editMeeting.jsp index 7e2c819baf987bec595b88e958161591c2872882..87498a733ba730f2dfe813e1242623bc98c2aebd 100644 --- a/src/main/webapp/WEB-INF/jsp/user/editMeeting.jsp +++ b/src/main/webapp/WEB-INF/jsp/user/editMeeting.jsp @@ -1,4 +1,4 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <!DOCTYPE html> <html> @@ -8,6 +8,7 @@ <link rel="stylesheet" href="${pageContext.request.contextPath}/styles/main.css"> </head> <body> + <%@ include file="../common/header.jsp" %> <div class="container"> <div class="banner"> <h1>Modifier le rendez-vous</h1> @@ -41,5 +42,6 @@ </div> </form:form> </div> + <%@ include file="../common/footer.jsp" %> </body> </html> diff --git a/src/main/webapp/WEB-INF/jsp/user/editProfile.jsp b/src/main/webapp/WEB-INF/jsp/user/editProfile.jsp index 353581a92f22486fefff5a498ed3c2c43a2e88cd..17976218c61d94830192065b67b9c04254e138dd 100644 --- a/src/main/webapp/WEB-INF/jsp/user/editProfile.jsp +++ b/src/main/webapp/WEB-INF/jsp/user/editProfile.jsp @@ -9,6 +9,7 @@ <link rel="stylesheet" href="${pageContext.request.contextPath}/styles/main.css"> </head> <body> + <%@ include file="../common/header.jsp" %> <div class="container"> <h1>Modifier le Profil</h1> <div class="form-container"> @@ -36,5 +37,6 @@ %> </div> </div> + <%@ include file="../common/footer.jsp" %> </body> </html> diff --git a/src/main/webapp/WEB-INF/jsp/user/profile.jsp b/src/main/webapp/WEB-INF/jsp/user/profile.jsp index 8b7dd22909ee7a07013418ef594ef1d72f6e2456..5aff482e3fc81004cc119cbd03ddc59d8975217e 100644 --- a/src/main/webapp/WEB-INF/jsp/user/profile.jsp +++ b/src/main/webapp/WEB-INF/jsp/user/profile.jsp @@ -25,5 +25,6 @@ </form> </div> </div> + <%@ include file="../common/footer.jsp" %> </body> </html> \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/user/rendezVous.jsp b/src/main/webapp/WEB-INF/jsp/user/rendezVous.jsp index e43f5f5a3dc0698f1b750eb8aa1059e57ef8b22c..8c51e66d29394609a25528fbda015242440a65e9 100644 --- a/src/main/webapp/WEB-INF/jsp/user/rendezVous.jsp +++ b/src/main/webapp/WEB-INF/jsp/user/rendezVous.jsp @@ -10,6 +10,7 @@ <link rel="stylesheet" href="${pageContext.request.contextPath}/styles/main.css"> </head> <body> + <%@ include file="../common/header.jsp" %> <div class="container"> <h1>Mes Rendez-vous</h1> <div class="meetings-list"> @@ -42,5 +43,6 @@ <button onclick="window.location.href='${pageContext.request.contextPath}/user/listeAction'" class="back">Retour</button> </div> </div> + <%@ include file="../common/footer.jsp" %> </body> </html>