<%--
MosP - Mind Open Source Project    http://www.mosp.jp/
Copyright (C) MIND Co., Ltd.       http://www.e-mind.co.jp/

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
--%>
<%@ page
language     = "java"
pageEncoding = "Windows-31J"
buffer       = "256kb"
autoFlush    = "false"
errorPage    = "/jsp/common/error.jsp"
%><%@ page
import = "jp.mosp.common.common.MospConst"
import = "jp.mosp.common.CommonConst"
import = "jp.mosp.common.common.HtmlUtility"
import = "jp.mosp.kintai.workflow.vo.ApprovalRouteListVo"
%><%
ApprovalRouteListVo vo = (ApprovalRouteListVo)request.getAttribute(MospConst.ATT_VO);
String[][] aryRoute    = vo.getAryRoute();
%>
<%=HtmlUtility.getHeader(vo)%>
<%=HtmlUtility.getSubTitle(vo)%>
<div class="Body" id="approvalUnit">
	<%=HtmlUtility.getMessages(vo)%>
	<div class="Search">
		<table>
			<tr>
				<td id="tdRtCode">
					<span class="TitleLabel"><%= vo.NAM_ROUTE_CODE %><%=CommonConst.STR_TITLE_SEPARATOR%></span>
					<input type="text" class="UserIdText" id="<%= ApprovalRouteListVo.PRM_TXT_ROUTE_CODE %>" name="<%= ApprovalRouteListVo.PRM_TXT_ROUTE_CODE %>" value="<%= vo.getEscTxtRouteCode() %>" />
				</td>
				<td id="tdKCode">
					<span class="TitleLabel"><%= vo.NAM_K_CODE %><%=CommonConst.STR_TITLE_SEPARATOR%></span>
					<input type="text" class="UserIdText" id="<%= ApprovalRouteListVo.PRM_TXT_K_CODE %>" name="<%= ApprovalRouteListVo.PRM_TXT_K_CODE %>" value="<%= vo.getEscTxtKCode() %>" />
				</td>
				<td id="tdKName">
					<span class="TitleLabel"><%= vo.NAM_K_NAME %><%=CommonConst.STR_TITLE_SEPARATOR%></span>
					<input type="text" class="TextBox" id="<%= ApprovalRouteListVo.PRM_TXT_K_NAME %>" name="<%= ApprovalRouteListVo.PRM_TXT_K_NAME %>" value="<%= vo.getEscTxtKName() %>" />
				</td>
				<td class="ButtonTd" rowspan="2">
					<button type="button" onclick="submitForm(document.form, 'S2821')"><%=CommonConst.NAM_SEARCH%></button>
				</td>
			</tr>
			<tr>
				<td id="tdUnitCode" colspan="3">
					<span class="TitleLabel"><%= vo.NAM_UNIT_CODE%><%=CommonConst.STR_TITLE_SEPARATOR%></span>
					<input type="text" class="UserIdText" id="<%= ApprovalRouteListVo.PRM_TXT_UNIT_CODE %>" name="<%= ApprovalRouteListVo.PRM_TXT_UNIT_CODE %>" value="<%= vo.getEscTxtUnitCode() %>" />
				</td>
			</tr>
		</table>
	</div>
	<%=HtmlUtility.getListInfo(vo)%>
	<div class="List">
		<table id="list">
			<thead>
				<tr>
					<th id="thButton"></th>
					<th id="thRtCode" onclick="doSubmitKey(document.form, 'S2823', '<%= vo.KEY_ROUTE_CODE %>', '')">&nbsp;<%= vo.NAM_CODE%>&nbsp;<%=vo.getSortMark(vo.KEY_ROUTE_CODE)%></th>
					<th id="thLayer">&nbsp;<%= vo.NAM_LAYER1 %>	&nbsp;</th>
					<th id="thLayer">&nbsp;<%= vo.NAM_LAYER2 %>	&nbsp;</th>
					<th id="thLayer">&nbsp;<%= vo.NAM_LAYER3 %>	&nbsp;</th>
					<th id="thLayer">&nbsp;<%= vo.NAM_LAYER4 %>	&nbsp;</th>
					<th id="thLayer">&nbsp;<%= vo.NAM_LAYER5 %>	&nbsp;</th>
					<th id="thLayer">&nbsp;<%= vo.NAM_LAST_LAYER %>&nbsp;</th>
				</tr>
			</thead>
			<tbody>
<%
for (int i = vo.getStart(); i <= vo.getEnd(); i++) {
%>
				<tr>
					<td class="ButtonTd">
						<button type="button" onclick="doSubmitKey(document.form, 'S2826', '<%= aryRoute[i][0] %>', '')"><%= CommonConst.NAM_SELECT %></button>
					</td>
					<td><%= aryRoute[i][0] %></td>
					<td id="tdLayer"><%= aryRoute[i][1] %></td>
					<td id="tdLayer"><%= aryRoute[i][2] %></td>
					<td id="tdLayer"><%= aryRoute[i][3] %></td>
					<td id="tdLayer"><%= aryRoute[i][4] %></td>
					<td id="tdLayer"><%= aryRoute[i][5] %></td>
					<td id="tdLayer"><%= aryRoute[i][6] %></td>
				</tr>
<%
}
%>
			</tbody>
		</table>	
	</div>
	<div class="ButtonDiv">
		<button type="button" class="ExecuteButton" onclick="doSubmit(document.form, 'S2825')"><%= CommonConst.NAM_MAKE_NEW_DATA %></button>
	</div>
</div>
<%= HtmlUtility.getFooter(vo) %>
