<%--
  Class Name : EgovMenuCreatManage.jsp
  Description : 메뉴생성관리 조회 화면
  Modification Information
 
      수정일         수정자                   수정내용
    -------    --------    ---------------------------
     2009.03.10    이용             최초 생성
     2011.08.31   JJY       경량환경 버전 생성
 
    author   : 공통서비스 개발팀 이용
    since    : 2009.03.10
--%>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%
  /* Image Path 설정 */
  String imagePath_icon   = "/images/egovframework/sym/mpm/icon/";
  String imagePath_button = "/images/egovframework/sym/mpm/button/";
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Language" content="ko" >
<title>메뉴생성관리</title>
<script type="text/javaScript">
/* ********************************************************
 * 최초조회 함수
 ******************************************************** */
function fMenuCreatManageSelect(){ 
    document.menuCreatManageForm.action = "<c:url value='/sym/mnu/mcm/EgovMenuCreatManageSelect.do'/>";
    document.menuCreatManageForm.submit();
}

/* ********************************************************
 * 페이징 처리 함수
 ******************************************************** */
function linkPage(pageNo){
	var searchForm = document.searchForm ;
	searchForm.pageIndex.value = pageNo ;
	searchForm.searchKeyword.value = $('#searchKeyword').val();
	searchForm.submit();
}

/* ********************************************************
 * 조회 처리 함수
 ******************************************************** */
function selectMenuCreatManageList() { 
	linkPage(1) ;
}

/* ********************************************************
 * 메뉴생성 화면 호출
 ******************************************************** */
function selectMenuCreat(vAuthorCode, menuUserType) {
    document.menuCreatManageForm.authorCode.value = vAuthorCode;
    document.menuCreatManageForm.menuUserType.value = menuUserType;
    document.menuCreatManageForm.action = "<c:url value='/sym/mnu/mcm/EgovMenuCreatSelect.do'/>";
    window.open("#", "_menuCreat", "scrollbars = yes, top=100px, left=100px, height=700px, width=850px");    
    document.menuCreatManageForm.target = "_menuCreat";
    document.menuCreatManageForm.submit();  
}

</script>
<style>
	select { -webkit-appearance: none; -moz-appearance: none; appearance: none; background: url('/') no-repeat 95% 50%; /* 화살표 모양의 이미지 */ }
	select::-ms-expand { display: none;}
</style>
</head>
<body>

<form name="menuCreatManageForm" action ="<c:url value='/sym/mpm/EgovMenuCreatManageSelect.do'/>" method="post">
	<input name="checkedMenuNoForDel" type="hidden" />
	<input name="authorCode"  type="hidden" />
	<input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"/>
	<input type="hidden" name="req_menuNo">
	<input type="hidden" name="menuUserType">
	
	<div class="ad_content">
	<div class="ad_con_head">
		<div class="ad_head_text">
			<p class="today_txt">메뉴생성리스트</p>
			<div class="ad_head_ment">
				<p class="today_last_txt"><span id="cnt_cate_list"></span></p>
			</div>
		</div>
	</div>
	<div class="ad_subcon">
		<div class="ad_con_body">
			<div class="ad_bo_h3">
				<div class="board1_div1">
					권한코드 : 
					<input id="searchKeyword" name="searchKeyword" type="text" value="<c:out value='${searchVO.searchKeyword}'/>" size="25" title="검색"  />
					<ul class="board1_div2_ul" style="width: 88px;">
						<li><button class="board1_list_btn" onclick="selectMenuCreatManageList(); return false;">검 색</button></li>
					</ul>
				</div>
			</div>
		</div>
		<p class="mem_count">조회건수 : <c:out value="${paginationInfo.totalRecordCount}"/></p>
		<div class="ad_mem_list">
			<table>
				<tr>
					<th>번호</th>
					<th>권한 코드</th>
					<th>권한 명</th>
					<th>권한 설명</th>
					<th>매뉴생성여부</th>
					<th>메뉴생성</th>
				</tr>
				<c:forEach var="result" items="${list_menumanage}" varStatus="status">
				<tr>
					<td><c:out value="${(searchVO.pageIndex - 1) * searchVO.pageSize + status.count}"/></td>
					<td><c:out value="${result.authorCode}"/></td>
					<td><c:out value="${result.authorNm}"/></td>
					<td><c:out value="${result.authorDc}"/></td>
					<td>
					 	<c:if test="${result.chkYeoBu > 0}">Y</c:if>
					    <c:if test="${result.chkYeoBu == 0}">N</c:if>
					</td>
					<td>
						<a href="#" onclick="selectMenuCreat('<c:out value="${result.authorCode}"/>' , 'A'); return false;"><button>관리자</button></a>/
						<a href="#" onclick="selectMenuCreat('<c:out value="${result.authorCode}"/>' , 'U'); return false;"><button>사용자</button></a>
					</td>
				</tr>
				</c:forEach>
				<c:if test="${empty list_menumanage}">
         			<tr><td colspan="5"><spring:message code="common.nodata.msg" /></td></tr>
         		</c:if>     
			</table>
			<!-- 페이지 네비게이션 시작 -->
			<c:if test="${!empty list_menumanage}">
		 		<div class="board1_btn">
		    		<ul>
		    			<ui:pagination paginationInfo = "${paginationInfo}"  type="image" jsFunction="linkPage" />
		    		</ul>	
		    	</div>  
		  	</c:if>                      
		    <!-- //페이지 네비게이션 끝 --> 
		</div>
	</div>
	</div>
</form>
<form name="modiForm" method="get" action="<c:url value='/sec/ram/EgovAuthorRoleList.do'/>" >
	<input name="authorCode" type="hidden" />
	<input name="searchKeyword" type="hidden" />
</form>
<form name="searchForm" method="get" action="<c:url value='/sym/mnu/mcm/EgovMenuCreatManageSelect.do'/>">
	<input name="pageIndex" type="hidden" value="1" />
	<input name="searchKeyword" type="hidden" />
</form>	
</body>
</html>