From ff7df78e318838521f189f187538c02a758908be Mon Sep 17 00:00:00 2001 From: jleroy Date: Fri, 26 Apr 2024 13:51:17 +0200 Subject: [PATCH 1/6] Page admin final no css --- .../eni/enchere/bll/CategorieServiceImpl.java | 2 +- .../java/fr/eni/enchere/bll/UserService.java | 1 + .../fr/eni/enchere/bll/UserServiceImpl.java | 5 ++++ .../enchere/controllers/AdminController.java | 24 +++++++++++++++++++ .../controllers/ArticleController.java | 1 - .../enchere/dal/CategorieRepositoryImpl.java | 8 ++++--- .../fr/eni/enchere/dal/UserRepository.java | 1 + .../eni/enchere/dal/UserRepositoryImpl.java | 6 +++++ .../enchere/security/WebSecurityConfig.java | 1 + src/main/resources/templates/admin.html | 10 +++++++- 10 files changed, 53 insertions(+), 6 deletions(-) diff --git a/src/main/java/fr/eni/enchere/bll/CategorieServiceImpl.java b/src/main/java/fr/eni/enchere/bll/CategorieServiceImpl.java index 2039e8a..8a9c358 100644 --- a/src/main/java/fr/eni/enchere/bll/CategorieServiceImpl.java +++ b/src/main/java/fr/eni/enchere/bll/CategorieServiceImpl.java @@ -35,7 +35,7 @@ public class CategorieServiceImpl implements CategorieService { @Override public void updateCategorie(Categorie categorie) { - + categorieRepository.updateCategorie(categorie); } @Override diff --git a/src/main/java/fr/eni/enchere/bll/UserService.java b/src/main/java/fr/eni/enchere/bll/UserService.java index ac9a9fb..1ea8f02 100644 --- a/src/main/java/fr/eni/enchere/bll/UserService.java +++ b/src/main/java/fr/eni/enchere/bll/UserService.java @@ -11,6 +11,7 @@ public interface UserService { List listPseudo(); List listEmail(); void setUtilisateur(UserProfil utilisateur); + void setCredit(float credit, int id); void deleteUtilisateur(int id); void disableUtilisateur(int id); } diff --git a/src/main/java/fr/eni/enchere/bll/UserServiceImpl.java b/src/main/java/fr/eni/enchere/bll/UserServiceImpl.java index 7bc026c..35a229f 100644 --- a/src/main/java/fr/eni/enchere/bll/UserServiceImpl.java +++ b/src/main/java/fr/eni/enchere/bll/UserServiceImpl.java @@ -45,6 +45,11 @@ public class UserServiceImpl implements UserService { userRepository.save(utilisateur); } + @Override + public void setCredit(float credit, int id) { + userRepository.updateCredit(credit, id); + } + @Override public void deleteUtilisateur(int id) { userRepository.delete(id); diff --git a/src/main/java/fr/eni/enchere/controllers/AdminController.java b/src/main/java/fr/eni/enchere/controllers/AdminController.java index 3f93934..aab7d14 100644 --- a/src/main/java/fr/eni/enchere/controllers/AdminController.java +++ b/src/main/java/fr/eni/enchere/controllers/AdminController.java @@ -44,7 +44,31 @@ public class AdminController { Categorie categorie = new Categorie(); categorie.setLibelle(libelle); categorie.setId(idCategorie); + categorieService.updateCategorie(categorie); + return "redirect:/admin"; + } + @PostMapping("/update/credit") + public String updateCreditUser(@RequestParam("newCredit") float credit, @RequestParam("idUser") int idUser) { + userService.setCredit(credit, idUser); + return "redirect:/admin"; + } + + @PostMapping("/deleteC") + public String deleteCategorie(@RequestParam("deleteIdCategorie") int id) { + categorieService.deleteCategorie(id); + return "redirect:/admin"; + } + + @PostMapping("/delete") + public String deleteUser(@RequestParam("userDelete") int id) { + userService.deleteUtilisateur(id); + return "redirect:/admin"; + } + + @PostMapping("/disabled") + public String disabledUser(@RequestParam("userDisabled") int id) { + userService.disableUtilisateur(id); return "redirect:/admin"; } diff --git a/src/main/java/fr/eni/enchere/controllers/ArticleController.java b/src/main/java/fr/eni/enchere/controllers/ArticleController.java index 08de78a..2bf9c07 100644 --- a/src/main/java/fr/eni/enchere/controllers/ArticleController.java +++ b/src/main/java/fr/eni/enchere/controllers/ArticleController.java @@ -194,7 +194,6 @@ public class ArticleController { for (JsonNode node : responseBody) { String cityName = node.get("nomCommune").asText(); villeCodePostal.add(cityName); - System.out.println(cityName); } } else { redirectAttributes.addAttribute("erreur", "Une erreur est survenue !"); diff --git a/src/main/java/fr/eni/enchere/dal/CategorieRepositoryImpl.java b/src/main/java/fr/eni/enchere/dal/CategorieRepositoryImpl.java index f515228..9bdfed6 100644 --- a/src/main/java/fr/eni/enchere/dal/CategorieRepositoryImpl.java +++ b/src/main/java/fr/eni/enchere/dal/CategorieRepositoryImpl.java @@ -50,17 +50,19 @@ public class CategorieRepositoryImpl implements CategorieRepository { @Override public void saveCategorie(Categorie categorie) { - String sql = "INSERT INTO CATEGORIES (\t=libelle) VALUES (?)"; + String sql = "INSERT INTO CATEGORIES (libelle) VALUES (?)"; jdbcTemplate.update(sql, categorie.getLibelle()); } @Override public void updateCategorie(Categorie categorie) { - + String sql = "UPDATE CATEGORIES SET libelle = ? WHERE no_categorie = ?"; + jdbcTemplate.update(sql, categorie.getLibelle(), categorie.getId()); } @Override public void deleteCategorie(int id) { - + String sql = "UPDATE CATEGORIES SET isDelete = 1 WHERE no_categorie = ?"; + jdbcTemplate.update(sql, id); } } diff --git a/src/main/java/fr/eni/enchere/dal/UserRepository.java b/src/main/java/fr/eni/enchere/dal/UserRepository.java index 3f67a6a..ce76f1e 100644 --- a/src/main/java/fr/eni/enchere/dal/UserRepository.java +++ b/src/main/java/fr/eni/enchere/dal/UserRepository.java @@ -11,6 +11,7 @@ public interface UserRepository { List findAllUsernames(); List findAllEmail(); void save(UserProfil utilisateur); + void updateCredit(float credit, int id); void delete(int id); void disable(int id); } diff --git a/src/main/java/fr/eni/enchere/dal/UserRepositoryImpl.java b/src/main/java/fr/eni/enchere/dal/UserRepositoryImpl.java index d96c466..a37e7fd 100644 --- a/src/main/java/fr/eni/enchere/dal/UserRepositoryImpl.java +++ b/src/main/java/fr/eni/enchere/dal/UserRepositoryImpl.java @@ -134,6 +134,12 @@ public class UserRepositoryImpl implements UserRepository { } } + @Override + public void updateCredit(float credit, int id) { + String sql = "UPDATE UTILISATEURS SET credit = ? WHERE no_utilisateur = ?"; + jdbcTemplate.update(sql, credit, id); + } + @Override public void delete(int id) { String sql = "UPDATE UTILISATEURS SET isDelete = 1 WHERE no_utilisateur = ?"; diff --git a/src/main/java/fr/eni/enchere/security/WebSecurityConfig.java b/src/main/java/fr/eni/enchere/security/WebSecurityConfig.java index e48eccb..f1e366c 100644 --- a/src/main/java/fr/eni/enchere/security/WebSecurityConfig.java +++ b/src/main/java/fr/eni/enchere/security/WebSecurityConfig.java @@ -4,6 +4,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.security.web.SecurityFilterChain; diff --git a/src/main/resources/templates/admin.html b/src/main/resources/templates/admin.html index 37b1256..57aec75 100644 --- a/src/main/resources/templates/admin.html +++ b/src/main/resources/templates/admin.html @@ -24,7 +24,7 @@ -
+
@@ -45,6 +45,7 @@ Nom Prénom Email + Crédit(s) Action @@ -55,6 +56,13 @@ + +
+ + + +
+
From df6c7c0cbc8e1602068dd1f6a50de3e115ccbae7 Mon Sep 17 00:00:00 2001 From: mepiphana2023 Date: Fri, 26 Apr 2024 13:51:36 +0200 Subject: [PATCH 2/6] langue --- .../resources/i18n/messages_en.properties | 1 + .../resources/i18n/messages_fr.properties | 7 ++ src/main/resources/templates/modele-page.html | 19 ++-- src/main/resources/templates/newArticle.html | 103 +++++++++--------- 4 files changed, 68 insertions(+), 62 deletions(-) diff --git a/src/main/resources/i18n/messages_en.properties b/src/main/resources/i18n/messages_en.properties index cbbe94f..26c6e4b 100644 --- a/src/main/resources/i18n/messages_en.properties +++ b/src/main/resources/i18n/messages_en.properties @@ -2,6 +2,7 @@ home.search.title = Search for an item by name... home.search.cat = All categories home.search.button = Search home.button.lang = Changer en Fran\u00E7ais +home.button.lang2 = EN profil.title = My Profile profil.button = Edit diff --git a/src/main/resources/i18n/messages_fr.properties b/src/main/resources/i18n/messages_fr.properties index a2dbae7..4869fe3 100644 --- a/src/main/resources/i18n/messages_fr.properties +++ b/src/main/resources/i18n/messages_fr.properties @@ -2,6 +2,13 @@ home.search.title = Rechercher un article par nom... home.search.cat = Toutes les cat\u00e9gories home.search.button = Recherche home.button.lang = Switch to English +home.button.lang2 = FR +home.credit = Mes cr\u00e9dits : +home.nav.enchere = Encheres +home.nav.vend = Vendre un article +home.nav.login= S'inscrire / Se connecter +home.profil.profil = Profil +home.profil.logout = D\u00e9connexion profil.title = Mon profile profil.button = Modifier diff --git a/src/main/resources/templates/modele-page.html b/src/main/resources/templates/modele-page.html index 96aa420..d76a755 100644 --- a/src/main/resources/templates/modele-page.html +++ b/src/main/resources/templates/modele-page.html @@ -21,35 +21,38 @@
diff --git a/src/main/resources/templates/newArticle.html b/src/main/resources/templates/newArticle.html index abe0abf..97dee47 100644 --- a/src/main/resources/templates/newArticle.html +++ b/src/main/resources/templates/newArticle.html @@ -2,97 +2,92 @@ + -
-

Nouvelle vente

- - -
- - +
+

Nouvelle vente

+ +
+ + +
Ce champ est requis.
- -
- - +
+ + +
Ce champ est requis.
- -
- - +
Veuillez sélectionner une catégorie.
- -
- - +
+ +
- -
- - +
+ + +
Ce champ est requis.
- -
- - +
+ + +
Ce champ est requis.
- -
- - +
+ + +
Ce champ est requis.
-

Retrait

-
- - +
+ + +
Ce champ est requis.
-
- - +
+ + +
Ce champ est requis.
-
- - +
+ + +
Ce champ est requis.
- -
- -
+ - -
+

-
- + +
+ + From 413aa031e5f9a3d97f01886629549011266f9c1f Mon Sep 17 00:00:00 2001 From: Parpaillax Date: Fri, 26 Apr 2024 13:51:57 +0200 Subject: [PATCH 3/6] better article --- .../controllers/ArticleController.java | 31 +++++++++++-------- .../controllers/EnchereController.java | 12 +++++-- .../enchere/dal/EnchereRepositoryImpl.java | 4 ++- src/main/resources/templates/article.html | 14 +++++++-- 4 files changed, 42 insertions(+), 19 deletions(-) diff --git a/src/main/java/fr/eni/enchere/controllers/ArticleController.java b/src/main/java/fr/eni/enchere/controllers/ArticleController.java index 08de78a..f039e90 100644 --- a/src/main/java/fr/eni/enchere/controllers/ArticleController.java +++ b/src/main/java/fr/eni/enchere/controllers/ArticleController.java @@ -1,12 +1,10 @@ package fr.eni.enchere.controllers; import com.fasterxml.jackson.databind.JsonNode; -import fr.eni.enchere.bll.ArticleService; -import fr.eni.enchere.bll.CategorieService; -import fr.eni.enchere.bll.RetraitService; -import fr.eni.enchere.bll.UserService; +import fr.eni.enchere.bll.*; import fr.eni.enchere.bo.*; import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.security.core.Authentication; @@ -14,6 +12,7 @@ import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; +import org.springframework.validation.ObjectError; import org.springframework.web.bind.annotation.*; import org.springframework.web.client.RestTemplate; import org.springframework.web.multipart.MultipartFile; @@ -25,6 +24,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.Date; import java.util.List; +import java.util.Optional; import java.util.regex.Pattern; @Controller() @@ -38,12 +38,14 @@ public class ArticleController { private final UserService userService; private CategorieService categorieService; private RetraitService retraitService; + private EnchereService enchereService; - public ArticleController(ArticleService articleService, UserService userService, CategorieService categorieService, RetraitService retraitService) { + public ArticleController(ArticleService articleService, UserService userService, CategorieService categorieService, RetraitService retraitService, EnchereService enchereService) { this.articleService = articleService; this.userService = userService; this.categorieService = categorieService; this.retraitService = retraitService; + this.enchereService = enchereService; } @GetMapping @@ -54,31 +56,34 @@ public class ArticleController { //Affichage d'un article @GetMapping("/show") - public String showArticle(@RequestParam()int id, Model model) { + public String showArticle(@RequestParam()int id, Model model, HttpSession session) { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); if (!authentication.getName().equals("anonymousUser")) { Article article = articleService.findArticleById(id); UserProfil user = userService.utilisateurById(article.getUtilisateur()); Categorie cate = categorieService.findCategorieById(article.getNumCategorie()); Retrait retrait = retraitService.retraitByNumarticle(article.getId()); + List lastEnchere = this.enchereService.enchereByArticle(article.getId()); + Optional maxMontantEnchere = lastEnchere.stream() + .map(Enchere::getMontantEnchere) // Récupère seulement les montants d'enchère + .max(Float::compareTo); model.addAttribute("article", article); model.addAttribute("username", user); model.addAttribute("cate", cate.getLibelle()); model.addAttribute("retrait", retrait); model.addAttribute("enchere", new Enchere()); + model.addAttribute("maxEnchere", maxMontantEnchere.get()); + List errors = (List) session.getAttribute("errors"); + if (errors != null) { + model.addAttribute("errors", errors); + session.removeAttribute("errors"); // Supprimer les erreurs de la session après utilisation + } return "article"; } else { return "redirect:/accueil"; } } - @GetMapping("/{slug}") - public String testShowArticle(@PathVariable(name = "slug")int id, Model model) { - Article article = articleService.findArticleById(id); - model.addAttribute("article", article); - return "article"; - } - //Création d'un article @GetMapping("/new") diff --git a/src/main/java/fr/eni/enchere/controllers/EnchereController.java b/src/main/java/fr/eni/enchere/controllers/EnchereController.java index 155ee41..48066c4 100644 --- a/src/main/java/fr/eni/enchere/controllers/EnchereController.java +++ b/src/main/java/fr/eni/enchere/controllers/EnchereController.java @@ -5,7 +5,9 @@ import fr.eni.enchere.bll.EnchereService; import fr.eni.enchere.bll.UserService; import fr.eni.enchere.bo.Article; import fr.eni.enchere.bo.Enchere; +import fr.eni.enchere.bo.UserProfil; import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; @@ -34,7 +36,7 @@ public class EnchereController { } @PostMapping("/incEnchere") - public String incEnchere(@ModelAttribute("enchere") Enchere enchere, @RequestParam("articleId") int articleId, BindingResult result) { + public String incEnchere(@ModelAttribute("enchere") Enchere enchere, @RequestParam("articleId") int articleId, BindingResult result, HttpSession session) { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); enchere.setNoArticle(articleId); enchere.setNoUtilisateur(this.userService.utilisateurByName(authentication.getName()).getId()); @@ -54,12 +56,18 @@ public class EnchereController { Optional maxMontantEnchere = lastEnchere.stream() .map(Enchere::getMontantEnchere) // Récupère seulement les montants d'enchère .max(Float::compareTo); - System.out.println(maxMontantEnchere); if (maxMontantEnchere.isPresent() && encherePrice < maxMontantEnchere.get()) { result.rejectValue("montantEnchere", "error.enchere", "Vous ne pouvez pas enchérir un montant inférieur à la dernière enchère"); } + //Empeche l'enchère si les crédits du user sont inférieur au prix initial de l'article + float userCredit = this.userService.utilisateurByName(authentication.getName()).getCredit(); + if (userCredit < encherePrice) { + result.rejectValue("montantEnchere", "error.enchere", "Vous ne pouvez pas enchérir si vous n'avez pas les fonds suffisant"); + } + if (result.hasErrors()) { + session.setAttribute("errors", result.getAllErrors()); return "redirect:/article/show?id=" + articleId; } diff --git a/src/main/java/fr/eni/enchere/dal/EnchereRepositoryImpl.java b/src/main/java/fr/eni/enchere/dal/EnchereRepositoryImpl.java index 54b1b18..b82a99c 100644 --- a/src/main/java/fr/eni/enchere/dal/EnchereRepositoryImpl.java +++ b/src/main/java/fr/eni/enchere/dal/EnchereRepositoryImpl.java @@ -43,7 +43,9 @@ public class EnchereRepositoryImpl implements EnchereRepository { @Override public List findByIdArticle(int idArticle) { - return List.of(); + String sql = "SELECT * FROM ENCHERES WHERE no_article = ?"; + List encheres = jdbcTemplate.query(sql, new EnchereRowMapper(), idArticle); + return encheres; } @Override diff --git a/src/main/resources/templates/article.html b/src/main/resources/templates/article.html index 5487395..48ba0a1 100644 --- a/src/main/resources/templates/article.html +++ b/src/main/resources/templates/article.html @@ -36,6 +36,10 @@
+
+ + +
@@ -48,15 +52,19 @@
- + - +
    -
  • +
+
+ + +
From bd37441f9cd1ac8c61f9115ce85b2ecca678b482 Mon Sep 17 00:00:00 2001 From: Parpaillax Date: Fri, 26 Apr 2024 14:29:43 +0200 Subject: [PATCH 4/6] end article start edit article --- .../fr/eni/enchere/controllers/ArticleController.java | 5 ++++- .../fr/eni/enchere/interceptor/UserInterceptor.java | 2 +- src/main/resources/templates/article.html | 4 ++-- src/main/resources/templates/editArticle.html | 10 ++++++++++ src/main/resources/templates/modele-page.html | 2 +- 5 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 src/main/resources/templates/editArticle.html diff --git a/src/main/java/fr/eni/enchere/controllers/ArticleController.java b/src/main/java/fr/eni/enchere/controllers/ArticleController.java index 6b748ba..8477e94 100644 --- a/src/main/java/fr/eni/enchere/controllers/ArticleController.java +++ b/src/main/java/fr/eni/enchere/controllers/ArticleController.java @@ -63,6 +63,7 @@ public class ArticleController { UserProfil user = userService.utilisateurById(article.getUtilisateur()); Categorie cate = categorieService.findCategorieById(article.getNumCategorie()); Retrait retrait = retraitService.retraitByNumarticle(article.getId()); + article.setPseudoUtilisateur(user.getPseudo()); List lastEnchere = this.enchereService.enchereByArticle(article.getId()); Optional maxMontantEnchere = lastEnchere.stream() .map(Enchere::getMontantEnchere) // Récupère seulement les montants d'enchère @@ -72,7 +73,9 @@ public class ArticleController { model.addAttribute("cate", cate.getLibelle()); model.addAttribute("retrait", retrait); model.addAttribute("enchere", new Enchere()); - model.addAttribute("maxEnchere", maxMontantEnchere.get()); + if (maxMontantEnchere.isPresent()) { + model.addAttribute("maxEnchere", maxMontantEnchere.get()); + } List errors = (List) session.getAttribute("errors"); if (errors != null) { model.addAttribute("errors", errors); diff --git a/src/main/java/fr/eni/enchere/interceptor/UserInterceptor.java b/src/main/java/fr/eni/enchere/interceptor/UserInterceptor.java index b58d0ed..570a680 100644 --- a/src/main/java/fr/eni/enchere/interceptor/UserInterceptor.java +++ b/src/main/java/fr/eni/enchere/interceptor/UserInterceptor.java @@ -28,7 +28,7 @@ public class UserInterceptor implements HandlerInterceptor { if (authentication != null && authentication.isAuthenticated() && !authentication.getName().equals("anonymousUser")) { UserProfil user = this.userService.utilisateurByName(authentication.getName()); if (modelAndView != null && modelAndView.getViewName() != null && !modelAndView.getViewName().startsWith("redirect:")) { - modelAndView.addObject("user", user.getCredit()); + modelAndView.addObject("user", user); } } } diff --git a/src/main/resources/templates/article.html b/src/main/resources/templates/article.html index 48ba0a1..2c4827c 100644 --- a/src/main/resources/templates/article.html +++ b/src/main/resources/templates/article.html @@ -38,7 +38,7 @@
- +
@@ -63,7 +63,7 @@
- +
diff --git a/src/main/resources/templates/editArticle.html b/src/main/resources/templates/editArticle.html new file mode 100644 index 0000000..566549b --- /dev/null +++ b/src/main/resources/templates/editArticle.html @@ -0,0 +1,10 @@ + + + + + Title + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/modele-page.html b/src/main/resources/templates/modele-page.html index d76a755..1a3cd22 100644 --- a/src/main/resources/templates/modele-page.html +++ b/src/main/resources/templates/modele-page.html @@ -24,7 +24,7 @@ Logo -
+
From 5f1c440ef33ea8b21db783cdca23c59d29a929d4 Mon Sep 17 00:00:00 2001 From: mepiphana2023 Date: Fri, 26 Apr 2024 15:37:15 +0200 Subject: [PATCH 5/6] langue --- .../resources/i18n/messages_en.properties | 126 ++++++++++++++---- .../resources/i18n/messages_fr.properties | 66 ++++++++- src/main/resources/templates/accueil.html | 28 ++-- src/main/resources/templates/admin.html | 97 +++++++------- src/main/resources/templates/article.html | 106 +++++++-------- src/main/resources/templates/modele-page.html | 9 +- src/main/resources/templates/newArticle.html | 46 +++---- 7 files changed, 304 insertions(+), 174 deletions(-) diff --git a/src/main/resources/i18n/messages_en.properties b/src/main/resources/i18n/messages_en.properties index 26c6e4b..bf564d1 100644 --- a/src/main/resources/i18n/messages_en.properties +++ b/src/main/resources/i18n/messages_en.properties @@ -1,46 +1,114 @@ -home.search.title = Search for an item by name... +home.search.title = Search for an article by name... home.search.cat = All categories home.search.button = Search -home.button.lang = Changer en Fran\u00E7ais +home.buy.title = Purchases +home.buy.open = Open bids +home.buy.progress = My ongoing bids +home.buy.success = My won bids +home.sell.title = My Sales +home.sell.progress = My ongoing sales +home.sell.nostarted = My unsold items +home.sell.finish = My completed sales +home.button.search = Search +home.button.lang = Passer en fran\u00E7ais home.button.lang2 = EN +home.credit = My credits: +home.nav.enchere = Auctions +home.nav.vend = Sell an item +home.nav.login = Register / Log in +home.profil.profil = Profile +home.profil.logout = Log out +home.article.sellprice = Sale price: +home.article.seller = Seller: +home.article.end = End of auction: + +footer.desc = Created by the association "Objects are our friends", ENI-Auctions aims to help its members sell or buy objects of all kinds. profil.title = My Profile profil.button = Edit profil.pseudo = Username: -profil.surname = First Name: -profil.name = Last Name: +profil.surname = First name: +profil.name = Last name: profil.email = Email: profil.phone = Phone: profil.street = Street: -profil.postal = Zip Code: +profil.postal = Postal code: profil.city = City: profil.credit = Credits: -edit.profil.currentpassword = Current Password: -edit.profil.newpassword = New Password: -edit.profil.confirmnewpassword = Confirm New Password: -edit.profil.title = Edit My Profile -edit.profil.button.edit = Save Changes -edit.profil.button.del = Delete My Account +edit.profil.currentpassword = Current password: +edit.profil.newpassword = New password: +edit.profil.confirmnewpassword = Confirm new password: +edit.profil.title = Edit my profile +edit.profil.button.edit = Save changes +edit.profil.button.cancel = Cancel changes +edit.profil.button.del = Delete my account -login.title = To Log In: +login.title = Log in: login.id = Username: login.password = Password: -login.save = Remember Me -login.forgotpassword = Forgot Password -login.connection = Login -login.makecompte = Create an Account +login.save = Remember me +login.forgotpassword = Forgot password +login.connection = Log in +login.makecompte = Create an account -register.title = My Profile -register.button = Edit -register.pseudo = Username: -register.surname = First Name: -register.name = Last Name: -register.email = Email: -register.phone = Phone: -register.street = Street: -register.postal = Zip Code: -register.city = City: -register.credit = Credits: -register.make = create -register.cancel = cancel \ No newline at end of file +register.title = Register +register.pseudo.label = Username: +register.prenom.label = First name: +register.nom.label = Last name: +register.email.label = Email: +register.telephone.label = Phone: +register.rue.label = Street: +register.code_postal.label = Postal code: +register.ville.label = City: +register.password.label = Password: +register.confirm_password.label = Confirm password: +register.submit_button = Create +register.cancel_button = Cancel + +admin.panel.title = Administrator panel +admin.categories.title = List of modified categories +admin.categories.table.name = Name +admin.categories.table.action = Action +admin.categories.table.save = Save +admin.categories.table.delete = Delete +admin.categories.table.add = Add +admin.users.title = List of users +admin.users.table.id = ID +admin.users.table.username = Username +admin.users.table.lastname = Last name +admin.users.table.firstname = First name +admin.users.table.email = Email +admin.users.table.disable = Disable +admin.users.table.delete = Delete + +article.add.title = Add an article +article.add.heading = New sale +article.add.form.label.name = Article: +article.add.form.label.description = Description: +article.add.form.label.category = Category: +article.add.form.label.photo = Article photo: +article.add.form.label.starting_price = Starting price: +article.add.form.label.start_date = Start date: +article.add.form.label.end_date = End date: +article.add.form.label.removal = Pickup +article.add.form.label.street = Street: +article.add.form.label.postal_code = Postal code: +article.add.form.label.city = City: +article.add.form.validation.required = This field is required. +article.add.form.validation.category = Please select a category. +article.add.form.button.save = Save +article.add.form.button.cancel = Cancel + +article.details.title = Article - ARTICLENAME +article.details.heading = Article +article.details.label.description = Description +article.details.label.seller = Seller +article.details.label.category = Category +article.details.label.sale_price = Sale price +article.details.label.end_date = End of auction +article.details.label.pickup = Pickup +article.details.label.amount = Amount +article.details.button.bid = Bid +article.details.address.unknown = Unknown address +article.details.validation.amount.required = Bid amount is required. diff --git a/src/main/resources/i18n/messages_fr.properties b/src/main/resources/i18n/messages_fr.properties index 4869fe3..c860af3 100644 --- a/src/main/resources/i18n/messages_fr.properties +++ b/src/main/resources/i18n/messages_fr.properties @@ -1,14 +1,29 @@ home.search.title = Rechercher un article par nom... home.search.cat = Toutes les cat\u00e9gories home.search.button = Recherche +home.buy.title = Achats +home.buy.open = Ench\u00e8res ouvertes +home.buy.progress = Mes ench\u00E8res en cours +home.buy.success = Mes ench\u00E8res remport\u00e9es +home.sell.title = Mes Ventes +home.sell.progress = Mes ventes en cours +home.sell.nostarted = Mes ventes non d\u00e9but\u00e9es +home.sell.finish = Mes ventes termin\u00E9es +home.button.search = Recherche home.button.lang = Switch to English home.button.lang2 = FR home.credit = Mes cr\u00e9dits : home.nav.enchere = Encheres home.nav.vend = Vendre un article -home.nav.login= S'inscrire / Se connecter +home.nav.login = S'inscrire / Se connecter home.profil.profil = Profil home.profil.logout = D\u00e9connexion +home.article.sellprice = Prix de vente: +home.article.seller = Vendeur: +home.article.end = Fin de l'ench\u00E8re: + +footer.desc = Cr\u00e9\u00e9e par l'association "Les objets sont nos amis", ENI-Ench\u00e9res a pour objectif d'aider ses membres \u00E0 vendre ou acheter des objets de tout genre. +footer. profil.title = Mon profile profil.button = Modifier @@ -51,4 +66,51 @@ register.ville.label = Ville: register.password.label = Mot de passe: register.confirm_password.label = Confirmation du mot de passe: register.submit_button = Cr\u00E9er -register.cancel_button = Annuler \ No newline at end of file +register.cancel_button = Annuler + +admin.panel.title = Panel administrateur +admin.categories.title = Liste des cat\u00E9gories modifi\u00E9es +admin.categories.table.name = Nom +admin.categories.table.action = Action +admin.categories.table.save = Enregistrer +admin.categories.table.delete = Supprimer +admin.categories.table.add = Ajouter +admin.users.title = Liste des utilisateurs +admin.users.table.id = ID +admin.users.table.username = Pseudo +admin.users.table.lastname = Nom +admin.users.table.firstname = Pr\u00E9nom +admin.users.table.email = Email +admin.users.table.disable = D\u00E9sactiver +admin.users.table.delete = Supprimer + +article.add.title = Ajouter un article +article.add.heading = Nouvelle vente +article.add.form.label.name = Article: +article.add.form.label.description = Description: +article.add.form.label.category = Cat\u00E9gorie: +article.add.form.label.photo = Photo de l'article: +article.add.form.label.starting_price = Mise \u00E0 prix: +article.add.form.label.start_date = Date d\u00E9but ench\u00E8re: +article.add.form.label.end_date = Date fin ench\u00E8re: +article.add.form.label.removal = Retrait +article.add.form.label.street = Rue: +article.add.form.label.postal_code = Code postal: +article.add.form.label.city = Ville: +article.add.form.validation.required = Ce champ est requis. +article.add.form.validation.category = Veuillez s\u00E9lectionner une cat\u00E9gorie. +article.add.form.button.save = Enregistrer +article.add.form.button.cancel = Annuler + +article.details.title = Article - NOMARTICLE +article.details.heading = Article +article.details.label.description = Description +article.details.label.seller = Vendeur +article.details.label.category = Cat\u00E9gorie +article.details.label.sale_price = Prix de vente +article.details.label.end_date = Date fin ench\u00E8re +article.details.label.pickup = Retrait +article.details.label.amount = Montant +article.details.button.bid = Ench\u00E9rir +article.details.address.unknown = Adresse inconnue +article.details.validation.amount.required = Le montant de l'ench\u00E8re est requis. diff --git a/src/main/resources/templates/accueil.html b/src/main/resources/templates/accueil.html index 1b3ffcf..c07b3ed 100644 --- a/src/main/resources/templates/accueil.html +++ b/src/main/resources/templates/accueil.html @@ -52,22 +52,22 @@
- +
- +
- +
- +
@@ -76,22 +76,22 @@
- +
- +
- +
- +
@@ -108,7 +108,7 @@
- +
@@ -126,16 +126,16 @@
-
Nom de l'article
-

Description

+
+

-
Prix de vente:
-
Vendeur:
+
+

-
Fin de l'enchère:
+
diff --git a/src/main/resources/templates/admin.html b/src/main/resources/templates/admin.html index 37b1256..6b59ac3 100644 --- a/src/main/resources/templates/admin.html +++ b/src/main/resources/templates/admin.html @@ -1,71 +1,72 @@ - + + Panel administrateur
-

Liste des catégories modifiées

+

Liste des catégories modifiées

- - - - + + + + - - - - + + + +
NomAction
NomAction
-
- - - -
-
-
- - -
-
+
+ + + +
+
+
+ + +
+
- +
-

Liste des utilisateurs

+

Liste des utilisateurs

- - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + +
IDPseudoNomPrénomEmailAction
IDPseudoNomPrénomEmailAction
-
- - -
-
- - -
-
+
+ + +
+
+ + +
+
diff --git a/src/main/resources/templates/article.html b/src/main/resources/templates/article.html index 5487395..cfdecd9 100644 --- a/src/main/resources/templates/article.html +++ b/src/main/resources/templates/article.html @@ -1,68 +1,68 @@ - + - -
-
-
-
-
-

Article

+ +
+
+
+
+
+

+
+
+
+
+ image-vente
-
-
-
- image-vente -
-
-
-

-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
- - -
- - -
-
- - - - +
+
+

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + +
+ + +
+ + + + +
- - -
-
+ +
- +
+
+ diff --git a/src/main/resources/templates/modele-page.html b/src/main/resources/templates/modele-page.html index d76a755..ba2b514 100644 --- a/src/main/resources/templates/modele-page.html +++ b/src/main/resources/templates/modele-page.html @@ -69,8 +69,7 @@
ENI-Encheres
-

- Créée par l'association "Les objets sont nos amis", ENI-Enchères a pour objectif d'aider ses membres à vendre ou acheter des objets de tout genre. +

@@ -79,13 +78,13 @@ Menu

- Encheres +

- Vendre un article +

- Mon profile +

diff --git a/src/main/resources/templates/newArticle.html b/src/main/resources/templates/newArticle.html index 97dee47..a3a0669 100644 --- a/src/main/resources/templates/newArticle.html +++ b/src/main/resources/templates/newArticle.html @@ -6,76 +6,76 @@
-

Nouvelle vente

+

Nouvelle vente

- + -
Ce champ est requis.
+
Ce champ est requis.
- + -
Ce champ est requis.
+
Ce champ est requis.
- + -
Veuillez sélectionner une catégorie.
+
Veuillez sélectionner une catégorie.
- +
- + -
Ce champ est requis.
+
Ce champ est requis.
- + -
Ce champ est requis.
+
Ce champ est requis.
- + -
Ce champ est requis.
+
Ce champ est requis.
-

Retrait

+

Retrait

- + -
Ce champ est requis.
+
Ce champ est requis.
- + -
Ce champ est requis.
+
Ce champ est requis.
- + -
Ce champ est requis.
+
Ce champ est requis.
- +

- +