<%@ page import="com.fenalco.utilities.lists.ListView" %>
<%@ page import="com.fenalco.entities.User" %>
<%@ page import="com.fenalco.entities.DataAccess"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel='stylesheet' style='text/css' href='../css/tablas.css'>
<title>Listado de tipos de reclamo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#ffffff" background="../images/sysmanager/general/fondo.jpg" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- 
-->
<table border="0" cellpadding="0" cellspacing="0" width="780">
        <%
            String helpId = "4";
        %>
        <%@ include file="encabezado.jsp" %>
</table>

<table width="760">
	<tr>
		<td width="152" valign='top'>
			<%@ include file="menuadministrador.jsp" %>
		</td>
		<td valign='top'>
            <%
                String tittle = "Tipos de Reclamo";
            %>
            <%@ include file="/titulo.jsp" %>

			<table width="603">
				<tr><td align="center"><%= request.getAttribute("message")%></td></tr>
				<tr><td></td></tr>
				<tr>
				<form name="complaintTypeList" method="post" action="/administrador/actualizartiposreclamo">
				<table align="center">
					<tr class='tableheader'>
						<!-- Encabezado del listado -->
						<td align="center">Nombre</td>
						<td align="center">Descripci&oacute;n</td>
						<td align="center">Modificar</td>
						<td align="center">Eliminar</td>
					</tr>
			<% 
					ListView view = (ListView)request.getAttribute("view");
					String data;
                                        int count = 0;
					while(view.move())
                    {
                        count++;
						int i=0;
						String id="";
				%>
						<tr>
						<% while((data=(String)view.nextElement()) != null){
							if(i==1){
						%>
								<td><%= data %></td>
						<%  }else{ 
								i=1;
					id=data;
							}
						   }
						%>
							<!-- Columnas para las opciones -->
							<td align="center"><a href="/administrador/actualizartiposreclamo?key=<%= id %>&operationType=update" onClick="complaintTypeList.operationType.value='update';return true"><img  name="update" src="/images/buttons/sysmanager/actualizar.gif" border="0" onClick="operationType.value='update'"></a></td>
							<td align="center"><input name="item" type="checkbox" value="<%= id %>"></td> 
						</tr>
					<%
                                        }
                                        if( count == 0 )
                                        {
                                            %>
                                            <tr>
                                                <td align="center" colspan='4'>
                                                    <strong>A&uacute;n no se han definido tipos de Quejas</strong>
                                                </td>
                                            </tr>
                                            <%
                                        }
                                        %>
						 <tr>
								<td colspan="2" align="center"><input name="new" type="submit" value="Agregar" onClick="operationType.value='new'"><td>
								<%if( count > 0 ){%><td align="center"><input name="delete" type="submit" value="Eliminar" onClick="operationType.value='delete';return window.confirm('Está a punto de eliminar registros del sistema, desea continuar?');"><td><%}%>
						 </tr>
						 </table>
				</table>
				<input name="operationType" type="hidden" value="">
				</form>
			</tr>
			</table>
		</td>
	</tr>
	
</table>
<table width="760">
	<tr>
		<td><%@ include file="/piepagina.jsp" %></td>
	</tr>
</table>
</body>
</html>







