fichier langue / bootstrap
This commit is contained in:
@@ -16,7 +16,7 @@ public class WebConfig {
|
|||||||
@Bean
|
@Bean
|
||||||
public LocaleResolver localeResolver() {
|
public LocaleResolver localeResolver() {
|
||||||
SessionLocaleResolver resolver = new SessionLocaleResolver();
|
SessionLocaleResolver resolver = new SessionLocaleResolver();
|
||||||
resolver.setDefaultLocale(Locale.FRENCH); // Définit la locale par défaut
|
resolver.setDefaultLocale(Locale.FRENCH);
|
||||||
return resolver;
|
return resolver;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class WebSecurityConfig{
|
|||||||
.requestMatchers("/", "/accueil").permitAll()
|
.requestMatchers("/", "/accueil").permitAll()
|
||||||
.requestMatchers("/accueil", "/login", "/inscription/**", "/searchArticle", "/article/**", "/change-language").permitAll()
|
.requestMatchers("/accueil", "/login", "/inscription/**", "/searchArticle", "/article/**", "/change-language").permitAll()
|
||||||
.requestMatchers("/css/**", "/images/**", "/assets/**", "/img/**", "/js/**").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")
|
.requestMatchers("/admin").hasRole("ADMIN")
|
||||||
.anyRequest().authenticated())
|
.anyRequest().authenticated())
|
||||||
.formLogin((form) -> form.loginPage("/login").defaultSuccessUrl("/", true))
|
.formLogin((form) -> form.loginPage("/login").defaultSuccessUrl("/", true))
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
spring.datasource.url=jdbc:mariadb://91.121.54.36:3306/eni_enchere
|
spring.datasource.url=jdbc:mariadb://91.121.54.36:3306/eni_enchere
|
||||||
spring.datasource.username=eni
|
spring.datasource.username=eni
|
||||||
spring.datasource.password=Pa$$w0rd
|
spring.datasource.password=Pa$$w0rd
|
||||||
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
|
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
|
||||||
|
spring.messages.encoding=UTF-8
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
accueil.search.title = Rechercher un article par nom...
|
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
|
accueil.search.button = Recherche
|
||||||
@@ -3,48 +3,60 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="container-main">
|
<div class="container-fluid" id="container-main">
|
||||||
<h1>Mon profil</h1>
|
<div class="row mt-3">
|
||||||
<div class="champ-affichage">
|
<div class="col-md-6 offset-md-3">
|
||||||
<label>Pseudo: </label>
|
<div class="card">
|
||||||
<span th:text="${userProfile.pseudo}"></span>
|
<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>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<strong><label class="col-form-label">Prénom:</label></strong>
|
||||||
|
<span th:text="${userProfile.prenom}"></span>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<strong><label class="col-form-label">Nom:</label></strong>
|
||||||
|
<span th:text="${userProfile.nom}"></span>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<strong><label class="col-form-label">Email:</label></strong>
|
||||||
|
<span th:text="${userProfile.email}"></span>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<strong><label class="col-form-label">Téléphone:</label></strong>
|
||||||
|
<span th:text="${userProfile.telephone}"></span>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<strong><label class="col-form-label">Rue:</label></strong>
|
||||||
|
<span th:text="${userProfile.rue}"></span>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<strong><label class="col-form-label">Code postal:</label></strong>
|
||||||
|
<span th:text="${userProfile.code_postal}"></span>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<strong><label class="col-form-label">Ville:</label></strong>
|
||||||
|
<span th:text="${userProfile.ville}"></span>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<strong><label class="col-form-label">Crédits:</label></strong>
|
||||||
|
<span th:text="${userProfile.credit}"></span>
|
||||||
|
</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 class="champ-affichage">
|
|
||||||
<label>Prénom: </label>
|
|
||||||
<span th:text="${userProfile.prenom}"></span>
|
|
||||||
</div>
|
|
||||||
<div class="champ-affichage">
|
|
||||||
<label>Nom: </label>
|
|
||||||
<span th:text="${userProfile.nom}"></span>
|
|
||||||
</div>
|
|
||||||
<div class="champ-affichage">
|
|
||||||
<label>Email: </label>
|
|
||||||
<span th:text="${userProfile.email}"></span>
|
|
||||||
</div>
|
|
||||||
<div class="champ-affichage">
|
|
||||||
<label>Téléphone: </label>
|
|
||||||
<span th:text="${userProfile.telephone}"></span>
|
|
||||||
</div>
|
|
||||||
<div class="champ-affichage">
|
|
||||||
<label>Rue: </label>
|
|
||||||
<span th:text="${userProfile.rue}"></span>
|
|
||||||
</div>
|
|
||||||
<div class="champ-affichage">
|
|
||||||
<label>Code postal: </label>
|
|
||||||
<span th:text="${userProfile.code_postal}"></span>
|
|
||||||
</div>
|
|
||||||
<div class="champ-affichage">
|
|
||||||
<label>Ville: </label>
|
|
||||||
<span th:text="${userProfile.ville}"></span>
|
|
||||||
</div>
|
|
||||||
<div class="champ-affichage">
|
|
||||||
<label>Crédits: </label>
|
|
||||||
<span th:text="${userProfile.credit}"></span>
|
|
||||||
</div>
|
|
||||||
<form th:action="@{/profil/edit}" method="post">
|
|
||||||
<button type="submit">Modifier</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user