From 3942e7ba0e687fbaa93846ef2e738086a89e3239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Mon, 6 Dec 2021 18:46:00 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=ED=8C=90=20=EB=B6=84?= =?UTF-8?q?=EB=A5=98=20=EA=B4=80=EB=A6=AC=20=EC=9E=91=EC=97=85=EC=A4=91.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/adminController.java | 6 + .../kcgfilemanager/model/BoardCategory.java | 32 ++++ .../resources/static/js/admin/categoryMgt.js | 4 + .../templates/admin/categoryMgt.html | 105 +++++++++++++ .../resources/templates/admin/codeMgt.html | 2 +- .../templates/admin/defaultContentLayout.html | 148 ++++++++++++++++++ .../resources/templates/fragments/footer.html | 2 +- 7 files changed, 297 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/dbnt/kcgfilemanager/model/BoardCategory.java create mode 100644 src/main/resources/static/js/admin/categoryMgt.js create mode 100644 src/main/resources/templates/admin/categoryMgt.html create mode 100644 src/main/resources/templates/admin/defaultContentLayout.html diff --git a/src/main/java/com/dbnt/kcgfilemanager/controller/adminController.java b/src/main/java/com/dbnt/kcgfilemanager/controller/adminController.java index 9d42fe4..126c8cd 100644 --- a/src/main/java/com/dbnt/kcgfilemanager/controller/adminController.java +++ b/src/main/java/com/dbnt/kcgfilemanager/controller/adminController.java @@ -23,7 +23,12 @@ public class adminController { ModelAndView mav = new ModelAndView("admin/main"); return mav; } + @GetMapping("/categoryMgt") + public ModelAndView categoryMgt(){ + ModelAndView mav = new ModelAndView("admin/categoryMgt"); + return mav; + } @GetMapping("/userMgt") public ModelAndView userMgt(UserInfo userInfo) { userInfo.setQueryInfo(); @@ -51,6 +56,7 @@ public class adminController { mav.addObject("userInfo", userInfoService.selectUserInfo(userInfo)); return mav; } + @GetMapping("/modifyRequest") public ModelAndView modifyRequest() { ModelAndView mav = new ModelAndView("admin/modifyRequest"); diff --git a/src/main/java/com/dbnt/kcgfilemanager/model/BoardCategory.java b/src/main/java/com/dbnt/kcgfilemanager/model/BoardCategory.java new file mode 100644 index 0000000..5777448 --- /dev/null +++ b/src/main/java/com/dbnt/kcgfilemanager/model/BoardCategory.java @@ -0,0 +1,32 @@ +package com.dbnt.kcgfilemanager.model; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.*; +import java.util.List; + +@Getter +@Setter +@Entity +@NoArgsConstructor +@DynamicInsert +@DynamicUpdate +@Table(name = "BOARD_CATEGORY") +public class BoardCategory { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "CATEGORY_SEQ") + private Integer categorySeq; + @Column(name = "DEPTH", nullable = false) + private Integer depth; + @Column(name = "PARENT_CATEGORY") + private Integer parentCategory; + @Column(name = "CATEGORY_NAME", nullable = false) + private String categoryName; + @Transient + private List childCategoryList; +} diff --git a/src/main/resources/static/js/admin/categoryMgt.js b/src/main/resources/static/js/admin/categoryMgt.js new file mode 100644 index 0000000..102ae59 --- /dev/null +++ b/src/main/resources/static/js/admin/categoryMgt.js @@ -0,0 +1,4 @@ +$(document).on('click', '.addCategoryBtn', function (){ + const depth = $(this).attr("data-depth") + $("#depth"+depth+"Category").append($("#appendTr").children().clone()) +}) \ No newline at end of file diff --git a/src/main/resources/templates/admin/categoryMgt.html b/src/main/resources/templates/admin/categoryMgt.html new file mode 100644 index 0000000..451eca0 --- /dev/null +++ b/src/main/resources/templates/admin/categoryMgt.html @@ -0,0 +1,105 @@ + + + + + +
+
+

게시판 분류 관리

+
+
+
+
+ +
+
+
+ + + + + + + + + +
대분류
+
+
+ +
+
+
+
+ + + + + + + + + +
연도
+
+
+ +
+
+
+
+ + + + + + + + + +
중분류
+
+
+ +
+
+
+
+ + + + + + + + + +
소분류
+
+
+ +
+
+
+
+
+
+
+
+
+ + + + + + +
+ +
+
+
+ \ No newline at end of file diff --git a/src/main/resources/templates/admin/codeMgt.html b/src/main/resources/templates/admin/codeMgt.html index a869411..642cc88 100644 --- a/src/main/resources/templates/admin/codeMgt.html +++ b/src/main/resources/templates/admin/codeMgt.html @@ -8,7 +8,7 @@
-
+

코드 관리

diff --git a/src/main/resources/templates/admin/defaultContentLayout.html b/src/main/resources/templates/admin/defaultContentLayout.html new file mode 100644 index 0000000..89c531c --- /dev/null +++ b/src/main/resources/templates/admin/defaultContentLayout.html @@ -0,0 +1,148 @@ + + + + + +
+
+

페이지 이름

+
+
+
+
+
+ + +
+ + + + + + + + + + + + + + + +
아이디이름부서직급생성일상태
+
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+

왼쪽 목록에서 선택해주세요.

+
+
+
+
+
+
+
+
+
+ \ No newline at end of file diff --git a/src/main/resources/templates/fragments/footer.html b/src/main/resources/templates/fragments/footer.html index f00adf1..f126f2e 100644 --- a/src/main/resources/templates/fragments/footer.html +++ b/src/main/resources/templates/fragments/footer.html @@ -3,7 +3,7 @@ xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">