﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">


	<xsl:output method="xml" indent="yes"/>

	<xsl:template name="TournamentPlayerList">

		<table style="width:300px;">
			<tr>
				<td>
					<xsl:choose>
						<xsl:when test="count(AjaxRequest/Tournament/TournamentPlayer) = 0">
							<div class="labelDarkGrayMedium marginBottom10 paddingTop5">
								There are no single Players in this Tournament.
							</div>							
						</xsl:when>
						<xsl:otherwise>
							<xsl:for-each select="AjaxRequest/Tournament/TournamentPlayer">

								<xsl:variable name="Image" select ="UserImage"> </xsl:variable>
								<xsl:variable name="ID" select ="UserID"> </xsl:variable>

								<div selection="no" userid="{$ID}" id="divPlayerDetail_{$ID}" name="TournamentPlayerHighlight" style="width:290px;height:60px;"
										class="onMouseOver" onClick="SelectPlayers('divPlayerDetail_{$ID}');">
									<table>
										<tr>
											<td width="15%;">
												<div >
													<img class="verticallyMiddle" src="{$Image}" onload="setWidthAndHeightImage(this, 50);"></img>
												</div>
											</td>
											<td width="70%;">
												<div>
													<span class="labelGoalTitle">
														<xsl:value-of select="UserName"/>
													</span>
													<br/>
													<span class="templateMemoText">
														<xsl:value-of select="Email"/>
													</span>
												</div>
											</td>
										</tr>
									</table>
								</div>
							</xsl:for-each>
						</xsl:otherwise>
					</xsl:choose>
					
				</td>
			</tr>
		</table>
	</xsl:template>

</xsl:stylesheet>
