<%@ include file="/includes.jsp" %>
<%@ taglib prefix="smvc" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
<head>
	<title>NRL User Details</title>
	<link rel="stylesheet" href="../webapp.css" type="text/css" />
</head>
<body>
	<table cellspacing="0" width="100%" border="0" align="center">
				 	<tr>
	                    <td width="50%">&nbsp;</td>
	                    <td width="50%">&nbsp;</td>
	                </tr>
	                <tr>
	                    <td width="50%">&nbsp;</td>
	                    <td width="50%">&nbsp;</td>
	                </tr>
	</table>
        <fieldset style="width: 100%" class="nobg">
            <legend>NRL User Details</legend>
            	<fieldset>
				<table cellspacing="0" width="100%" border = "1" bordercolor="#F8F8FF" align="center">

					<tr height="15">
						<th class="label" align="left" width="40%">&nbsp;Title</th>
						<td width="60%" class="label">
							<c:out value="${nrlUser.title}"></c:out>
						</td>
					</tr>
					<tr height="15">
						<th class="label" align="left">&nbsp;User Name</th>
						<td class="label">	
							<c:out value="${nrlUser.mnemonic}"></c:out>
						</td>
					</tr>
					<tr height="15">
						<th class="label" align="left">&nbsp;First Name</th>
						<td class="label"">	
							<c:out value="${nrlUser.firstname}"></c:out>
						</td>
					</tr>
					<tr height="15">
						<th class="label" align="left">&nbsp;Last Name</th>
						<td class="label">	
							<c:out value="${nrlUser.lastname}"></c:out>
						</td>
					</tr>
					<tr height="15">
						<th class="label" align="left">&nbsp;Telephone</th>
						<td class="label">	
								<c:out value="${nrlUser.telephone}"></c:out>
						</td>
					</tr>
					<tr height="15">
						<th class="label" align="left">&nbsp;Email To</th>
						<td class="label">	
							<a href="mailto:<c:out value="${nrlUser.email}"/>?subject=">
								<c:out value="${nrlUser.email}"></c:out>
							</a>
						</td>
					</tr>
					<tr height="15">
						<th class="label" align="left">&nbsp;Type</th>
						<td class="label">	
							<c:out value="${nrlUser.type}"></c:out>
						</td>
					</tr>
					<tr height="15">
						<th class="label" align="left">&nbsp;Speciality</th>
						<td class="label">	
							<c:forEach items="${nrlUser.nrlDepartments}" var="dept" varStatus="s">
								<c:choose>
									<c:when test="${fn:length(nrlUser.nrlDepartments) gt 0}">

										<c:if test="${(s.index + 1) eq fn:length(nrlUser.nrlDepartments)}">
											<c:out value="${dept.description}"></c:out>
										</c:if>
										<c:if test="${(s.index + 1) ne fn:length(nrlUser.nrlDepartments)}">
											<c:out value="${dept.description}"></c:out>,&nbsp;
										</c:if>

									</c:when>
									<c:otherwise>
										No details found.
									</c:otherwise>
								</c:choose>
							</c:forEach>
						</td>
					</tr>
					<tr height="15">
						<th class="label" align="left">&nbsp;Job Title</th>
						<td class="label">	
							<c:out value="${nrlUser.job_title}"></c:out>
						</td>
					</tr>
					<tr height="15">
						<th class="label" align="left">&nbsp;Doctor</th>
						<td class="label">	
							<c:if test="${nrlUser.doctor_flag}">
								Yes
							</c:if>
							<c:if test="${!nrlUser.doctor_flag}">
								No
							</c:if>
						</td>
					</tr>
					<tr height="15">
						<th class="label" align="left">&nbsp;Emdt User</th>
						<td class="label">	
							<c:if test="${nrlUser.emdtFlag}">
								Yes
							</c:if>
							<c:if test="${!nrlUser.emdtFlag}">
								No
							</c:if>
						</td>
					</tr>
					<tr height="15">
						<th class="label" align="left">&nbsp;Fax</th>
						<td class="label">	
							<c:out value="${nrlUser.fax}"></c:out>
						</td>
					</tr>
					<tr height="15">
						<th class="label" align="left">&nbsp;Office Manager</th>
						<td class="label">	
							<c:out value="${nrlUser.office_mgr}"></c:out>
						</td>
					</tr>
					<tr height="15">
						<th class="label" align="left">&nbsp;Post Code</th>
						<td class="label">	
							<c:out value="${nrlUser.postcode}"></c:out>
						</td>
					</tr>
					<tr height="15">
						<th class="label" align="left">&nbsp;Address</th>
						<td class="label">	
							<table cellspacing="0" width="100%" border = "0" align="left">
								<tr><td>
									<c:out value="${nrlUser.address_1}"></c:out>
								</td></tr>
								<tr><td>
									<c:out value="${nrlUser.address_2}"></c:out>
								</td></tr>
								<tr><td>
									<c:out value="${nrlUser.address_3}"></c:out>
								</td></tr>
								<tr><td>
									<c:out value="${nrlUser.address_4}"></c:out>
								</td></tr>
							</table>
						</td>
					</tr>
				</table>
			</fieldset>
</body>
</html>