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

        <section class="sub-container">
            <article class="menu-history">
                <ul>
                    <li><a href="/admin/noticeList.do" class="home">홈</a></li>
                    <li><a href="/admin/noticeList.do">공지사항 관리</a></li>
                </ul>
            </article>
            <article class="contents-wrap">
                <div class="title-box">
                    <h2 class="h2-title">공지사항</h2>
                    <p class="title-info">평택시 교통정보센터 <span>관리자</span></p>
                </div>
                <!--탭버튼-->
                <div class="tab-btn">
                    <p><a href="/admin/noticeList.do" class="active">공지사항</a></p>
                    <p><a href="/admin/popupList.do">팝업창 관리</a></p>
                    <p><a href="/admin/modiAdmin.do">관리자 정보변경</a></p>
                    <p><a href="/admin/status.do">접속통계</a></p>
                    <p><a href="/admin/logout.do">로그아웃</a></p>
                </div>
                <!--//탭버튼-->
                <div id="noticeCon">
                    <form name="search_form" id="search_form" method="get" action="/admin/noticeList.do">
                        <fieldset class="board_search">
                            <!-- <legend>공지사항 검색 영역</legend> -->
                            <select title="검색항목 선택" name="searchType" >
                                <option value="title" selected>제목</option>
                                <option value="content" >내용</option>
                            </select>
                            <span class="form_text">
								<input type="text" title="검색어 입력" name="searchText" id="searchText"  placeholder="검색어를 입력하세요." />
						<a href="javascript:$('#search_form').submit();"  class="bt_search"><img src="/common/images/btn-src.png" alt="검색버튼"></a>
							</span>
                        </fieldset>
                    </form>

                    <div class="board-form">
                        <div class="board-head">
                            <dl>
                                <dd class="board-noti"></dd>
                                <dd class="board-no">No</dd>
                                <dd class="board-title">제목</dd>
                                <dd class="board-writer">첨부파일</dd>
                                <dd class="board-day">작성일</dd>
                                <dd class="board-count">조회수</dd>
                            </dl>
                        </div>

                        <div class="board-list">
                            <c:forEach items="${noticeList}" var="item">
                                <dl>
                                    <a href="/admin/noticeView.do?boardNo=${item.boardNo }" title="${item.bSubject }">
                                        <c:if test="${item.bNotice == 'Y'}"><dd class="board-noti"><span class='blue'>공지</span></dd></c:if>
                                        <c:if test="${item.bNotice == 'N'}"><dd class="board-noti"><span></span></dd></c:if>
                                        <dd class="board-no">${item.boardNo }</dd>
                                        <dd class="board-title">${item.bSubject }</dd>
                                        <dd class="board-writer"><c:if test="${item.attachFile != '||'}"><img src="/images/icon_file.png" alt="첨부파일" /></c:if></dd>
                                        <dd class="board-day">${item.regDate}</dd>
                                        <dd class="board-count">${item.readCount }</dd>
                                    </a>
                                </dl>
                            </c:forEach>
                        </div>

                        <div class="prevnext">
                            <p><a href="/admin/noticeWrite.do">글쓰기</a></p>
                        </div>

                        <div class="paging">
                            <c:if test="${pageMaker.prev}">
                                <p class="prev"><a href="/admin/noticeList.do?page=${pageMaker.startPage - 1}">&lt;</a></p>
                            </c:if>
                            <c:forEach begin="${pageMaker.startPage}" end="${pageMaker.endPage}" var="idx">

                                <c:choose>
                                    <c:when test="${pageMaker.getCriteria().getPage() eq idx}">
                                        <a <c:out value="${pageMaker.criteria.page == idx ? 'class=active': '' }"></c:out> href="/admin/noticeList.do?page=${idx}" title="선택됨">${idx}</a>
                                    </c:when>
                                    <c:otherwise>
                                        <a href="/admin/noticeList.do?page=${idx}">${idx}</a>
                                    </c:otherwise>
                                </c:choose>
                            </c:forEach>
                            <c:if test="${pageMaker.next && pageMaker.endPage > 0}">
                                <p class="next"><a href="/admin/noticeList.do?page=${pageMaker.endPage + 1}">&gt;</a></p>
                            </c:if>
                        </div>
                    </div><!-- //result-list -->
                </div>
            </article>
        </section>
<!--//contents-->