Compare commits

...

2 Commits

7 changed files with 146 additions and 105 deletions

View File

@ -52,12 +52,20 @@ public class ImgPaginationRenderer extends AbstractPaginationRenderer implements
*/
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>&#160;";
previousPageLabel = "<a href=\"#\" onclick=\"{0}({1}); return false;\">" + "<image src='" + servletContext.getContextPath() + "/images/egovframework/cmmn/btn_page_pre1.gif' border=0/></a>&#160;";
currentPageLabel = "<strong>{0}</strong>&#160;";
otherPageLabel = "<a href=\"#\" onclick=\"{0}({1}); return false;\">{2}</a>&#160;";
nextPageLabel = "<a href=\"#\" onclick=\"{0}({1}); return false;\">" + "<image src='" + servletContext.getContextPath() + "/images/egovframework/cmmn/btn_page_next1.gif' border=0/></a>&#160;";
lastPageLabel = "<a href=\"#\" onclick=\"{0}({1}); return false;\">" + "<image src='" + servletContext.getContextPath() + "/images/egovframework/cmmn/btn_page_next10.gif' border=0/></a>&#160;";
firstPageLabel = "";//""<a href=\"#\" onclick=\"{0}({1}); return false;\">" + "<image src='" + servletContext.getContextPath() + "/images/egovframework/cmmn/btn_page_pre10.gif' border=0/></a>&#160;";
previousPageLabel = "<li>\n" +
"\t\t\t\t\t <a href=\"#\" aria-label=\"Previous\">\n" +
"\t\t\t\t\t\t<span aria-hidden=\"true\">&laquo;</span>\n" +
"\t\t\t\t\t </a>\n" +
"\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\">&raquo;</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>&#160;";
}
@Override

View File

@ -35,6 +35,21 @@
FROM
map_field_data a LEFT JOIN t_user b ON a.userid=b.userid
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
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
</select>

View File

@ -7,20 +7,19 @@
SELECT
log_date AS logDate,
req_area AS reqArea,
-- content,
a.userid,
b.name,
b.company
FROM
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 != ""'>
<choose>
<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 a.area LIKE CONCAT('%',#{searchKeyword},'%'))
OR a.req_area LIKE CONCAT('%',#{searchKeyword},'%'))
</when>
<otherwise>
AND ${searchCondition} LIKE CONCAT('%',#{searchKeyword},'%')
@ -40,10 +39,9 @@
<if test='searchKeyword != null and searchKeyword != ""'>
<choose>
<when test='searchCondition eq "all"'>
AND (content LIKE CONCAT('%',#{searchKeyword},'%')
OR b.name LIKE CONCAT('%',#{searchKeyword},'%')
OR b.company LIKE CONCAT('%',#{searchKeyword},'%'))
OR a.area LIKE CONCAT('%',#{searchKeyword},'%'))
AND (b.name LIKE CONCAT('%',#{searchKeyword},'%')
OR b.company LIKE CONCAT('%',#{searchKeyword},'%')
OR a.req_area LIKE CONCAT('%',#{searchKeyword},'%'))
</when>
<otherwise>
AND ${searchCondition} LIKE CONCAT('%',#{searchKeyword},'%')

View File

@ -42,10 +42,9 @@
<div class="search_keyword">
<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 '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 '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>
<input type="text" class="form-control search_inputbox" name="searchKeyword" value="<c:out value="${fieldDataSearchVO.searchKeyword}" />" />
<input class="btn btn-default" type="submit" value="검색" />
@ -91,11 +90,15 @@
</tbody>
</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" />
<form:hidden path="pageIndex" />
</div>
</form:form>
</ul>
</nav>
</div>
</div>
</section>
</body>

View File

@ -20,6 +20,13 @@
<link href="<c:out value="/css/style.css" />" rel="stylesheet">
</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>
<%@ include file="../include/header.jsp"%>
@ -34,10 +41,9 @@
<div class="search_keyword">
<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 '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 '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>
<input type="text" class="form-control search_inputbox" name="searchKeyword" value="<c:out value='${UseHistorySearchVO.searchKeyword}' />" />
<input class="btn btn-default" type="submit" value="검색" />
@ -50,7 +56,6 @@
<tr><th colspan="5">지도사용 이력</th></tr>
<tr>
<th>위치</th>
<th>작업내용</th>
<th>소속</th>
<th>담당자</th>
<th>날짜</th>
@ -61,7 +66,6 @@
<c:forEach var="item" items="${useHistoryList}">
<tr>
<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.name}" /></td>
<td class="td_date"><c:out value="${item.logDate}" /></td>
@ -74,11 +78,15 @@
</tbody>
</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" />
<form:hidden path="pageIndex" />
</div>
</form:form>
</ul>
</nav>
</div>
</div>
</section>
</body>

View File

@ -28,9 +28,6 @@
<body>
<%@ include file="../include/header.jsp"%>
<section class="section">
<div class="section_title">
<!-- <p>현장 지원 시스템</p> -->
</div>
<div class="section_content">
<form:form commandName="useRequestSearchVO" name="searchForm" action="/admin/request" method="get">
<input type="hidden" name="status" value="<c:out value="${useRequestSearchVO.status}" />" />
@ -95,11 +92,19 @@
</tbody>
</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" />
<form:hidden path="pageIndex" />
</div>
</form:form>
</ul>
</nav>
</div>
</div>
<div class="section_title">
<!-- <p>현장 지원 시스템</p> -->
</div>
</section>
</body>

View File

@ -111,11 +111,15 @@
</tbody>
</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" />
<form:hidden path="pageIndex" />
</div>
</form:form>
</ul>
</nav>
</div>
<form:form commandName="userVO" id="updateFrm" method="post" action="/admin/userSign">
<input type="hidden" id="userid" name="userid" />