<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<c:set var="parmeter" value=""></c:set>
<c:if test="${!empty searchType && !empty searchText}">
    <c:set var="parameter" value="?searchType=${searchType}&searchText=${searchText}"></c:set>
</c:if>
<div class="container">
    <div class="subHeader">
        <h1 class="logo">안동시 교통정보센터</h1>
        <div class="pageLocation">
            <%@ include file="/WEB-INF/jsp/egovframework/include/userSubMenu.jsp" %>
        </div>
    </div>
    <div class="subContent">
        <div class="pageTitle">
            <h2>공지사항</h2>
            <p>역사와 미래가 공존하는 <span>안동</span></p>
        </div>

        <div class="boardWrap">
            <div class='view-head'>
                <p>${notice.bSubject}</p>
            </div>
            <div class='view-contents'>
                <div class='view-infoBox'>
                    <p class='download'>
                        <c:if test="${not empty notice.attachFiles && not empty notice.attachFileIds}" >
                            <c:forEach var="attachFile" items="${notice.attachFiles}" varStatus="status">
                                <c:if test="${not empty attachFile}">
                                    <a class="file${status.count}" onclick="fileDownload('${notice.attachFileIds.get(status.index)}', '${attachFile}')" style="cursor:pointer;">
                                        <img src="/images/contents/ico_file.png" class='pt12 pr05' alt="첨부파일${status.count}" />${attachFile}
                                    </a>
                                </c:if>
                            </c:forEach>
                        </c:if>
                    </p>
                    <p class="info">
                        <span class='writer'>${notice.bWriter}</span>
                        <span class='day'>${notice.regDate}</span>
                        <span class='visited'>${notice.readCount}</span>
                    </p>
                </div>
                <div class="text-area">
                    ${notice.bContent}
                </div>
            </div>

            <div class="prevnext">
                <p>
                    <c:if test="${!empty notice.nextNo}"><span><a href="/notice/noticeView/${notice.nextNo}.do${parameter}" class="button">&lt; 이전으로</a></span></c:if>
                    <c:if test="${!empty notice.prevNo}"><span><a href="/notice/noticeView/${notice.prevNo}.do${parameter}" class="button"> 다음으로 &gt;</a></span></c:if>
                </p>
                <p>
                    <span><a href="/notice/noticeList.do${parameter}" class="button">목록</a></span>
                </p>
            </div>
        </div>
    </div>
</div>