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

<script type="text/javascript">
$(function()
{
	$(".dropdown-menu > li > a").click(function()
	{
		var h = $(this).html();
		var v = $(this).attr("value");
		var caret = $("<span>");
		caret.addClass("caret");
		$("#hsearchOption").val(v);
		$("#searchOption").html(h+"&nbsp&nbsp&nbsp").append(caret);
	});
});
</script>
 <META HTTP-EQUIV="Refresh" CONTENT="0; URL=boardSearch.bor?searchOption=name&searchWord=${member.name }">
<%@ page import="java.io.*,java.util.*" %>

<!-- 여기가 본 페이지이다 -->
<div class="row">
	<div class="col-lg-8">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h4><i class="fa fa-desktop fa-fw"></i> 게시판 목록 조회</h4>
			</div>
			<div class="panel-body">
				<div>
					<div class="input-group-btn">
						<a class="btn btn-info btn-outline" href="boardWriteForm.bor">새 글쓰기</a>
					</div>
				</div>
				<!-- row -->
	   			<div class="table-responsive">
					<table class="table table-bordered table-hover table-striped">
						<thead>
							<tr>
								<td>글 번호</td>
								<td>글 제목</td>
								<td>작성자</td>
								<td>작성일</td>
								<td>작성시간</td>
								<td>조회수</td>
								<td>답글수</td>
							</tr>
						</thead>
						<tbody>
					<!--  		<c:forEach items="${boardList }" var="dto">
								<tr>
									<td><a href="boardRead.bor?num=${dto.num}">${dto.num}</a></td>
									<td>
										<c:forEach begin="1" end="${dto.lev}">
											<%="&nbsp;&nbsp;" %>
										</c:forEach>
										<a href="boardRead.bor?num=${dto.num}">${dto.subject}</a>
									</td>
									<td>${dto.name}</td>
									<td>${dto.writeDate}</td>
									<td>${dto.writeTime}</td>
									<td>${dto.readCnt}</td>
									<td>${dto.childCnt}</td>
								</tr>
							</c:forEach>-->
						</tbody>
						<tfoot>
						</tfoot>
					</table>
				</div>
				<!-- table-responsive -->
				<div class="row">
					<div class="col-lg-12">
						<div class="input-group-btn text-center">
							<ul class="pagination" style="margin:0px;">
								<li><a class="btn btn-default btn-outline" href=""><i class="fa fa-angle-double-left "></i></a></li>
								<c:forEach var="i" begin="1" end="${pageCnt}">
									<li>
										<a class="btn btn-default btn-outline" href="boardList.bor?curPage=${i}">${i}</a>
									</li>
								</c:forEach>
								<li>
									<a class="btn btn-default btn-outline" href="boardList.bor?curPage=${pageCnt }">
										<i class="fa fa-angle-double-right"></i>
									</a>
								</li>
							</ul>
						</div>
					</div>
					<!-- pagination div -->
					<form action="boardSearch.bor" method="get">
						<div class="col-lg-6 col-lg-offset-3">
							<div class="input-group">
								<div class="input-group-btn">
									<button type="button" id="searchOption" class="btn btn-default btn-outline dropdown-toggle"
									  data-toggle="dropdown" >
										<span class="caret"></span>
									</button>
									<input type="hidden" id="hsearchOption" name="searchOption" value="subject">
									<ul class="dropdown-menu" role="menu">
										<li><a href="#" value="subject">제목</a></li>
										<li><a href="#" value="content">본문</a></li>
										<li><a href="#" value="both">제목+본문</a></li>
										<li><a href="#" value="name">작성자</a></li>
									</ul>
								</div>
								<input type="text" name="searchWord" class="form-control">
								<div class="input-group-btn">
									<input type="submit" class="btn btn-primary btn-outline" value="검색">
								</div>
							</div>
						</div>
					</form>
					<!-- selector div -->
				</div>
				<!-- row -->
			</div>
			<!-- panel-body -->
		</div>
		<!-- panel panel-default -->
	</div>
	<!-- col-lg-12 -->
</div>
<!-- row -->
<!-- /#page-wrapper -->
