fichier langue / bootstrap

This commit is contained in:
mepiphana2023
2024-04-24 11:19:28 +02:00
parent 86bcf8c022
commit 067920189f
5 changed files with 59 additions and 46 deletions

View File

@@ -16,7 +16,7 @@ public class WebConfig {
@Bean
public LocaleResolver localeResolver() {
SessionLocaleResolver resolver = new SessionLocaleResolver();
resolver.setDefaultLocale(Locale.FRENCH); // Définit la locale par défaut
resolver.setDefaultLocale(Locale.FRENCH);
return resolver;
}

View File

@@ -19,7 +19,7 @@ public class WebSecurityConfig{
.requestMatchers("/", "/accueil").permitAll()
.requestMatchers("/accueil", "/login", "/inscription/**", "/searchArticle", "/article/**", "/change-language").permitAll()
.requestMatchers("/css/**", "/images/**", "/assets/**", "/img/**", "/js/**").permitAll()
.requestMatchers("/profil/**", "/article/new/**", "/article/update", "/article/delete").authenticated()
.requestMatchers("/profil/**", "/article/new/**").authenticated()
.requestMatchers("/admin").hasRole("ADMIN")
.anyRequest().authenticated())
.formLogin((form) -> form.loginPage("/login").defaultSuccessUrl("/", true))

View File

@@ -2,3 +2,4 @@ spring.datasource.url=jdbc:mariadb://91.121.54.36:3306/eni_enchere
spring.datasource.username=eni
spring.datasource.password=Pa$$w0rd
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.messages.encoding=UTF-8

View File

@@ -1,3 +1,3 @@
accueil.search.title = Rechercher un article par nom...
accueil.search.cat = Toutes les catégories
accueil.search.cat = Toutes les cat\u00e9gories
accueil.search.button = Recherche

View File

@@ -4,47 +4,59 @@
<meta charset="UTF-8">
</head>
<body>
<div id="container-main">
<h1>Mon profil</h1>
<div class="champ-affichage">
<label>Pseudo: </label>
<div class="container-fluid" id="container-main">
<div class="row mt-3">
<div class="col-md-6 offset-md-3">
<div class="card">
<div class="card-header">
<h4>Mon profil</h4>
</div>
<div class="card-body">
<ul class="list-group">
<li class="list-group-item">
<strong><label class="col-form-label">Pseudo:</label></strong>
<span th:text="${userProfile.pseudo}"></span>
</div>
<div class="champ-affichage">
<label>Prénom: </label>
</li>
<li class="list-group-item">
<strong><label class="col-form-label">Prénom:</label></strong>
<span th:text="${userProfile.prenom}"></span>
</div>
<div class="champ-affichage">
<label>Nom: </label>
</li>
<li class="list-group-item">
<strong><label class="col-form-label">Nom:</label></strong>
<span th:text="${userProfile.nom}"></span>
</div>
<div class="champ-affichage">
<label>Email: </label>
</li>
<li class="list-group-item">
<strong><label class="col-form-label">Email:</label></strong>
<span th:text="${userProfile.email}"></span>
</div>
<div class="champ-affichage">
<label>Téléphone: </label>
</li>
<li class="list-group-item">
<strong><label class="col-form-label">Téléphone:</label></strong>
<span th:text="${userProfile.telephone}"></span>
</div>
<div class="champ-affichage">
<label>Rue: </label>
</li>
<li class="list-group-item">
<strong><label class="col-form-label">Rue:</label></strong>
<span th:text="${userProfile.rue}"></span>
</div>
<div class="champ-affichage">
<label>Code postal: </label>
</li>
<li class="list-group-item">
<strong><label class="col-form-label">Code postal:</label></strong>
<span th:text="${userProfile.code_postal}"></span>
</div>
<div class="champ-affichage">
<label>Ville: </label>
</li>
<li class="list-group-item">
<strong><label class="col-form-label">Ville:</label></strong>
<span th:text="${userProfile.ville}"></span>
</div>
<div class="champ-affichage">
<label>Crédits: </label>
</li>
<li class="list-group-item">
<strong><label class="col-form-label">Crédits:</label></strong>
<span th:text="${userProfile.credit}"></span>
</div>
<form th:action="@{/profil/edit}" method="post">
<button type="submit">Modifier</button>
</li>
</ul>
<form th:action="@{/profil/edit}" method="post" class="mt-3">
<button type="submit" class="btn btn-primary">Modifier</button>
</form>
</div>
</div>
</div>
</div>
</div>
</body>
</html>