﻿<?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="Title">List LogsRequest</xsl:with-param>
			<xsl:with-param name="PageTitle">
				<img align="absmiddle" src="{$XMLC_PictosPath}ico_service.gif"/> List LogsRequest</xsl:with-param>
			<xsl:with-param name="ToolbarButtonsLeft">
				<ToolbarButton>
					<xsl:call-template name="ToolButtonRefresh"/>
				</ToolbarButton>
				<ToolbarButton>
					<img border="0" src="{$XMLC_SkinPath}toolbar_separator.gif"/>
				</ToolbarButton>
				<xsl:call-template name="CommonToolbarButtonsLeft"/>
				<ToolbarButton>
					<xsl:call-template name="xslc:ToolbarButton">
						<xsl:with-param name="Caption">
							<img border="0" src="{$XMLC_PictosPath}button_print.gif" alt="Print Report"/>
						</xsl:with-param>
						<xsl:with-param name="HRef">
							<xsl:value-of select="/document/Aliases/bdVODLL"/>ReportListLogsRequest?XMLC_OutputFormat=HTML</xsl:with-param>
						<xsl:with-param name="Target">_blank</xsl:with-param>
					</xsl:call-template>
				</ToolbarButton>
			</xsl:with-param>
			<xsl:with-param name="ToolbarButtonsRight">
				<xsl:call-template name="CommonToolbarButtonsRight"/>
			</xsl:with-param>
			<xsl:with-param name="ActionMenu">
				<xsl:call-template name="xslc:ActionPanel">
					<xsl:with-param name="Name">LogsRequestMenu</xsl:with-param>
					<xsl:with-param name="TitleImage">
						<xsl:value-of select="$XMLC_PictosPath"/>button_service.gif</xsl:with-param>
					<xsl:with-param name="Title">LogsRequest</xsl:with-param>
					<xsl:with-param name="Dark">1</xsl:with-param>
					<xsl:with-param name="Items">
						<Item HRef="LogsRequest?" ImagePath="{$XMLC_PictosPath}button_service.gif" Caption="List LogsRequest"/>
						<Item Separator="1" Dark="1"/>
						<Item HRef="{/document/Aliases/bdVODLL}FormCreateLogsRequest" ImagePath="{$XMLC_PictosPath}button_newservice.gif" Caption="New LogsRequest"/>
					</xsl:with-param>
				</xsl:call-template>
			</xsl:with-param>
			<xsl:with-param name="ActivePageName">LogsRequest</xsl:with-param>
			<xsl:with-param name="Tabs">
				<Tab Name="LogsRequest">
					<a href="{/document/Aliases/bdVODLL}LogsRequest?">
						<img align="absmiddle" border="0" src="{$XMLC_PictosPath}ico_service.gif"/> List LogsRequest</a>
				</Tab>
			</xsl:with-param>
			<xsl:with-param name="Body">
				<xsl:call-template name="xslc:ApplicationMessages"/>
				<xsl:apply-templates select="LogsRequestS"/>
				<xsl:call-template name="xslc:PoweredBy"/>
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template match="LogsRequestS">
		<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>TypeImport <a href="{/document/Aliases/bdVODLL}FormCreateLogsRequest">
						<img border="0" src="{$XMLC_PictosPath}ico_xplus.gif" alt="Add a new record"/>
					</a>
				</td>
				<td>idRequest</td>
				<td>DateImport</td>
				<td>Site</td>
				<td>Memo</td>
				<td>CptEnreg</td>
				<td>CptValeur</td>
				<td>CptNonTrouve</td>
			</tr>
			<xsl:apply-templates select="LogsRequest"/>
			<xsl:call-template name="xslc:ListFooter">
				<xsl:with-param name="colspan">8</xsl:with-param>
			</xsl:call-template>
		</table>
	</xsl:template>
	<xsl:template match="LogsRequest">
		<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>
		<xsl:choose>
			<xsl:when test="FileResult=''">
				<tr class="{$clValue}">
					<td>
						<a href="{/document/Aliases/bdVODLL}FormLogsImport?&amp;idRequest={idRequest}">
							<xsl:value-of select="TypeImport"/>
						</a>
					</td>
					<td>
						<a href="{/document/Aliases/bdVODLL}FormLogsImport?&amp;idRequest={idRequest}">
							<xsl:value-of select="idRequest"/>
						</a>
					</td>
					<td>
						<a href="{/document/Aliases/bdVODLL}FormLogsImport?&amp;idRequest={idRequest}">
							<xsl:value-of select="DateImport"/>
						</a>
					</td>
					<td>
						<a href="{/document/Aliases/bdVODLL}FormLogsImport?&amp;idRequest={idRequest}">
							<xsl:value-of select="Site"/>
						</a>
					</td>
					<td>
						<a href="{/document/Aliases/bdVODLL}FormLogsImport?&amp;idRequest={idRequest}">
							<xsl:value-of select="Memo"/>
						</a>
					</td>
					<td>
						<a href="{/document/Aliases/bdVODLL}FormLogsImport?&amp;idRequest={idRequest}">
							<xsl:value-of select="CptEnreg"/>
						</a>
					</td>
					<td>
						<a href="{/document/Aliases/bdVODLL}FormLogsImport?&amp;idRequest={idRequest}">
							<xsl:value-of select="CptValeur"/>
						</a>
					</td>
					<td>
						<a href="{/document/Aliases/bdVODLL}FormLogsImport?&amp;idRequest={idRequest}">
							<xsl:value-of select="CptNonTrouve"/>
						</a>
					</td>
				</tr>
			</xsl:when>
			<xsl:otherwise>
				<tr class="{$clValue}">
					<td>
						<a href="/SharedPortal/IMP/{FileResult}">
							<xsl:value-of select="TypeImport"/>
						</a>
					</td>
					<td>
						<a href="/SharedPortal/IMP/{FileResult}">
							<xsl:value-of select="idRequest"/>
						</a>
					</td>
					<td>
						<a href="/SharedPortal/IMP/{FileResult}">
							<xsl:value-of select="DateImport"/>
						</a>
					</td>
					<td>
						<a href="/SharedPortal/IMP/{FileResult}">
							<xsl:value-of select="Site"/>
						</a>
					</td>
					<td>
						<a href="/SharedPortal/IMP/{FileResult}">
							<xsl:value-of select="Memo"/>
						</a>
					</td>
					<td>
						<a href="/SharedPortal/IMP/{FileResult}">
							<xsl:value-of select="CptEnreg"/>
						</a>
					</td>
					<td>
						<a href="/SharedPortal/IMP/{FileResult}">
							<xsl:value-of select="CptValeur"/>
						</a>
					</td>
					<td>
						<a href="/SharedPortal/IMP/{FileResult}">
							<xsl:value-of select="CptNonTrouve"/>
						</a>
					</td>
				</tr>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
</xsl:stylesheet>
