From 9ce26952aecebdaafca599451f7c7f65845ae918 Mon Sep 17 00:00:00 2001 From: dasha Date: Sat, 22 Apr 2023 13:53:26 +0400 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=BF=D0=B0=D1=81=D0=B8=D0=B1=D0=BE=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BB=D1=8F=20=D0=B7=D0=B0=20=D0=BA=D0=B0=D1=80?= =?UTF-8?q?=D1=82=D0=B8=D0=BD=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CinemaMvcController.java | 8 +- .../controller/CustomerMvcController.java | 2 +- .../controller/SessionMvcController.java | 11 +- src/main/resources/public/css/style.css | 42 ++----- src/main/resources/public/search.jpg | Bin 3703 -> 0 bytes src/main/resources/templates/cinema-edit.html | 5 +- src/main/resources/templates/cinema.html | 38 +++--- .../resources/templates/customer-edit.html | 42 +++---- src/main/resources/templates/customer.html | 2 +- src/main/resources/templates/default.html | 23 +--- src/main/resources/templates/index.html | 1 + src/main/resources/templates/order-edit.html | 28 +---- src/main/resources/templates/order.html | 2 +- .../resources/templates/ordersession.html | 115 +++++++++--------- .../resources/templates/session-edit.html | 13 +- src/main/resources/templates/session.html | 92 +++++++------- 16 files changed, 191 insertions(+), 233 deletions(-) delete mode 100644 src/main/resources/public/search.jpg diff --git a/src/main/java/com/labwork1/app/student/controller/CinemaMvcController.java b/src/main/java/com/labwork1/app/student/controller/CinemaMvcController.java index 4412914..462c9f8 100644 --- a/src/main/java/com/labwork1/app/student/controller/CinemaMvcController.java +++ b/src/main/java/com/labwork1/app/student/controller/CinemaMvcController.java @@ -42,9 +42,9 @@ public class CinemaMvcController { return "cinema-edit"; } - @GetMapping (value = "/search/") + @GetMapping(value = "/search/") public String searchCinema(@RequestParam String request, - Model model) { + Model model) { List cinemas = cinemaService.findAllCinemas(request) .stream().map(CinemaDto::new).toList(); model.addAttribute("cinemas", cinemas); @@ -62,11 +62,11 @@ public class CinemaMvcController { return "cinema-edit"; } if (id == null || id <= 0) { - cinemaDto.setImage("data:image/jpeg;base64," + Base64.getEncoder().encodeToString(multipartFile.getBytes())); + cinemaDto.setImage("data:" + multipartFile.getContentType() + ";base64," + Base64.getEncoder().encodeToString(multipartFile.getBytes())); cinemaService.addCinema(cinemaDto); } else { cinemaDto.setId(id); - cinemaDto.setImage("data:image/jpeg;base64," + Base64.getEncoder().encodeToString(multipartFile.getBytes())); + cinemaDto.setImage("data:" + multipartFile.getContentType() + ";base64," + Base64.getEncoder().encodeToString(multipartFile.getBytes())); cinemaService.updateCinema(cinemaDto); } return "redirect:/cinema"; diff --git a/src/main/java/com/labwork1/app/student/controller/CustomerMvcController.java b/src/main/java/com/labwork1/app/student/controller/CustomerMvcController.java index 104b787..0a48bd2 100644 --- a/src/main/java/com/labwork1/app/student/controller/CustomerMvcController.java +++ b/src/main/java/com/labwork1/app/student/controller/CustomerMvcController.java @@ -25,7 +25,7 @@ public class CustomerMvcController { return "customer"; } - @GetMapping(value = {"/edit", "/edit/{id}"}) + @GetMapping(value = {"/edit", "/edit/{id}"}) public String editCustomer(@PathVariable(required = false) Long id, Model model) { if (id == null || id <= 0) { diff --git a/src/main/java/com/labwork1/app/student/controller/SessionMvcController.java b/src/main/java/com/labwork1/app/student/controller/SessionMvcController.java index e8ccba1..2a52021 100644 --- a/src/main/java/com/labwork1/app/student/controller/SessionMvcController.java +++ b/src/main/java/com/labwork1/app/student/controller/SessionMvcController.java @@ -24,14 +24,13 @@ public class SessionMvcController { @GetMapping public String getSessions(Model model) { - model.addAttribute("sessions", - sessionService.findAllSessions().stream() - .map(SessionDto::new) - .toList()); + model.addAttribute("sessions", sessionService.findAllSessions().stream() + .map(SessionDto::new) + .toList()); return "session"; } - @GetMapping(value = {"/edit", "/edit/{id}"}) + @GetMapping(value = {"/edit", "/edit/{id}"}) public String editSession(@PathVariable(required = false) Long id, Model model) { if (id == null || id <= 0) { @@ -61,7 +60,7 @@ public class SessionMvcController { return "redirect:/session"; } - @PostMapping(value = "/") + @PostMapping(value = "/") public String saveSession(@RequestParam("price") String price, @RequestParam("timestamp") LocalDateTime timestamp, @RequestParam("cinemaid") Long cinemaId, diff --git a/src/main/resources/public/css/style.css b/src/main/resources/public/css/style.css index b0b24a3..48d6ffc 100644 --- a/src/main/resources/public/css/style.css +++ b/src/main/resources/public/css/style.css @@ -5,12 +5,6 @@ body { .green-mark { background-color: #38a65d; } -.willSee { - background-color: #38a65d; -} -.delete { - background-color: #e94049; -} .icon { width: 50px; height: 50px; @@ -18,30 +12,10 @@ body { hr { height: 2px !important; } -.description { - color: #8f9398; -} -.editIcon { - height: 2.5vh; -} -.posterChoiceToTaste { - width: 290px; - height: 437px; -} .posterFilmPage{ width: 290px; height: 437px; } -a { - text-decoration: none; -} -a:hover { - color: white; -} - -.current a { - color: white; -} /* for film-page */ .table { @@ -81,6 +55,10 @@ form input { max-width: 300px; } +form select { + max-width: 300px; +} + table tbody tr td { border: 0px !important; } @@ -101,12 +79,18 @@ header { header a { color: #c2c2c2; + text-decoration: none; } header a:hover { - color: #ffffff; + color: white; + text-decoration: none; } -.mainInput { - max-width: 200px; +a { + text-decoration: none; +} + +a:hover { + text-decoration: underline; } \ No newline at end of file diff --git a/src/main/resources/public/search.jpg b/src/main/resources/public/search.jpg deleted file mode 100644 index c0d82e3350fe5ab853b0604fff65e92782043d19..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3703 zcmV--4v6uIP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D4h%^|K~#8N?VO2w zPiGd#=kJ)Y?+IdGvLca$AVTbGLzT8d>}n}$w3g{gb(Gr0Qc9JME(mS3m{Edxs3}DW z?R2A-w)D*VImzYbm-}0De@W(f+~@f|BFVkK_x=3NIqx~=eSi7WpR3f6NAj;q0qQSR zYxi%t8RqUt{Z9owG>fObt0sC&3aO$TCEBLS1zCwikT#; zUaOwesn<~IHfSsn4Vy`e*6|V(pD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Mj!^1q)wP z3#7kqzn}3_$5QxLt?u8NP{5$DDk^Ks~sr%@MaY*FGjhk}z>{(g0 zdW{UtdP1Rko_8RLrt07$aZYn}Qox`Pu!eh#@!}YO#*Fjl&@OKX)qV#|k1vM^7Yon~txStqA z-AR^BwSb%PdTs-<6gE(n07f>?p9-Pf%BR?gAwa{@?BMv%d4r`)I=$;G@0u>7eK+S2tJL}{Z9IP|!~4aictfU?Virr>OU z?T5)*BF@;w&#_8CTlYFWJDe(aP)@SL^CqYJ%2SmB)c=DXfeKKMKn18rpaN12`5(mc VIxAk^nIc@*| diff --git a/src/main/resources/templates/cinema-edit.html b/src/main/resources/templates/cinema-edit.html index 5f79ff4..44d0dc7 100644 --- a/src/main/resources/templates/cinema-edit.html +++ b/src/main/resources/templates/cinema-edit.html @@ -5,10 +5,11 @@ +
Фильм
-

Фильм

-
+
diff --git a/src/main/resources/templates/cinema.html b/src/main/resources/templates/cinema.html index 327bb7c..cccc45d 100644 --- a/src/main/resources/templates/cinema.html +++ b/src/main/resources/templates/cinema.html @@ -5,34 +5,38 @@ +
Фильмы
-

Фильмы

-
- - - +
+ + + + +
+ + + +
-
- - -
-
+
diff --git a/src/main/resources/templates/customer-edit.html b/src/main/resources/templates/customer-edit.html index 297ce31..d81d122 100644 --- a/src/main/resources/templates/customer-edit.html +++ b/src/main/resources/templates/customer-edit.html @@ -5,28 +5,28 @@ +
Пользователь
-

Пользователь

-
-
-
- - -
-
- - -
-
- - - Назад - -
- +
+
+
+ + +
+
+ + +
+
+ + + Назад + +
+
\ No newline at end of file diff --git a/src/main/resources/templates/customer.html b/src/main/resources/templates/customer.html index 8e99be3..61985e1 100644 --- a/src/main/resources/templates/customer.html +++ b/src/main/resources/templates/customer.html @@ -5,8 +5,8 @@ +
Пользователи
-

Пользователи

diff --git a/src/main/resources/templates/default.html b/src/main/resources/templates/default.html index 9af2ebb..d5a05bd 100644 --- a/src/main/resources/templates/default.html +++ b/src/main/resources/templates/default.html @@ -8,7 +8,6 @@ - @@ -40,29 +39,19 @@
-

Киносайт

+

+
+
+

-
\ No newline at end of file diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index a7a11f2..1a622e4 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -5,6 +5,7 @@ +
It's works!
ERROR diff --git a/src/main/resources/templates/order-edit.html b/src/main/resources/templates/order-edit.html index eba3a8d..6ff4935 100644 --- a/src/main/resources/templates/order-edit.html +++ b/src/main/resources/templates/order-edit.html @@ -5,12 +5,11 @@ +
Создание заказа
-

Создание заказа

-

Добавление сеансов в заказ

-
+
- - -
-
- - -
-
- - - Назад - -
-
\ No newline at end of file diff --git a/src/main/resources/templates/order.html b/src/main/resources/templates/order.html index 098b315..c2e730d 100644 --- a/src/main/resources/templates/order.html +++ b/src/main/resources/templates/order.html @@ -5,8 +5,8 @@ +
Заказы
${cinema.name}
-
-

- +

+

+

-
- - - - - - - - - - - - - - - -
IDPriceCinemaTimestampCount
- - - - - -
- - - +
+
+ +
- - -
-
+
+ + +
+
+ + + Назад + +
+ + + + + + + + + + + + + + + + + +
IDPriceCinemaTimestampCount
+ + + + + +
+ + + +
+
+ +
+
\ No newline at end of file diff --git a/src/main/resources/templates/session-edit.html b/src/main/resources/templates/session-edit.html index 60be082..d5bb496 100644 --- a/src/main/resources/templates/session-edit.html +++ b/src/main/resources/templates/session-edit.html @@ -5,13 +5,14 @@ +
-

Сеанс

- +
@@ -23,12 +24,14 @@
- - + +
- +