jhleem / egov star

이다솜 이다솜 2022-02-15 @49

[20220215 이다솜] 게시판 목록 코밋
Index: base3.10/src/main/java/egovframework/com/cop/bbs/web/EgovArticleController.java =================================================================== --- base3.10/src/main/java/egovframework/com/cop/bbs/web/EgovArticleController.java (revision 48) +++ base3.10/src/main/java/egovframework/com/cop/bbs/web/EgovArticleController.java (revision 49) @@ -290,7 +290,7 @@ model.addAttribute("boardMasterVO", bdMstr); ////----------------------------- - return "egovframework/com/cop/bbs/EgovArticleRegist"; + return ".defaultSubLayout/com/cop/bbs/EgovArticleRegist"; } /** Index: base3.10/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/bbs/EgovArticleList.jsp =================================================================== --- base3.10/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/bbs/EgovArticleList.jsp (revision 48) +++ base3.10/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/bbs/EgovArticleList.jsp (revision 49) @@ -25,18 +25,15 @@ <c:set var="reBbsId" value="${fn:replace(boardMasterVO.bbsId, \"BBSMSTR_\", \"\")}"/> <c:set var="pageTitle"><spring:message code="comCopBbs.articleVO.title"/></c:set> -<link href="<c:url value='${brdMstrVO.tmplatCours}' />" rel="stylesheet" type="text/css"> -<%-- <c:choose> -<c:when test="${preview == 'true'}"> <script type="text/javascript"> /********************************************************* * 초기화 ******************************************************** */ $(function() { - fn_egov_init(); +// fn_egov_init(); }) function fn_egov_init(){ - // 첫 입력란에 포커스.. + // 첫 입력란에 포커스.. document.articleForm.searchCnd.focus(); } @@ -44,38 +41,6 @@ * 페이징 처리 함수 ******************************************************** */ function fn_egov_select_linkPage(pageNo){ -} -/********************************************************* - * 조회 처리 함수 - ******************************************************** */ -function fn_egov_search_article(){ -} -/* ******************************************************** - * 상세회면 처리 함수 - ******************************************************** */ -function fn_egov_inquire_articledetail(bbsId, nttId) { - alert('test'); - return true; -} -</script> -</c:when> -<c:otherwise> -<script type="text/javascript"> -/********************************************************* - * 초기화 - ******************************************************** */ -$(function() { - fn_egov_init(); -}) -function fn_egov_init(){ - // 첫 입력란에 포커스.. -// document.articleForm.searchCnd.focus(); -} - -/********************************************************* - * 페이징 처리 함수 - ******************************************************** */ -function fn_egov_select_linkPage(pageNo){ document.articleForm.pageIndex.value = pageNo; document.articleForm.action = "<c:url value='/cop/bbs/selectArticleList.do'/>"; document.articleForm.submit(); @@ -91,216 +56,132 @@ * 상세회면 처리 함수 ******************************************************** */ function fn_egov_inquire_articledetail(bbsId, nttId) { - alert(); // 사이트 키값(siteId) 셋팅. - document.articleForm.bbsId.bbsId.value = bbsId; + document.articleForm.bbsId.value = bbsId; document.articleForm.nttId.value = nttId; - document.articleForm.action = "<c:url value='/cop/bbs/selectArticleDetail.do'/>"; + document.articleForm.action = "<c:url value='/cop/bbs/${reBbsId}/selectArticleDetail.do'/>"; document.articleForm.submit(); } </script> -</c:otherwise> -</c:choose> --%> -<script type="text/javascript"> -/********************************************************* - * 초기화 - ******************************************************** */ -$(function() { -// fn_egov_init(); -}) -function fn_egov_init(){ - // 첫 입력란에 포커스.. -// document.articleForm.searchCnd.focus(); -} - -/********************************************************* - * 페이징 처리 함수 - ******************************************************** */ -function fn_egov_select_linkPage(pageNo){ - document.articleForm.pageIndex.value = pageNo; - document.articleForm.action = "<c:url value='/cop/bbs/selectArticleList.do'/>"; - document.articleForm.submit(); -} -/********************************************************* - * 조회 처리 함수 - ******************************************************** */ -function fn_egov_search_article(){ - document.articleForm.pageIndex.value = 1; - document.articleForm.submit(); -} -/* ******************************************************** - * 상세회면 처리 함수 - ******************************************************** */ -function fn_egov_inquire_articledetail(bbsId, nttId) { - // 사이트 키값(siteId) 셋팅. - document.subForm.bbsId.value = bbsId; - document.subForm.nttId.value = nttId; - document.subForm.action = "<c:url value='/cop/bbs/${reBbsId}/selectArticleDetail.do'/>"; - document.subForm.submit(); -} -</script> <!-- javascript warning tag --> <noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript> <div class="inner"> -<%-- <form name="articleForm" action="<c:url value='/cop/bbs/selectArticleList.do'/>" method="post" onSubmit="fn_egov_search_article(); return false;"> --%> - <form name="articleForm" action="<c:url value='/cop/bbs/selectArticleList.do'/>" method="post" > + <form name="articleForm" action="<c:url value='/cop/bbs/${reBbsId}/selectArticleList.do'/>" method="post" onSubmit="fn_egov_search_article(); return false;" > <div class="sorting_wrap"> <div class="total"> 전체 <em class="count">${paginationInfo.totalRecordCount}</em>건</div> <div class="search_box" title="<spring:message code="common.searchCondition.msg" />"> <!-- 검색키워드 및 조회버튼 --> - <input class="inputText" name="searchWrd" type="text" size="35" title="<spring:message code="title.search" /> <spring:message code="input.input" />" value='<c:out value="${searchVO.searchWrd}"/>' placeholder="제목 또는 내용 또는 작성자를 입력하세요" maxlength="155" > + <input class="inputText" name="searchKeyword" type="text" size="35" title="<spring:message code="title.search" /> <spring:message code="input.input" />" value='<c:out value="${searchVO.searchKeyword}"/>' placeholder="제목 또는 내용 또는 작성자를 입력하세요" maxlength="155" > <input type="submit" class="btn_search" value="<spring:message code="button.inquire" />" title="<spring:message code="title.inquire" /> <spring:message code="input.button" />" /><!-- 조회 --> -<%-- <c:if test="${preview != 'true'}"> --%> -<%-- <span class="btn_b"><a href="<c:url value='/cop/bbs/insertArticleView.do?bbsId=${boardMasterVO.bbsId}' />" title="<spring:message code="button.create" /> <spring:message code="input.button" />"><spring:message code="button.create" /></a></span><!-- 등록 --> --%> -<%-- </c:if> --%> + + <span class="btn_b"><a href="<c:url value='/cop/bbs/insertArticleView.do?bbsId=${boardMasterVO.bbsId}' />" title="<spring:message code="button.create" /> <spring:message code="input.button" />"><spring:message code="button.create" /></a></span><!-- 등록 --> + </div> <input name="bbsId" type="hidden" value="${boardMasterVO.bbsId}"> - <input name="nttId" type="hidden" value=""> - <input name="pageIndex" type="hidden" value=""> + <input name="nttId" type="hidden" value="0"> + <input name="pageIndex" type="hidden" value="${searchVO.pageIndex}"> </div> </form> -<!-- 목록영역 --> -<table class="board_list"> - <caption>공지사항 - 순서, 제목, 작성일 순으로 나열합니다.</caption> - <colgroup> - <col class="width100"> - <col class="widthauto"> - <col class="width150"> - </colgroup> - <thead> - <tr> - <th><spring:message code="table.num" /></th><!-- 번호 --> - <th class="board_th_link"><spring:message code="comCopBbs.articleVO.list.nttSj" /></th><!--글 제목 --> -<%-- <th><spring:message code="table.reger" /></th><!-- 작성자명 --> --%> - <th><spring:message code="table.regdate" /></th><!-- 작성시각 --> -<%-- <th><spring:message code="comCopBbs.articleVO.list.inqireCo" /></th><!-- 조회수 --> --%> - </tr> - </thead> - - <tbody> - <!-- 공지사항 본문 --> - <c:forEach items="${noticeList}" var="noticeInfo" varStatus="status"> + <!-- 목록영역 --> + <table class="board_list"> + <caption>공지사항 - 순서, 제목, 작성일 순으로 나열합니다.</caption> + <colgroup> + <col class="width100"> + <col class="widthauto"> + <col class="width150"> + </colgroup> + <thead> <tr> - <td class="board_num"><img src="<c:url value='/images/egovframework/com/cop/bbs/icon_notice.png'/>" alt="notice"></td> - <td class="bold"> -<%-- <form name="subForm" method="post" action="<c:url value='/cop/bbs/selectArticleDetail.do'/>"> --%> -<%-- <input name="nttId" type="hidden" value="<c:out value="${noticeInfo.nttId}"/>"> --%> -<%-- <input name="bbsId" type="hidden" value="<c:out value="${noticeInfo.bbsId}"/>"> --%> -<%-- <input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"/> --%> - <a href="#!" onclick="fn_egov_inquire_articledetail(${noticeInfo.bbsId }, ${noticeInfo.nttId });"> - <c:if test="${noticeInfo.commentCo != ''}"> <c:out value='[${noticeInfo.commentCo}]'/></c:if> - </a> -<!-- <span class="link"> --> -<%-- <input type="submit" value="<c:out value='${fn:substring(noticeInfo.nttSj, 0, 40)}'/><c:if test="${noticeInfo.commentCo != ''}"> <c:out value='[${noticeInfo.commentCo}]'/></c:if>" style="border:0px solid #e0e0e0;"> --%> -<!-- </span> --> -<!-- </form> --> - </td> -<%-- <td><c:out value='${noticeInfo.frstRegisterNm}'/></td> --%> - <td><c:out value='${noticeInfo.frstRegisterPnttm}'/></td> -<%-- <td><c:out value='${noticeInfo.inqireCo}'/></td> --%> + <th><spring:message code="table.num" /></th><!-- 번호 --> + <th class="board_th_link"><spring:message code="comCopBbs.articleVO.list.nttSj" /></th><!--글 제목 --> + <%-- <th><spring:message code="table.reger" /></th><!-- 작성자명 --> --%> + <th><spring:message code="table.regdate" /></th><!-- 작성시각 --> + <%-- <th><spring:message code="comCopBbs.articleVO.list.inqireCo" /></th><!-- 조회수 --> --%> </tr> - </c:forEach> - <!-- 게시글 본문 --> - <c:forEach items="${resultList}" var="resultInfo" varStatus="status"> - <tr> - <td class="board_num"> - <p><c:out value="${(searchVO.pageIndex-1) * searchVO.pageSize + status.count}"/></p> - </td> + </thead> - <c:choose> - <c:when test="${resultInfo.sjBoldAt == 'Y'}"> - <!-- 제목 Bold인 경우 --> - <td class="board_tit"> - <form name="subForm" method="post" action="<c:url value='/cop/bbs/selectArticleDetail.do'/>"> - <input name="nttId" type="hidden" value="<c:out value="${resultInfo.nttId}"/>"> - <input name="bbsId" type="hidden" value="<c:out value="${resultInfo.bbsId}"/>"> - <input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"/> - <span class="link"><c:if test="${resultInfo.replyLc!=0}"><c:forEach begin="0" end="${resultInfo.replyLc}" step="1">&nbsp; </c:forEach><img src="<c:url value='/images/egovframework/com/cop/bbs/icon_reply.png'/>" alt="secret"></c:if><input type="submit" value="<c:out value='${fn:substring(resultInfo.nttSj, 0, 40)}'/><c:if test="${resultInfo.commentCo != ''}"> <c:out value='[${resultInfo.commentCo}]'/></c:if>" style="border:0px solid #e0e0e0;"></span> - </form> - </td> - </c:when> - <c:when test="${resultInfo.secretAt == 'Y' && sessionUniqId != resultInfo.frstRegisterId}"> - <!-- 비밀글이며 작성자가 본인이 아닌 경우(클릭 불가) --> - <td class="board_tit"> - <c:if test="${resultInfo.replyLc!=0}"> - <c:forEach begin="0" end="${resultInfo.replyLc}" step="1"> - &nbsp; - </c:forEach> - </c:if> - <img src="<c:url value='/images/egovframework/com/cop/bbs/icon_lock.png'/>" alt="secret">&nbsp;<c:out value='${fn:substring(resultInfo.nttSj, 0, 40)}'/> - <c:if test="${resultInfo.commentCo != ''}"> - <c:out value='[${resultInfo.commentCo}]'/> - </c:if> - </td> - </c:when> - <c:otherwise> - <!-- 나머지 경우 --> - <td class="board_tit"> - <c:choose> - <c:when test="${preview == 'true'}"> + <tbody> + <!-- 공지사항 본문 --> + <c:forEach items="${noticeList}" var="noticeInfo" varStatus="status"> + <tr> + <td class="board_num"><img src="<c:url value='/images/egovframework/com/cop/bbs/icon_notice.png'/>" alt="notice"></td> + <td class="bold board_tit"> + <a href="#!" onclick="fn_egov_inquire_articledetail('${noticeInfo.bbsId }', '${noticeInfo.nttId }');"> + <c:out value='${fn:substring(noticeInfo.nttSj, 0, 40)}'/><c:if test="${noticeInfo.commentCo != ''}"> <c:out value='[${noticeInfo.commentCo}]'/></c:if> + </a> + </td> + <%-- <td><c:out value='${noticeInfo.frstRegisterNm}'/></td> --%> + <td><c:out value='${noticeInfo.frstRegisterPnttm}'/></td> + <%-- <td><c:out value='${noticeInfo.inqireCo}'/></td> --%> + </tr> + </c:forEach> + <!-- 게시글 본문 --> + <c:forEach items="${resultList}" var="resultInfo" varStatus="status"> + <tr> + <td class="board_num"> + <p><c:out value="${(searchVO.pageIndex-1) * searchVO.pageSize + status.count}"/></p> + </td> + + <c:choose> + <c:when test="${resultInfo.sjBoldAt == 'Y'}"> + <!-- 제목 Bold인 경우 --> + <td class="board_tit"> + <form name="subForm" method="post" action="<c:url value='/cop/bbs/selectArticleDetail.do'/>"> <input name="nttId" type="hidden" value="<c:out value="${resultInfo.nttId}"/>"> <input name="bbsId" type="hidden" value="<c:out value="${resultInfo.bbsId}"/>"> <input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"/> - <span class="link"> - <c:if test="${resultInfo.replyLc!=0}"><c:forEach begin="0" end="${resultInfo.replyLc}" step="1">&nbsp; </c:forEach><img src="<c:url value='/images/egovframework/com/cop/bbs/icon_reply.png'/>" alt="secret"></c:if> - <input type="submit" value="<c:out value='${fn:substring(resultInfo.nttSj, 0, 40)}'/> - <c:if test="${resultInfo.commentCo != ''}"> <c:out value='[${resultInfo.commentCo}]'/></c:if>" style="border:0px solid #e0e0e0;"> - </span> - </c:when> - <c:otherwise> -<%-- <form name="subForm" method="post" action="<c:url value='/cop/bbs/selectArticleDetail.do'/>"> --%> - <form name="subForm" method="post"> - <input name="nttId" type="hidden" value="<c:out value="${resultInfo.nttId}"/>"> - <input name="bbsId" type="hidden" value="<c:out value="${resultInfo.bbsId}"/>"> - <input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"/> - <a href="#!" onclick="fn_egov_inquire_articledetail('${resultInfo.bbsId }', '${resultInfo.nttId }');" title="${resultInfo.nttSj }"> - ${fn:substring(resultInfo.nttSj, 0, 40)}<c:if test="${resultInfo.commentCo != ''}"> <c:out value='[${resultInfo.commentCo}]'/></c:if> - </a> -<!-- <span class="link"> --> -<%-- <c:if test="${resultInfo.replyLc!=0}"><c:forEach begin="0" end="${resultInfo.replyLc}" step="1">&nbsp; </c:forEach><img src="<c:url value='/images/egovframework/com/cop/bbs/icon_reply.png'/>" alt="secret"></c:if> --%> -<%-- <input type="submit" value="<c:out value='${fn:substring(resultInfo.nttSj, 0, 40)}'/><c:if test="${resultInfo.commentCo != ''}"> <c:out value='[${resultInfo.commentCo}]'/></c:if>" style="border:0px solid #e0e0e0;"> --%> -<!-- </span> --> - </form> - </c:otherwise> - </c:choose> - </td> - </c:otherwise> - </c:choose> -<%-- <td><c:out value='${resultInfo.frstRegisterNm}'/></td> --%> - <td><c:out value='${resultInfo.frstRegisterPnttm}'/></td> -<%-- <td><c:out value='${resultInfo.inqireCo}'/></td> --%> - </tr> - </c:forEach> + <span class="link"><c:if test="${resultInfo.replyLc!=0}"><c:forEach begin="0" end="${resultInfo.replyLc}" step="1">&nbsp; </c:forEach><img src="<c:url value='/images/egovframework/com/cop/bbs/icon_reply.png'/>" alt="secret"></c:if><input type="submit" value="<c:out value='${fn:substring(resultInfo.nttSj, 0, 40)}'/><c:if test="${resultInfo.commentCo != ''}"> <c:out value='[${resultInfo.commentCo}]'/></c:if>" style="border:0px solid #e0e0e0;"></span> + </form> + </td> + </c:when> + <c:when test="${resultInfo.secretAt == 'Y' && sessionUniqId != resultInfo.frstRegisterId}"> + <!-- 비밀글이며 작성자가 본인이 아닌 경우(클릭 불가) --> + <td class="board_tit"> + <c:if test="${resultInfo.replyLc!=0}"> + <c:forEach begin="0" end="${resultInfo.replyLc}" step="1"> + &nbsp; + </c:forEach> + </c:if> + <img src="<c:url value='/images/egovframework/com/cop/bbs/icon_lock.png'/>" alt="secret">&nbsp;<c:out value='${fn:substring(resultInfo.nttSj, 0, 40)}'/> + <c:if test="${resultInfo.commentCo != ''}"> + <c:out value='[${resultInfo.commentCo}]'/> + </c:if> + </td> + </c:when> + <c:otherwise> + <!-- 나머지 경우 --> + <td class="board_tit"> + <a href="#!" onclick="fn_egov_inquire_articledetail('${resultInfo.bbsId }', '${resultInfo.nttId }');" title="${resultInfo.nttSj }"> + <c:out value='${fn:substring(resultInfo.nttSj, 0, 40)}'/><c:if test="${resultInfo.commentCo != ''}"> <c:out value='[${resultInfo.commentCo}]'/></c:if> + </a> + </td> + </c:otherwise> + </c:choose> + <%-- <td><c:out value='${resultInfo.frstRegisterNm}'/></td> --%> + <td><c:out value='${resultInfo.frstRegisterPnttm}'/></td> + <%-- <td><c:out value='${resultInfo.inqireCo}'/></td> --%> + </tr> + </c:forEach> - <c:if test="${fn:length(resultList) == 0}"> - <!-- 글이 없는 경우 --> - <tr> - <td colspan="3"><spring:message code="common.nodata.msg" /></td> - </tr> - </c:if> - </tbody> -</table> + <c:if test="${fn:length(resultList) == 0}"> + <!-- 글이 없는 경우 --> + <tr> + <td colspan="3"><spring:message code="common.nodata.msg" /></td> + </tr> + </c:if> + </tbody> + </table> -<!-- paging navigation --> -<div class="bottom_wrap center"> - <div class="pagination"> - <ul> - <ui:pagination paginationInfo="${paginationInfo}" type="user" jsFunction="fn_egov_select_linkPage"/> - </ul> + <!-- paging navigation --> + <div class="bottom_wrap center"> + <div class="pagination"> + <ul> + <ui:pagination paginationInfo="${paginationInfo}" type="user" jsFunction="fn_egov_select_linkPage"/> + </ul> + </div> </div> </div> -<!-- 등록버튼 --> -<!-- -<div class="btn"> - <span class="btn_s"><a href="<c:url value='/cop/bbs/insertBBSMasterView.do' />" title="<spring:message code="button.create" /> <spring:message code="input.button" />"><spring:message code="button.create" /></a></span> -</div> ---> -</div> - -<input name="nttId" type="hidden" value="0"> -<input name="bbsId" type="hidden" value="${boardMasterVO.bbsId}"> -<input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"> Index: base3.10/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/bbs/EgovArticleDetail.jsp =================================================================== --- base3.10/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/bbs/EgovArticleDetail.jsp (revision 48) +++ base3.10/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/bbs/EgovArticleDetail.jsp (revision 49) @@ -22,6 +22,7 @@ <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> <%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> <%pageContext.setAttribute("crlf", "\r\n"); %> +<c:set var="reBbsId" value="${fn:replace(boardMasterVO.bbsId, \"BBSMSTR_\", \"\")}" /> <c:set var="pageTitle"><spring:message code="comCopBbs.articleVO.title"/></c:set> <script type="text/javascript"> @@ -31,9 +32,9 @@ function fn_egov_delete_article(form){ if(confirm("<spring:message code="common.delete.msg" />")){ // Delete하기 위한 키값을 셋팅 - form.submit(); - } -} + form.submit(); + } +} /* ******************************************************** * 답글작성 @@ -106,13 +107,6 @@ </script> -<!-- 2009.06.29 : 2단계 기능 추가 --> -<%-- <c:if test="${useSatisfaction == 'true'}"> --%> -<%-- <c:import url="/cop/stf/selectSatisfactionList.do" charEncoding="utf-8"> --%> -<%-- <c:param name="type" value="head" /> --%> -<%-- </c:import> --%> -<%-- </c:if> --%> - <!-- javascript warning tag --> <noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript> @@ -134,9 +128,18 @@ </div> <div class="board_content"> <c:out value="${fn:replace(result.nttCn , crlf , '<br/>')}" escapeXml="false" /> - <!-- <img src="/images/user/sample_notice.jpg" alt=""> --> </div> </div> + <form name="formList" action="<c:url value='/cop/bbs/${reBbsId }/selectArticleList.do'/>" method="post" > + <div class="bottom_wrap center"> + <button type="submit" class="btn_l bg_basic" ><spring:message code="button.list" /></button> + </div> + + <input name="bbsId" type="hidden" value="<c:out value="${searchVO.bbsId}" />"> + <input name="pageIndex" type="hidden" value="${searchVO.pageIndex}"> + <input name="searchKeyword" type="hidden" value="${searchVO.searchKeyword}"> + </form> + <!-- 하단 버튼 --> <%-- <div class="btn"> <c:if test="${result.ntcrId != 'anonymous'}">
Add a comment
List