You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
152 lines
4.9 KiB
152 lines
4.9 KiB
<%-- |
|
Document : template-list |
|
Created on : 2011. 1. 18, ¿ÀÈÄ 3:28:08 |
|
Author : bhs |
|
--%> |
|
|
|
<%@page contentType="text/html" pageEncoding="EUC-KR"%> |
|
<%@page import="java.net.URLEncoder"%> |
|
<%@page import="java.util.List"%> |
|
<%@page import="javax.jdo.PersistenceManager"%> |
|
<%@page import="javax.jdo.Transaction"%> |
|
<%@page import="kr.co.kihyun.lang.MInteger"%> |
|
<%@page import="kr.co.kihyun.lang.MString"%> |
|
<%@page import="kr.co.kihyun.moumi.MoumiConfig"%> |
|
<%@page import="kr.co.kihyun.beans.entity.MUser"%> |
|
<%@page import="kr.co.kihyun.beans.entity.TotDoc"%> |
|
<%@page import="kr.co.kihyun.beans.entity.util.PMF"%> |
|
<%@page import="kr.co.kihyun.beans.entity.util.MPersistenceManager"%> |
|
<%@page import="kr.co.kihyun.beans.user.HttpSSOLogin"%> |
|
<%@page import="org.slf4j.Logger"%> |
|
<%@page import="org.slf4j.LoggerFactory"%> |
|
|
|
<% |
|
Logger LOG = LoggerFactory.getLogger(this.getClass()); |
|
|
|
request.setCharacterEncoding("UTF-8"); |
|
|
|
String filterOption = request.getParameter("filterOption"); |
|
String filterValue = request.getParameter("filterValue"); |
|
String uri = URLEncoder.encode("template-list.jsp?filterOption=" + MString.checkNull(filterOption) + |
|
"&filterValue=" + MString.checkNull(filterValue), "UTF-8"); |
|
|
|
MUser mUser = null; |
|
List<TotDoc> onGoingDocs = null; |
|
|
|
PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); |
|
Transaction tx = pm.currentTransaction(); |
|
try { |
|
tx.begin(); |
|
|
|
mUser = pm.getObjectById(MUser.class, HttpSSOLogin.getLoginID(request)); |
|
onGoingDocs = mUser.getOnGoingDocs(pm, filterOption, filterValue); |
|
|
|
tx.rollback(); |
|
|
|
int strPage = MInteger.parseInt(request.getParameter("strPage"), 1); |
|
int recordSize = 15; |
|
int currentPage = strPage; |
|
int pageSize = (int) Math.ceil(onGoingDocs.size() / (float) recordSize); |
|
int currentPageSetUp = currentPage / 10 * 10; |
|
%> |
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
|
"http://www.w3.org/TR/html4/loose.dtd"> |
|
|
|
<html> |
|
<head> |
|
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR"> |
|
<title><%=MoumiConfig.getTitle()%></title> |
|
<link rel="stylesheet" href="/totsys/common/css/text.css" type="text/css"> |
|
<link rel="stylesheet" href="/totsys/common/css/kecttep.css" type="text/css"> |
|
<link rel="stylesheet" href="/totsys/common/css/SquareButtons.css" type="text/css"> |
|
</head> |
|
<body> |
|
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
|
<jsp:include page="/totsys/common/inc/totper/top/top.jsp" flush="true" /> |
|
<tr> |
|
<td> </td> |
|
<td valign="top"> |
|
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
|
<jsp:include page="/totsys/common/inc/title/title.jsp" flush="true"> |
|
<jsp:param name="title" value="Page Title" /> |
|
<jsp:param name="desc" value="Description" /> |
|
</jsp:include> |
|
<tr> |
|
<td class="kecttep_list_tdmenu"> |
|
<%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.document") |
|
+ MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.name") |
|
%> |
|
</td> |
|
<td class="kecttep_list_tdmenu"> |
|
<%= MoumiConfig.getMessageBundle().getString("moumi.message.doc.Devision") %> |
|
</td> |
|
</tr> |
|
<% |
|
int index = 0; |
|
int nextCount = 0; |
|
if (currentPage > 1) |
|
nextCount = (currentPage - 1) * recordSize; |
|
|
|
tx.begin(); |
|
for (int i = 0; i < recordSize && nextCount+i < onGoingDocs.size(); i++) { |
|
index = nextCount+i; |
|
TotDoc currentDoc = onGoingDocs.get(index); |
|
%> |
|
<tr> |
|
<td class="kecttep_list_graytd"><%= currentDoc.getName() %></td> |
|
<td class="kecttep_list_graytd"><%= currentDoc.getDept(pm).getName() %></td> |
|
</tr> |
|
<% |
|
} |
|
tx.rollback(); |
|
%> |
|
<tr> |
|
<td height="15"></td> |
|
</tr> |
|
<% |
|
if (onGoingDocs.isEmpty()) { |
|
%> |
|
<tr> |
|
<td class="kecttep_none_tdmenu" colspan="14" height="25" align="center"> |
|
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.notPrssDoc")%> |
|
</td> |
|
</tr> |
|
<% |
|
} else { |
|
%> |
|
<tr style="padding-top: 3px" valign="middle"> |
|
<td height="25" colspan="8" align="center" class="kecttep_board"> |
|
<jsp:include page="/totsys/common/inc/board/page.jsp" flush="true"> |
|
<jsp:param name="uri" value="<%= uri %>" /> |
|
<jsp:param name="pageSize" value="<%= pageSize %>" /> |
|
<jsp:param name="currentPage" value="<%= currentPage %>" /> |
|
<jsp:param name="currentPageSetUp" value="<%= currentPageSetUp %>" /> |
|
</jsp:include> |
|
</td> |
|
</tr> |
|
<% |
|
} |
|
%> |
|
</table> |
|
</td> |
|
</tr> |
|
</table> |
|
<div> |
|
<a class="blueButton" href="#" onclick="alert();"> |
|
<span class="right"> |
|
<%=MoumiConfig.getMessageBundle().getString("moumi.message.button_large.next")%> |
|
</span> |
|
</a> |
|
</div> |
|
</body> |
|
</html> |
|
<% |
|
} catch (Exception e) { |
|
throw new ServletException(e); |
|
} finally { |
|
if(tx.isActive()) |
|
tx.rollback(); |
|
pm.close(); |
|
} |
|
%>
|
|
|