<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslc="http://xslcomponents.org/TR/WD-xslc">
	<xsl:import href="../../xslc.xsl"/>
	<xsl:import href="../../Common.xsl"/>
	<xsl:template match="/">
		<xsl:apply-templates select="document"/>
	</xsl:template>
	<xsl:template match="document">
		<xsl:call-template name="xslc:Page">
			<xsl:with-param name="BodyAttributes">
				<Attributes style="background:url({$XMLC_Portal}Pictos/backframe.gif) repeat-x top left;"/>
			</xsl:with-param>
			<xsl:with-param name="ToolbarButtonsLeft">
				<ToolbarButton>
					<xsl:call-template name="ToolButtonRefresh">
						<xsl:with-param name="URL">
							<xsl:value-of select="/document/Aliases/bdVODLL"/>FormLogsImport?FormLogsImport_StartingRow=<xsl:value-of select="/document/FormLogsImportS/@StartingRow"/>
							<xsl:if test="/document/OutParams/idRequest!=''">&amp;idRequest=<xsl:value-of select="/document/OutParams/idRequest"/>
							</xsl:if>
							<xsl:if test="/document/OutParams/idtvo!=''">&amp;idtvo=<xsl:value-of select="/document/OutParams/idtvo"/>
							</xsl:if>
						</xsl:with-param>
					</xsl:call-template>
				</ToolbarButton>
				<ToolbarButton>
					<img border="0" src="{$XMLC_SkinPath}toolbar_separator.gif"/>
				</ToolbarButton>
				<xsl:call-template name="CommonToolbarButtonsLeft"/>
			</xsl:with-param>
			<xsl:with-param name="Body">
				<xsl:call-template name="xslc:ApplicationMessages"/>
				<xsl:apply-templates select="FormLogsImportS"/>
				<xsl:call-template name="xslc:PoweredBy"/>
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template match="FormLogsImportS">
		<a href="{/document/Aliases/bdVODLL}OptEquipsExt" target="_blank">
			<img alt="Paramétrage des options issues du 3270" border="0" src="{$XMLC_PictosPath}UpdateK.gif" width="20" height="20"/>
		</a>
		<xsl:if test="/document/OutParams/idtvo!=''"> - Liste des Valeurs Importées associées au véhicule n° <xsl:value-of select="/document/FormLogsImportS/FormLogsImport/NVO"/>
		</xsl:if>
		<xsl:if test="/document/OutParams/idRequest!=''"> - Liste des Valeurs Importées associées à la demande n° <xsl:value-of select="/document/OutParams/idRequest"/> du <xsl:value-of select="/document/Request/DateImport"/>
			<br/>
			<xsl:value-of select="/document/Request/Memo"/>
		</xsl:if>
		<table border="0" cellpadding="2" cellspacing="0" class="clFlatTable" width="100%">
			<tr class="clRowHeader">
				<xsl:if test="/document/XMLC_Profile/XMLC_DisplayHeaderGradient = '1'">
					<xsl:attribute name="style">background-image: url('<xsl:value-of select="$XMLC_SkinPath"/>rowHeader_Gradient.gif');</xsl:attribute>
				</xsl:if>
				<td colspan="2">Import</td>
				<td>
					<xsl:if test="/document/OutParams/idtvo=''">NVO </xsl:if>
				</td>
				<td>Véhicule</td>
				<td>Date</td>
				<td>Champ</td>
				<td>Ancien</td>
				<td>Nouveau</td>
			</tr>
			<xsl:apply-templates select="FormLogsImport"/>
			<xsl:call-template name="xslc:ListFooter">
				<xsl:with-param name="URLParams">
					<xsl:if test="/document/OutParams/idRequest!=''">&amp;idRequest=<xsl:value-of select="/document/OutParams/idRequest"/>
					</xsl:if>
					<xsl:if test="/document/OutParams/idtvo!=''">&amp;idtvo=<xsl:value-of select="/document/OutParams/idtvo"/>
					</xsl:if>
				</xsl:with-param>
				<xsl:with-param name="MaxPages">15</xsl:with-param>
				<xsl:with-param name="colspan">8</xsl:with-param>
			</xsl:call-template>
		</table>
	</xsl:template>
	<xsl:template match="FormLogsImport">
		<xsl:variable name="clValue">
			<xsl:choose>
				<xsl:when test="position() mod 2 = 1">clRowLight</xsl:when>
				<xsl:otherwise>clRowDark</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<tr class="{$clValue}">
			<td align="center">
				<a href="{/document/Aliases/bdVODLL}FormLogsImport?&amp;idRequest={idRequest}">
					<xsl:if test="TypeImport='1'">
						<img border="0" src="{$XMLC_PictosPath}3270.gif" alt="Import des extractions issues du 3270"/>
					</xsl:if>
					<xsl:if test="TypeImport='2'">
						<img border="0" src="{$XMLC_PictosPath}euro.gif" alt="Import des commissions des financements"/>
					</xsl:if>
					<xsl:if test="TypeImport='3'">
						<img border="0" src="{$XMLC_PictosPath}cashier.gif" alt="Import des dates de règlements"/>
					</xsl:if>
					<xsl:if test="TypeImport='4'">
						<img border="0" src="{$XMLC_PictosPath}button_Trace.gif" alt="Import des situations d'achat"/>
					</xsl:if>
					<xsl:if test="TypeImport='100'">
						<img border="0" src="{$XMLC_PictosPath}ico_pdf.gif" alt="Import DocFeed"/>
					</xsl:if>
					<xsl:if test="TypeImport='20'">
						<img border="0" src="{$XMLC_PictosPath}stampyt.gif" alt="Import Photos"/>
					</xsl:if>
					<xsl:if test="TypeImport='21'">
						<img border="0" src="{$XMLC_PictosPath}stampyt.gif" alt="Import Photos Digitall"/>
					</xsl:if>
				</a>
			</td>
			<td>
				<xsl:if test="/document/OutParams/idRequest=''">
					<a href="{/document/Aliases/bdVODLL}FormLogsImport?&amp;idRequest={idRequest}">
						<xsl:value-of select="idRequest"/>
					</a>
				</xsl:if>
			</td>
			<td>
				<xsl:if test="/document/OutParams/idtvo=''">
					<a href="{/document/Aliases/bdVODLL}FormLogsImport?idtvo={idtvo}">
						<xsl:choose>
							<xsl:when test="(TypeVO = '1')">VO </xsl:when>
							<xsl:otherwise>VN </xsl:otherwise>
						</xsl:choose>
						<xsl:value-of select="NVO"/>
					</a>
				</xsl:if>
			</td>
			<td>
				<a href="{/document/Aliases/bdVODLL}FormLogsImport?idtvo={idtvo}">
					<xsl:value-of select="InfoMarque"/> - <xsl:value-of select="InfoVersion"/>
				</a>
			</td>
			<td>
				<xsl:value-of select="DateImport"/>
			</td>
			<td>
				<xsl:value-of select="sField"/>
			</td>
			<td>
				<xsl:value-of select="OldValue"/>
			</td>
			<td>
				<xsl:value-of select="NewValue"/>
			</td>
		</tr>
	</xsl:template>
</xsl:stylesheet>
