File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
2023-06-22
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
<%--
Class Name : EgovAuthorManage.jsp
Description : EgovAuthorManage List 화면
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2009.03.01 lee.m.j 최초 생성
2011.08.31 JJY 경량환경 버전 생성
author : 공통서비스 개발팀 lee.m.j
since : 2009.03.01
--%>
<%@ 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="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" %>
<head>
<script type="text/javaScript">
function fnCheckAll(){ //전체 선택
$("input[name=delYn]").prop("checked",$("input[name=checkAll]").prop("checked"));
}
function fncManageChecked() {
var checkField = document.listForm.delYn;
var checkId = document.listForm.checkId;
var returnValue = "";
var returnBoolean = false;
var checkCount = 0;
if(checkField) {
if(checkField.length > 1) {
for(var i=0; i<checkField.length; i++) {
if(checkField[i].checked) {
checkField[i].value = checkId[i].value;
if(returnValue == "")
returnValue = checkField[i].value;
else
returnValue = returnValue + ";" + checkField[i].value;
checkCount++;
}
}
if(checkCount > 0)
returnBoolean = true;
else {
alert("선택된 권한이 없습니다.");
returnBoolean = false;
}
} else {
if(document.listForm.delYn.checked == false) {
alert("선택된 권한이 없습니다.");
returnBoolean = false;
}
else {
returnValue = checkId.value;
returnBoolean = true;
}
}
} else {
alert("조회된 결과가 없습니다.");
}
document.listForm.authorCodes.value = returnValue;
return returnBoolean;
}
function fncSelectAuthorList(){
var listForm = document.listForm ;
<c:if test="${!empty loginId}">
if(""!= document.listForm.searchKeyword.value){
updateRecentSearch();//최근검색어 등록
}
</c:if>
linkPage('1');
}
function fncSelectAuthor(author) {
var listForm = document.listForm ;
listForm.authorCode.value = author;
listForm.action = "<c:url value='/sec/ram/EgovAuthor.do'/>";
listForm.submit();
}
function fncAddAuthorInsert(){
document.listForm.action = "<c:url value='/sec/ram/EgovAuthorInsertView.do'/>";
document.listForm.submit();
}
function fncAuthorDeleteList() {
var delflag = false;
var delmessage = "";
$("input[name=delYn]:checked").each(function(){ //기본권한 삭제 방지
if("ROLE_ADMIN"==$(this).val() || "ROLE_USER_MEMBER"==$(this).val() || "ROLE_ANONYMOUS"==$(this).val()){
delmessage += " "+$(this).attr('id');
delflag = true;
}
});
if(delflag){
alert("필수권한인 " + delmessage +"는 삭제하실수 없습니다." ) ;
return;
}
if(fncManageChecked()) {
if(confirm("삭제하시겠습니까?")) {
document.listForm.action = "<c:url value='/sec/ram/EgovAuthorListDelete.do'/>";
document.listForm.submit();
}
}
}
function fncAddAuthorView() {
document.listForm.action = "<c:url value='/sec/ram/EgovAuthorUpdate.do'/>";
document.listForm.submit();
}
function fncSelectAuthorRole(author, roleNm) {
document.listForm.searchKeyword.value = author;
document.listForm.roleNm.value = roleNm;
document.listForm.searchSortCnd.value = '';
document.listForm.action = "<c:url value='/sec/ram/EgovAuthorRoleList.do'/>";
document.listForm.submit();
}
function linkPage(pageNo){
document.listForm.searchCondition.value = "1";
document.listForm.pageIndex.value = pageNo;
document.listForm.action = "<c:url value='/sec/ram/EgovAuthorList.do'/>";
document.listForm.submit();
}
function press() {
if (event.keyCode==13) {
fncSelectAuthorList();
}
}
</script>
</head>
<body>
<form:form id="listForm" name="listForm" action="<c:url value='/sec/ram/EgovAuthorList.do'/>" method="post">
<input type="hidden" name="authorCode"/>
<input type="hidden" name="authorCodes"/>
<input type="hidden" name="pageIndex" value="<c:out value='${authorManageVO.pageIndex}' default='1' />"/>
<input name="searchCondition" type="hidden" value="1" />
<input type="hidden" name="searchSortCnd" value="<c:out value="${authorManageVO.searchSortCnd}" />" />
<input type="hidden" name="searchSortOrd" value="<c:out value="${authorManageVO.searchSortOrd}" />" />
<input name="roleNm" type="hidden" />
<!-- cont -->
<div class="contWrap">
<div class="pageTitle">
<div class="pageIcon"><img src="/pb/img/pageTitIcon4.png" alt=""></div>
<h2 class="titType1 c_222222 fwBold">권한별롤관리</h2>
<p class="tType6 c_999999">현재 사용중인 권한 현황을 파악할 수 있으며, 권한에 따른 롤정로를 볼 수 있습니다.</p>
</div>
<div class="pageCont">
<div class="listSerch">
<h3>권한명 :</h3>
<input type="text" id="searchKeyword" name="searchKeyword" class="recentSearch" value="<c:out value='${authorManageVO.searchKeyword}'/>" size="40" title="검색" onkeydown="press();" />
<input type="button" class="btnType1" onclick="fncSelectAuthorList(); return false;" value="검색">
</div>
<div class="listTop">
<p class="tType5">총 <span class="tType4 c_456ded fwBold"><fmt:formatNumber value="${paginationInfo.totalRecordCount}" pattern="#,###" /></span>건</p>
<div class="rightWrap">
<!-- <input type="button" class="excelBtn" > -->
<!-- <input type="button" class="printBtn" > -->
<select name="pageUnit" id="pageUnit" class="select" title="검색조건선택" onchange="linkPage(1);" >
<option value='10' <c:if test="${authorManageVO.pageUnit == '10' or authorManageVO.pageUnit == ''}">selected</c:if>>10줄</option>
<option value='20' <c:if test="${authorManageVO.pageUnit == '20'}">selected</c:if>>20줄</option>
<option value='30' <c:if test="${authorManageVO.pageUnit == '30'}">selected</c:if>>30줄</option>
</select>
</div>
</div>
<div class="tableWrap">
<table class="tbType1">
<colgroup>
<col style="width: 10%">
<col style="width: 10%">
<col style="width: 35%">
<col style="width: 20%">
<col style="width: 20%">
<col style="width: 15%">
<col style="width: 10%">
</colgroup>
<thead>
<tr>
<th><input type="checkbox" name="checkAll" id="checkAll" onclick="fnCheckAll();" /><label for="checkAll"></label></th>
<th>번호<input type="button" class="sort sortBtn" id="sort_SORT_NUM"></th>
<th>권한명<input type="button" class="sort sortBtn" id="sort_AUTHOR_NM"></th>
<th>권한 코드<input type="button" class="sort sortBtn" id="sort_AUTHOR_CODE"></th>
<th>설명<input type="button" class="sort sortBtn" id="sort_AUTHOR_DC"></th>
<th>등록일자<input type="button" class="sort sortBtn" id="sort_AUTHOR_CREAT_DE"></th>
<th>롤 정보</th>
</tr>
</thead>
<tbody>
<c:forEach var="author" items="${authorList}" varStatus="status">
<tr>
<td>
<input type="checkbox" name="delYn" id="<c:out value="${author.authorNm}"/>" value="<c:out value="${author.authorCode}"/>">
<label for="<c:out value="${author.authorCode}"/>"></label>
<input type="hidden" name="checkId" value="<c:out value="${author.authorCode}"/>" />
</td>
<td>
<c:if test="${authorManageVO.searchSortOrd eq 'desc' }">
<c:out value="${ ( paginationInfo.totalRecordCount - ((authorManageVO.pageIndex -1)*authorManageVO.pageUnit) ) - status.index }"/>
</c:if>
<c:if test="${authorManageVO.searchSortOrd eq 'asc' }">
<c:out value="${(authorManageVO.pageIndex - 1) * authorManageVO.pageUnit + status.count}"/>
</c:if>
</td>
<td><a href="#" onclick="fncSelectAuthor('<c:out value="${author.authorCode}"/>')"><c:out value="${author.authorNm}"/></a></td>
<td>
<c:out value="${author.authorCode}"/>
</td>
<td><c:out value="${author.authorDc}"/></td>
<td><c:out value="${author.authorCreatDe}"/></td>
<td>
<input type="button" class="btnType1 serchBtn" onclick="fncSelectAuthorRole('<c:out value="${author.authorCode}"/>' , '<c:out value="${author.authorNm}"/>'); return false">
</td>
</tr>
</c:forEach>
<c:if test="${empty authorList}">
<tr><td colspan="8"><spring:message code="common.nodata.msg" /></td></tr>
</c:if>
</tbody>
</table>
</div>
<div class="btnWrap">
<input type="button" class="btnType2" onclick="fncAuthorDeleteList(); return false;" value="삭제">
<input type="button" class="btnType1 serchBtn" onclick="fncAddAuthorInsert(); return false;" value="등록">
</div>
<!-- 페이지 네비게이션 시작 -->
<c:if test="${!empty authorList}">
<div class="page">
<ul class="inline">
<ui:pagination paginationInfo = "${paginationInfo}" type="image" jsFunction="linkPage" />
</ul>
</div>
</c:if>
<!-- //페이지 네비게이션 끝 -->
</div>
</div>
<!-- //cont -->
</form:form>
</body>