<?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">Edit tVOSites</xsl:with-param>
			<xsl:with-param name="PageTitle">
				<img align="absmiddle" src="{$XMLC_PictosPath}ico_service.gif"/> Edit tVOSites</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"/>ReportListtVOSites?XMLC_OutputFormat=HTML</xsl:with-param>
						<xsl:with-param name="Target">_blank</xsl:with-param>
					</xsl:call-template>
				</ToolbarButton>
				<ToolbarButton>
					<xsl:call-template name="xslc:ToolbarButton">
						<xsl:with-param name="Caption">
							<img border="0" src="{$XMLC_PictosPath}button_pdf.gif" alt="Generate PDF report"/>
						</xsl:with-param>
						<xsl:with-param name="HRef">
							<xsl:value-of select="/document/Aliases/bdVODLL"/>ReportListtVOSites</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">DataGridtVOSitesMenu</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">tVOSites</xsl:with-param>
					<xsl:with-param name="Dark">1</xsl:with-param>
					<xsl:with-param name="Items">
						<Item HRef="{/document/Aliases/bdVODLL}DataGridtVOSites?" ImagePath="{$XMLC_PictosPath}button_service.gif" Caption="Edit tVOSites"/>
						<Item Separator="1" Dark="1"/>
						<Item Separator="1" Dark="1"/>
						<Item HRef="." ImagePath="{$XMLC_PictosPath}button_save.gif" OnClick="SubmitForm('FormUpdatetVOSites'); return false;" Caption="Save"/>
					</xsl:with-param>
				</xsl:call-template>
			</xsl:with-param>
			<xsl:with-param name="ActivePageName">DataGridtVOSites</xsl:with-param>
			<xsl:with-param name="Tabs">
				<Tab Name="DataGridtVOSites">
					<a href="{/document/Aliases/bdVODLL}DataGridtVOSites?">
						<img align="absmiddle" border="0" src="{$XMLC_PictosPath}ico_service.gif"/> Edit tVOSites</a>
				</Tab>
			</xsl:with-param>
			<xsl:with-param name="Body">
				<xsl:call-template name="xslc:ApplicationMessages"/>
				<xsl:apply-templates select="tVOSitesS"/>
				<xsl:call-template name="xslc:PoweredBy"/>
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template match="tVOSitesS">
		<table border="0" cellpadding="2" cellspacing="0" class="clFlatTable" width="100%">
			<form name="FormDeletetVOSites" method="POST" action="{/document/Aliases/bdVODLL}DeletetVOSites">
				<input type="hidden" name="tVOSites_STARTINGROW" value="{@StartingRow}"/>
				<input type="hidden" name="NextAction" value="DataGridtVOSites"/>
				<input type="hidden" name="idSite"/>
			</form>
			<form name="FormUpdatetVOSites" method="POST" action="{/document/Aliases/bdVODLL}UpdatetVOSites">
				<input type="hidden" name="XMLC_Pivot" value="tVOSites"/>
				<input type="hidden" name="tVOSites_STARTINGROW" value="{@StartingRow}"/>
				<input type="hidden" name="NextAction" value="DataGridtVOSites"/>
				<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 style="width: 12px;">
						<input type="image" border="0" src="{$XMLC_PictosPath}ico_Check.gif" alt="Save"/>
					</td>
					<td width="100%">Ville</td>
					<td width="100%">LibelleVille</td>
					<td width="100%">Adresse</td>
					<td width="100%">CodePostal</td>
					<td width="100%">Contact</td>
					<td width="100%">Telephone</td>
					<td width="100%">email</td>
					<td width="100%">ID</td>
					<td style="width: 12px;">
						<img src="{$XMLC_SkinPath}Pixel.gif" width="12" height="1"/>
					</td>
				</tr>
				<xsl:apply-templates select="tVOSites"/>
			</form>
			<form name="FormInserttVOSites" method="POST" action="{/document/Aliases/bdVODLL}InserttVOSites">
				<input type="hidden" name="tVOSites_STARTINGROW" value="{@StartingRow}"/>
				<input type="hidden" name="NextAction" value="DataGridtVOSites"/>
				<tr class="clDataGridLight">
					<td class="clRowHeader">
						<a href="." onclick="document.FormInserttVOSites.submit(); return false;">
							<img border="0" src="{$XMLC_PictosPath}ico_xplus.gif" alt="Insert this new record"/>
						</a>
					</td>
					<td>
						<input type="text" name="Ville"/>
					</td>
					<td>
						<input type="text" name="LibelleVille"/>
					</td>
					<td>
						<input type="text" name="Adresse"/>
					</td>
					<td>
						<input type="text" name="CodePostal"/>
					</td>
					<td>
						<input type="text" name="Contact"/>
					</td>
					<td>
						<input type="text" name="Telephone"/>
					</td>
					<td>
						<input type="text" name="email"/>
					</td>
					<td>
						<input type="text" name="ID"/>
					</td>
					<td class="clRowHeader">
						<a href="." onclick="document.FormInserttVOSites.submit(); return false;">
							<img border="0" src="{$XMLC_PictosPath}ico_xplus.gif" alt="Insert this new record"/>
						</a>
					</td>
				</tr>
			</form>
			<xsl:call-template name="xslc:ListFooter">
				<xsl:with-param name="colspan">10</xsl:with-param>
			</xsl:call-template>
		</table>
	</xsl:template>
	<xsl:template match="tVOSites">
		<xsl:variable name="clValue">
			<xsl:choose>
				<xsl:when test="(position() mod 2)=0">clDataGridDark</xsl:when>
				<xsl:otherwise>clDataGridLight</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<tr class="{$clValue}">
			<input type="hidden" name="tVOSites[{position()}].idSite" value="{idSite}"/>
			<td class="clRowHeader">
				<a href="." onclick="document.FormDeletetVOSites.idSite.value='{idSite}'; document.FormDeletetVOSites.submit(); return false;">
					<img border="0" src="{$XMLC_PictosPath}ico_xminus.gif" alt="Delete this record"/>
				</a>
			</td>
			<td>
				<input type="text" name="tVOSites[{position()}].Ville" value="{Ville}"/>
			</td>
			<td>
				<input type="text" name="tVOSites[{position()}].LibelleVille" value="{LibelleVille}"/>
			</td>
			<td>
				<input type="text" name="tVOSites[{position()}].Adresse" value="{Adresse}"/>
			</td>
			<td>
				<input type="text" name="tVOSites[{position()}].CodePostal" value="{CodePostal}"/>
			</td>
			<td>
				<input type="text" name="tVOSites[{position()}].Contact" value="{Contact}"/>
			</td>
			<td>
				<input type="text" name="tVOSites[{position()}].Telephone" value="{Telephone}"/>
			</td>
			<td>
				<input type="text" name="tVOSites[{position()}].email" value="{email}"/>
			</td>
			<td>
				<input type="text" name="tVOSites[{position()}].ID" value="{ID}"/>
			</td>
			<td class="clRowHeader">
				<a href="{/document/Aliases/bdVODLL}FormtVOSites?&amp;idSite={idSite}">
					<img border="0" src="{$XMLC_PictosPath}ico_run.gif" style="cursor: hand;" alt="Go to tVOSites"/>
				</a>
			</td>
		</tr>
	</xsl:template>
</xsl:stylesheet>
