<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:dyn="http://exslt.org/dynamic" extension-element-prefixes="dyn">
	<xsl:output method="html" indent="no" doctype-system="" encoding="utf-8" />

	<xsl:include href="/app/tools/bookpub/templates/global.xsl" /> 

	<xsl:template name="pickLayout">
		<xsl:call-template name="localeLayout" />
	</xsl:template>


	<xsl:template name="localeLayout">
		<table class="User-view">
			<tr>
				<td class="View-label">Country</td>
				<td class="View-value"><xsl:value-of select="Client/Locale/Country" /></td>
			</tr>
			<tr>
				<td class="View-label">Language</td>
				<td class="View-value"><xsl:value-of select="Client/Locale/Language" /></td>
			</tr>
			<tr>
				<td class="View-label">Currency</td>
				<td class="View-value"><xsl:value-of select="Client/Locale/CurrencyFormat/Symbol" /> - <xsl:value-of select="Client/Locale/CurrencyFormat/CurrencyCode" /> - <xsl:value-of select="Client/Locale/CurrencyFormat/Description" /></td>
			</tr>
			<xsl:if test="Client/Locale/SecondaryMarketCurrencyFormat">
				<tr>
					<td class="View-label">Secondary Market Currency</td>
					<td class="View-value"><xsl:value-of select="Client/Locale/SecondaryMarketCurrencyFormat/Symbol" /> - <xsl:value-of select="Client/Locale/SecondaryMarketCurrencyFormat/CurrencyCode" /> - <xsl:value-of select="Client/Locale/SecondaryMarketCurrencyFormat/Description" /></td>
				</tr> 
			</xsl:if>
			<tr>
				<td class="View-label">Numeric Format</td>
				<td class="View-value">123<xsl:value-of select="Client/Locale/NumericFormat/Thousands" />456<xsl:value-of select="Client/Locale/NumericFormat/Thousands" />789<xsl:value-of select="Client/Locale/NumericFormat/Decimal" />00</td>
			</tr>
			<tr>
				<td class="View-label">Date Format</td>
				<td class="View-value"><xsl:value-of select="Client/Locale/DateTimeFormat/DateFormat" /></td>
			</tr> 
			<tr>
				<td class="View-label">Alternate Currency Conversion</td>
				<td class="View-value">
					<xsl:choose>
						<!-- Alternate Currency Conversion = bit 11 of RSCOMMON.client_type (2048 = 2^11) -->
						<xsl:when test="floor( Client/TypeMask div 2048 ) mod 2 = 1">Enabled</xsl:when>
						<xsl:otherwise>Disabled</xsl:otherwise>
					</xsl:choose>
				</td>
			</tr> 
            <xsl:if test="/Root/User/AccessLevel = 1">
                <tr>
                    <td class="View-label"><a href="/support/client?c=client_detail&amp;ClientID={/Root/Client/ClientID}">More Details</a></td>
                    <td class="View-value"></td>
                </tr>
            </xsl:if>
		</table>
		<xsl:call-template name="buttons" />
	</xsl:template>

	<xsl:template name="submitButton">
	</xsl:template>

	<xsl:template name="cancelButton">
		<xsl:call-template name="uiButton">
			<xsl:with-param name="content" select="'Back to Admin'" />
			<xsl:with-param name="type" select="'default'" />
			<xsl:with-param name="className" select="'Form-button'" />
			<xsl:with-param name="onClick">location.href='/bookpub/admin'</xsl:with-param>
		</xsl:call-template>
	</xsl:template>

</xsl:stylesheet>
