<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags/form" %>
<%@ include file="../../includes/include.jsp" %>

<html>
<head>
	
</head>
<body>

	<table>
		<tr>
			<td>
				<spring:form cssClass="panel-bkgd " cssStyle="width:680px;height:380px" 
							action="${ctx}/artists/members/create/${artistId}" method="POST" 
							enctype="multipart/form-data" commandName="member">
				   <table>
				        <tr>
				        	<td>
				        		<table>
				        			<tr>
										<td colspan="2">
											<div class="panel-header">
												Crear miembro
											</div>
										</td>
										<td>
										</td>
									</tr>
									<tr>
										<td colspan="2">
											<div class="panel-description">
												Ingrese el nombre del miembro, la descripción y el año del origen del mismo. Inmediatamente
												podrá ver el género creado.
											</div>
										</td>
										<td>
										
										</td>
									</tr>
									<tr>
										<td>
											<div class="field-title">Nombre:</div>
											
										</td>
										<td>
											<spring:input size="50" path="memberName" />
										</td>
									</tr>
									<tr>
										<td>
											<div class="field-title">Fecha nacimiento:</div>
											
										</td>
										<td>
											<spring:input id="member-date" type="date" path="memberBirthDate" />
										</td>
									</tr>
									<tr>
										<td>
											<div class="field-title">Lugar nacimiento:</div>
											
										</td>
										<td>
											<spring:input size="50"  path="memberBirthPlace" />
										</td>
									</tr>
									<tr>
										<td>
											<div class="field-title">Biografía:</div>
											
										</td>
									    <td>
											<spring:textarea cols="47" rows="8" path="biography"/>
											<div id="spacer"></div>
										</td>
									</tr>
				        		</table>
				        	</td>
				        	<td>
				        		<table style="left:-25px;position:relative">
				        			<tr>
										<td>
											<div class="field-title">Ocupación:</div>
										</td>
										<td>
											<spring:input size="37" path="memberOccupation"/>
										</td>
									</tr>
									
									<tr>
										<td>
											<div class="field-title">Foto:</div>
										</td>
										<td>
											 <input type="file" name="file" />
										</td>
									</tr>
								 </table>
							</td>
						</tr>
						<tr>
							<td>
								<div id="spacer"></div>
								<button type="submit" class="create-btn"></button>
							</td>
						</tr>
					</table>
				</spring:form>
			 </td>
			 
			 <td>
			 	<table>
			 		<c:forEach items="${members}" var="member">
			 			<tr>
			 				<td>
			 					<table>
			 						<tr>
			 							<td>
			 								<div class="member-photo-border">
			 									 <img class="member-photo" width="90px" height="90px" src="${ctx}/artists/members/photo/<c:out value='${member.memberId}' />"></img> 
			 								</div>
			 							</td>
			 							<td>
			 								<table>
			 									<tr>
			 										<td>
			 											<div class="member-name">
															${member.memberName}
														</div>
			 										</td>
			 									</tr>
			 									<tr>
			 										<td>
			 											<div class="member-role">
															${member.memberOccupation}
														</div>
			 										</td>
			 									</tr>
			 								</table>
			 								
			 							</td>
			 						</tr>
			 					</table>
			 				</td>
						</tr>
					</c:forEach>
			 	</table>
			 </td>
		   </tr>
		<tr>
			 
		 </tr>
   </table>

	
</body>
</html>

