itsm_ysm/src/main/webapp/WEB-INF/jsp/nlib/bbs/selectAncmntArticle.jsp

155 lines
5.1 KiB
Plaintext

<%
/**
* <pre>
* @Class Name : selectAncmntArticle.jsp
*
* @Description : 공지사항 상세내용을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 9. 14. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 9. 14.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">공지사항 - 상세조회</c:set>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>${pageTitle}</title>
<script type="text/javaScript" language="javascript">
// 목록으로 이동
function fn_list() {
$("#articleForm").submit();
}
// 파일 다운로드
function fn_downloadFile(fileId, fileSeq, fileName) {
if(fileId == null || fileId.trim().length < 1) {
alert("파일정보를 확인해 주시기 바랍니다.[1]");
return;
}
if(fileSeq < 1) {
alert("파일정보를 확인해 주시기 바랍니다.[2]");
return;
}
if(fileName == null || fileName.trim().length < 1) {
alert("파일정보를 확인해 주시기 바랍니다.[3]");
return;
}
$("#fileId").val(fileId);
$("#fileSeq").val(fileSeq);
$("#fileName").val(fileName);
$("#downloadFileForm").submit();
}
</script>
</head>
<body>
<h1>${pageTitle }</h1>
메시지 : <span style="color:red;">${message }</span>
<br />
<form name="articleForm" id="articleForm"
action="${pageContext.request.contextPath}/bbs/listAncmnts.do"
method="post">
<!-- HIDDEN 영역 : 시작 -->
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${searchArticle.pageIndex}" readonly />
<input type="text" name="pageSize" id="pageSize" title="목록에 보여줄 글개수" value="${searchArticle.pageSize}" readonly />
<input type="text" name="searchType" id="searchType" title="검색구분" value="${searchArticle.searchType}" readonly />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchArticle.searchKeyword}" readonly />
<input type="text" name="articleId" id="articleId" title="선택글번호" value="${searchArticle.articleId}" readonly />
<!-- HIDDEN 영역 : 종료 -->
<table class="table_content" style="width:100% !important; margin-top: 20px;">
<tr>
<th>유형</th>
<td>
<c:if test='${article.notiYn == "Y"}'>공지</c:if>
<c:if test='${article.notiYn != "Y"}'>일반</c:if>
</td>
<th>작성일</th>
<td>${article.regDd }</td>
</tr>
<tr>
<th rowspan="1">제목</th>
<td colspan="3">${article.title}</td>
</tr>
<tr>
<th rowspan="1">질문내용</th>
<td colspan="3">${article.content}</td>
</tr>
<c:if test="${article.attachFileCnt > 0}">
<tr>
<td colspan="4">
<%
// 파일정보 : 저장파일ID=원파일명
%>
<c:forEach var="attachFile" items="${article.attachFiles }">
<a href="javascript:void(0);" onclick="fn_downloadFile('${attachFile.fileId}', ${attachFile.fileSeq}, '${attachFile.fileName}')">${attachFile.fileName} (${attachFile.fileSize} byte(s))</a><br/>
</c:forEach>
</td>
</tr>
</c:if>
<c:if test="${article.attachFileCnt < 1}">
<td colspan="4">첨부파일 없음
</td>
</c:if>
</table>
<br/>
<!-- 관련 작업 버튼 -->
<button type="button" name="btnList" id="btnList" class="float"
onclick="fn_list()">목록</button>
</form>
<br />
<!-- 첨부파일 다운로드용 폼 -->
<form name="downloadFileForm" id="downloadFileForm"
action="${pageContext.request.contextPath}/fileupload/downloadAttachFile.do"
method="post">
<input type="text" name="subPathKey" id="subPathKey" value="fileupload.bbs.ancmnt.subpath" readonly />
<input type="text" name="fileId" id="fileId" value="" readonly />
<input type="text" name="fileSeq" id="fileSeq" value="" readonly />
<input type="text" name="fileName" id="fileName" value="" readonly />
</form>
</body>
</html>