검색, 페이지네이션
parent
e968c3312a
commit
99cd88b4ac
|
|
@ -52,12 +52,20 @@ public class ImgPaginationRenderer extends AbstractPaginationRenderer implements
|
||||||
*/
|
*/
|
||||||
public void initVariables() {
|
public void initVariables() {
|
||||||
|
|
||||||
firstPageLabel = "<a href=\"#\" onclick=\"{0}({1}); return false;\">" + "<image src='" + servletContext.getContextPath() + "/images/egovframework/cmmn/btn_page_pre10.gif' border=0/></a> ";
|
firstPageLabel = "";//""<a href=\"#\" onclick=\"{0}({1}); return false;\">" + "<image src='" + servletContext.getContextPath() + "/images/egovframework/cmmn/btn_page_pre10.gif' border=0/></a> ";
|
||||||
previousPageLabel = "<a href=\"#\" onclick=\"{0}({1}); return false;\">" + "<image src='" + servletContext.getContextPath() + "/images/egovframework/cmmn/btn_page_pre1.gif' border=0/></a> ";
|
previousPageLabel = "<li>\n" +
|
||||||
currentPageLabel = "<strong>{0}</strong> ";
|
"\t\t\t\t\t <a href=\"#\" aria-label=\"Previous\">\n" +
|
||||||
otherPageLabel = "<a href=\"#\" onclick=\"{0}({1}); return false;\">{2}</a> ";
|
"\t\t\t\t\t\t<span aria-hidden=\"true\">«</span>\n" +
|
||||||
nextPageLabel = "<a href=\"#\" onclick=\"{0}({1}); return false;\">" + "<image src='" + servletContext.getContextPath() + "/images/egovframework/cmmn/btn_page_next1.gif' border=0/></a> ";
|
"\t\t\t\t\t </a>\n" +
|
||||||
lastPageLabel = "<a href=\"#\" onclick=\"{0}({1}); return false;\">" + "<image src='" + servletContext.getContextPath() + "/images/egovframework/cmmn/btn_page_next10.gif' border=0/></a> ";
|
"\t\t\t\t\t</li>";
|
||||||
|
currentPageLabel = "<li class = \"active\"><a href=\"#\">{0}</a></li>";
|
||||||
|
otherPageLabel = "<li><a href=\"#\" onclick=\"{0}({1}); return false;\">{2}</a></li>";
|
||||||
|
nextPageLabel = "<li>\n" +
|
||||||
|
"\t\t\t\t\t <a href=\"#\" aria-label=\"Next\">\n" +
|
||||||
|
"\t\t\t\t\t\t<span aria-hidden=\"true\">»</span>\n" +
|
||||||
|
"\t\t\t\t\t </a>\n" +
|
||||||
|
"\t\t\t\t\t</li>";
|
||||||
|
lastPageLabel = "";//""<a href=\"#\" onclick=\"{0}({1}); return false;\">" + "<image src='" + servletContext.getContextPath() + "/images/egovframework/cmmn/btn_page_next10.gif' border=0/></a> ";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,21 @@
|
||||||
FROM
|
FROM
|
||||||
map_field_data a LEFT JOIN t_user b ON a.userid=b.userid
|
map_field_data a LEFT JOIN t_user b ON a.userid=b.userid
|
||||||
WHERE 1=1
|
WHERE 1=1
|
||||||
|
|
||||||
|
|
||||||
|
<if test='searchKeyword != null and searchKeyword != ""'>
|
||||||
|
<choose>
|
||||||
|
<when test='searchCondition eq "all"'>
|
||||||
|
AND (a.region LIKE CONCAT('%',#{searchKeyword},'%')
|
||||||
|
OR b.name LIKE CONCAT('%',#{searchKeyword},'%')
|
||||||
|
OR b.company LIKE CONCAT('%',#{searchKeyword},'%'))
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
AND ${searchCondition} LIKE CONCAT('%',#{searchKeyword},'%')
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</if>
|
||||||
|
|
||||||
ORDER BY id DESC
|
ORDER BY id DESC
|
||||||
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
|
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -7,20 +7,19 @@
|
||||||
SELECT
|
SELECT
|
||||||
log_date AS logDate,
|
log_date AS logDate,
|
||||||
req_area AS reqArea,
|
req_area AS reqArea,
|
||||||
-- content,
|
|
||||||
a.userid,
|
a.userid,
|
||||||
b.name,
|
b.name,
|
||||||
b.company
|
b.company
|
||||||
FROM
|
FROM
|
||||||
map_use_history a JOIN t_user b ON a.userid=b.userid
|
map_use_history a JOIN t_user b ON a.userid=b.userid
|
||||||
WHERE 1 = 1
|
WHERE 1 = '1'
|
||||||
<if test='searchKeyword != null and searchKeyword != ""'>
|
<if test='searchKeyword != null and searchKeyword != ""'>
|
||||||
<choose>
|
<choose>
|
||||||
<when test='searchCondition eq "all"'>
|
<when test='searchCondition eq "all"'>
|
||||||
AND (content LIKE CONCAT('%',#{searchKeyword},'%')
|
|
||||||
OR b.name LIKE CONCAT('%',#{searchKeyword},'%')
|
AND (b.name LIKE CONCAT('%',#{searchKeyword},'%')
|
||||||
OR b.company LIKE CONCAT('%',#{searchKeyword},'%')
|
OR b.company LIKE CONCAT('%',#{searchKeyword},'%')
|
||||||
OR a.area LIKE CONCAT('%',#{searchKeyword},'%'))
|
OR a.req_area LIKE CONCAT('%',#{searchKeyword},'%'))
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
AND ${searchCondition} LIKE CONCAT('%',#{searchKeyword},'%')
|
AND ${searchCondition} LIKE CONCAT('%',#{searchKeyword},'%')
|
||||||
|
|
@ -40,10 +39,9 @@
|
||||||
<if test='searchKeyword != null and searchKeyword != ""'>
|
<if test='searchKeyword != null and searchKeyword != ""'>
|
||||||
<choose>
|
<choose>
|
||||||
<when test='searchCondition eq "all"'>
|
<when test='searchCondition eq "all"'>
|
||||||
AND (content LIKE CONCAT('%',#{searchKeyword},'%')
|
AND (b.name LIKE CONCAT('%',#{searchKeyword},'%')
|
||||||
OR b.name LIKE CONCAT('%',#{searchKeyword},'%')
|
OR b.company LIKE CONCAT('%',#{searchKeyword},'%')
|
||||||
OR b.company LIKE CONCAT('%',#{searchKeyword},'%'))
|
OR a.req_area LIKE CONCAT('%',#{searchKeyword},'%'))
|
||||||
OR a.area LIKE CONCAT('%',#{searchKeyword},'%'))
|
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
AND ${searchCondition} LIKE CONCAT('%',#{searchKeyword},'%')
|
AND ${searchCondition} LIKE CONCAT('%',#{searchKeyword},'%')
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,9 @@
|
||||||
<div class="search_keyword">
|
<div class="search_keyword">
|
||||||
<select class="form-control search_selectbox" name="searchCondition">
|
<select class="form-control search_selectbox" name="searchCondition">
|
||||||
<option <c:if test="${fieldDataSearchVO.searchCondition eq 'all'}"><c:out value="selected" /></c:if> value="all">통합검색</option>
|
<option <c:if test="${fieldDataSearchVO.searchCondition eq 'all'}"><c:out value="selected" /></c:if> value="all">통합검색</option>
|
||||||
<option <c:if test="${fieldDataSearchVO.searchCondition eq 'content'}"><c:out value="selected" /></c:if> value="content">작업내용</option>
|
|
||||||
<option <c:if test="${fieldDataSearchVO.searchCondition eq 'name'}"><c:out value="selected" /></c:if> value="name">이름</option>
|
<option <c:if test="${fieldDataSearchVO.searchCondition eq 'name'}"><c:out value="selected" /></c:if> value="name">이름</option>
|
||||||
<option <c:if test="${fieldDataSearchVO.searchCondition eq 'company'}"><c:out value="selected" /></c:if> value="company">소속</option>
|
<option <c:if test="${fieldDataSearchVO.searchCondition eq 'company'}"><c:out value="selected" /></c:if> value="company">소속</option>
|
||||||
<option <c:if test="${fieldDataSearchVO.searchCondition eq 'area'}"><c:out value="selected" /></c:if> value="area">위치</option>
|
<option <c:if test="${fieldDataSearchVO.searchCondition eq 'region'}"><c:out value="selected" /></c:if> value="region">위치</option>
|
||||||
</select>
|
</select>
|
||||||
<input type="text" class="form-control search_inputbox" name="searchKeyword" value="<c:out value="${fieldDataSearchVO.searchKeyword}" />" />
|
<input type="text" class="form-control search_inputbox" name="searchKeyword" value="<c:out value="${fieldDataSearchVO.searchKeyword}" />" />
|
||||||
<input class="btn btn-default" type="submit" value="검색" />
|
<input class="btn btn-default" type="submit" value="검색" />
|
||||||
|
|
@ -91,11 +90,15 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div id="paging" style="width: 100%;">
|
<div class="text-center">
|
||||||
|
<nav aria-label="Page navigation">
|
||||||
|
<ul class="pagination">
|
||||||
<ui:pagination paginationInfo="${paginationInfo}" type="image" jsFunction="fn_link_page" />
|
<ui:pagination paginationInfo="${paginationInfo}" type="image" jsFunction="fn_link_page" />
|
||||||
<form:hidden path="pageIndex" />
|
<form:hidden path="pageIndex" />
|
||||||
</div>
|
|
||||||
</form:form>
|
</form:form>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,13 @@
|
||||||
<link href="<c:out value="/css/style.css" />" rel="stylesheet">
|
<link href="<c:out value="/css/style.css" />" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function fn_link_page(pageNo) {
|
||||||
|
document.searchForm.pageIndex.value = pageNo;
|
||||||
|
document.searchForm.action = "<c:url value='/admin/history' />";
|
||||||
|
document.searchForm.submit();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<%@ include file="../include/header.jsp"%>
|
<%@ include file="../include/header.jsp"%>
|
||||||
|
|
@ -34,10 +41,9 @@
|
||||||
<div class="search_keyword">
|
<div class="search_keyword">
|
||||||
<select class="form-control search_selectbox" name="searchCondition">
|
<select class="form-control search_selectbox" name="searchCondition">
|
||||||
<option <c:if test="${UseHistorySearchVO.searchCondition eq 'all'}"><c:out value="selected" /></c:if> value="all">통합검색</option>
|
<option <c:if test="${UseHistorySearchVO.searchCondition eq 'all'}"><c:out value="selected" /></c:if> value="all">통합검색</option>
|
||||||
<option <c:if test="${UseHistorySearchVO.searchCondition eq 'content'}"><c:out value="selected" /></c:if> value="content">작업내용</option>
|
|
||||||
<option <c:if test="${UseHistorySearchVO.searchCondition eq 'name'}"><c:out value="selected" /></c:if> value="name">이름</option>
|
<option <c:if test="${UseHistorySearchVO.searchCondition eq 'name'}"><c:out value="selected" /></c:if> value="name">이름</option>
|
||||||
<option <c:if test="${UseHistorySearchVO.searchCondition eq 'company'}"><c:out value="selected" /></c:if> value="company">소속</option>
|
<option <c:if test="${UseHistorySearchVO.searchCondition eq 'company'}"><c:out value="selected" /></c:if> value="company">소속</option>
|
||||||
<option <c:if test="${UseHistorySearchVO.searchCondition eq 'area'}"><c:out value="selected" /></c:if> value="area">위치</option>
|
<option <c:if test="${UseHistorySearchVO.searchCondition eq 'req_area'}"><c:out value="selected" /></c:if> value="req_area">위치</option>
|
||||||
</select>
|
</select>
|
||||||
<input type="text" class="form-control search_inputbox" name="searchKeyword" value="<c:out value='${UseHistorySearchVO.searchKeyword}' />" />
|
<input type="text" class="form-control search_inputbox" name="searchKeyword" value="<c:out value='${UseHistorySearchVO.searchKeyword}' />" />
|
||||||
<input class="btn btn-default" type="submit" value="검색" />
|
<input class="btn btn-default" type="submit" value="검색" />
|
||||||
|
|
@ -50,7 +56,6 @@
|
||||||
<tr><th colspan="5">지도사용 이력</th></tr>
|
<tr><th colspan="5">지도사용 이력</th></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>위치</th>
|
<th>위치</th>
|
||||||
<th>작업내용</th>
|
|
||||||
<th>소속</th>
|
<th>소속</th>
|
||||||
<th>담당자</th>
|
<th>담당자</th>
|
||||||
<th>날짜</th>
|
<th>날짜</th>
|
||||||
|
|
@ -61,7 +66,6 @@
|
||||||
<c:forEach var="item" items="${useHistoryList}">
|
<c:forEach var="item" items="${useHistoryList}">
|
||||||
<tr>
|
<tr>
|
||||||
<td><c:out value="${item.reqArea}" /></td>
|
<td><c:out value="${item.reqArea}" /></td>
|
||||||
<td><%--<c:out value="${item.content}" />--%></td>
|
|
||||||
<td><c:out value="${item.company}" /></td>
|
<td><c:out value="${item.company}" /></td>
|
||||||
<td><c:out value="${item.name}" /></td>
|
<td><c:out value="${item.name}" /></td>
|
||||||
<td class="td_date"><c:out value="${item.logDate}" /></td>
|
<td class="td_date"><c:out value="${item.logDate}" /></td>
|
||||||
|
|
@ -74,11 +78,15 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div id="paging" style="width: 100%;">
|
<div class="text-center">
|
||||||
|
<nav aria-label="Page navigation">
|
||||||
|
<ul class="pagination">
|
||||||
<ui:pagination paginationInfo="${paginationInfo}" type="image" jsFunction="fn_link_page" />
|
<ui:pagination paginationInfo="${paginationInfo}" type="image" jsFunction="fn_link_page" />
|
||||||
<form:hidden path="pageIndex" />
|
<form:hidden path="pageIndex" />
|
||||||
</div>
|
|
||||||
</form:form>
|
</form:form>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,6 @@
|
||||||
<body>
|
<body>
|
||||||
<%@ include file="../include/header.jsp"%>
|
<%@ include file="../include/header.jsp"%>
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<div class="section_title">
|
|
||||||
<!-- <p>현장 지원 시스템</p> -->
|
|
||||||
</div>
|
|
||||||
<div class="section_content">
|
<div class="section_content">
|
||||||
<form:form commandName="useRequestSearchVO" name="searchForm" action="/admin/request" method="get">
|
<form:form commandName="useRequestSearchVO" name="searchForm" action="/admin/request" method="get">
|
||||||
<input type="hidden" name="status" value="<c:out value="${useRequestSearchVO.status}" />" />
|
<input type="hidden" name="status" value="<c:out value="${useRequestSearchVO.status}" />" />
|
||||||
|
|
@ -95,11 +92,19 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div id="paging" style="width: 100%;">
|
<div class="text-center">
|
||||||
|
<nav aria-label="Page navigation">
|
||||||
|
<ul class="pagination">
|
||||||
<ui:pagination paginationInfo="${paginationInfo}" type="image" jsFunction="fn_link_page" />
|
<ui:pagination paginationInfo="${paginationInfo}" type="image" jsFunction="fn_link_page" />
|
||||||
<form:hidden path="pageIndex" />
|
<form:hidden path="pageIndex" />
|
||||||
</div>
|
|
||||||
</form:form>
|
</form:form>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section_title">
|
||||||
|
<!-- <p>현장 지원 시스템</p> -->
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -111,11 +111,15 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div id="paging" style="width: 100%;">
|
<div class="text-center">
|
||||||
|
<nav aria-label="Page navigation">
|
||||||
|
<ul class="pagination">
|
||||||
<ui:pagination paginationInfo="${paginationInfo}" type="image" jsFunction="fn_link_page" />
|
<ui:pagination paginationInfo="${paginationInfo}" type="image" jsFunction="fn_link_page" />
|
||||||
<form:hidden path="pageIndex" />
|
<form:hidden path="pageIndex" />
|
||||||
</div>
|
|
||||||
</form:form>
|
</form:form>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
|
||||||
<form:form commandName="userVO" id="updateFrm" method="post" action="/admin/userSign">
|
<form:form commandName="userVO" id="updateFrm" method="post" action="/admin/userSign">
|
||||||
<input type="hidden" id="userid" name="userid" />
|
<input type="hidden" id="userid" name="userid" />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue