<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	exclude-result-prefixes="xsl xhtml xalan"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:xhtml="http://www.w3.org/1999/xhtml"
	xmlns:xalan="http://xml.apache.org/xalan">

	<xsl:output method="xml" indent="yes"
		doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
		doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
		media-type="text/html" encoding="UTF-8"
		omit-xml-declaration="yes" xml:lang="fr" xml:space="preserve" />

	<!-- FICHIERS INCLUDE UTILISEES   -->
	<xsl:include href="composants/commun/commun.xsl" />
	<xsl:include href="composants/commun/xhtml.xsl" />
	<xsl:include href="composants/commun/infoBlock.cdmfr.xsl" />
	<xsl:include href="composants/habilitation.cdmfr.xsl" />
	<xsl:include href="composants/program.cdmfr.xsl" />
	<xsl:include href="composants/person.cdmfr.xsl" />
	<xsl:include href="composants/course.cdmfr.xsl" />
	<xsl:include href="composants/orgUnit.cdmfr.xsl" />
	<xsl:include href="composants/properties.cdmfr.xsl" />
	<xsl:include href="onglets/programme.xsl" />
	<xsl:include href="onglets/admission.xsl" />
	<xsl:include href="onglets/description.xsl" />
	<xsl:include href="onglets/environnement.xsl" />
	<xsl:include href="onglets/etablissement.xsl" />
	<xsl:include href="onglets/habilitation.xsl" />
	<xsl:include href="onglets/insertion.xsl" />
	<xsl:include href="onglets/international.xsl" />
	
	<xsl:variable name="listeIdentifiants"></xsl:variable>
	
	<xsl:template match="/">
		<xsl:call-template name="html" />
	</xsl:template>

	<xsl:template name="user-titreFenetre">
		<!-- Catalogue des formations de l'AMUE -->
		<xsl:value-of select="$variablesExt/variables/pageTitle/header[@type='0']/value[@lang=$_lang]"/>
	</xsl:template>
	<xsl:template name="user-navigation">
		<div id="navigation">
			<a name='hautPage'></a>
			<ul>
				<li><a href="{$absActionURL}/{$_lang}/accueil"><xsl:value-of select="$variablesExt/variables/navigationVar/link[@type='20']/navigationItem/value[@lang=$_lang]"/></a></li>
				<li><a href="{$absActionURL}/{$_lang}/liste"><xsl:value-of select="$variablesExt/variables/navigationVar/link[@type='21']/navigationItem/value[@lang=$_lang]"/></a></li>
				<li>
					<a href="{$absActionURL}/{$_lang}/recherche"><xsl:value-of select="$variablesExt/variables/navigationVar/link[@type='22']/navigationItem/value[@lang=$_lang]"/></a>
				</li>
			</ul>
		</div>
	</xsl:template>
	<xsl:template name="user-titre">
		<xsl:call-template name="tCommunDoc"><xsl:with-param name="idDoc" select="'programName'"/></xsl:call-template>
		<xsl:value-of select="key('objet', $idP)/programName/text[@language=$_lang or not(@language)] | key('objet',$idP)/courseName"/>
	</xsl:template>
	<!-- LAG : Affichage du Fil d'Ariance complet -->
	<xsl:template name="user-ariane"><xsl:call-template name="ariane2"/></xsl:template>

	<!-- Acces au PDF -->
	<xsl:template name="affichage-pdf">
		<a href="{$absActionURL}/{$_lang}/pdf/{$_oid}/{$_oidSpecialite}" target="_blank"><img src="{$baseMediaURL}/images/imprim.gif" alt="Lien vers PDF" /></a>
	</xsl:template>
	
	<xsl:template name="user-col_gauche">
	
		<!-- PDF -->
		<xsl:call-template name="affichage-pdf"/>
	
		<div id="onglets">
			<ul>
				<li><xsl:if test="$_onglet='description' or $_onglet=''"><xsl:attribute name="class">tabbed</xsl:attribute></xsl:if>
					<a href="{$absActionURL}/{$_lang}/fiche/description/{$_oid}/{$_oidSpecialite}">
					<xsl:value-of select="$variablesExt/variables/libelleVar/libellePart[@type='libPresentation']/value[@lang=$_lang]"/></a></li>
				<!-- MODIFICATION ROT
				<li><xsl:if test="$_onglet='admission'"><xsl:attribute name="class">tabbed</xsl:attribute></xsl:if><a href="{$absActionURL}/{$_lang}/fiche/admission/{$_oid}">Admission</a></li>
				-->
				<li><xsl:if test="$_onglet='admission'"><xsl:attribute name="class">tabbed</xsl:attribute></xsl:if>
					<a href="{$absActionURL}/{$_lang}/fiche/admission/{$_oid}/{$_oidSpecialite}">
					<xsl:value-of select="$variablesExt/variables/libelleVar/libellePart[@type='libAdmission']/value[@lang=$_lang]"/></a></li>
				<li><xsl:if test="$_onglet='programme'"><xsl:attribute name="class">tabbed</xsl:attribute></xsl:if>
				<a href="{$absActionURL}/{$_lang}/fiche/programme/{$_oid}/{$_oidSpecialite}/{$_oidUe}">
				<xsl:value-of select="$variablesExt/variables/libelleVar/libellePart[@type='libProgramme']/value[@lang=$_lang]"/></a></li>
				<!-- on teste si on est bien sur la mention, car ces onglets ne doivent pas être affichés pour les programmes/sous programmes et cours -->
				<xsl:if test="$vBoolEstUneMention='true'">
					<li><xsl:if test="$_onglet='environnement'"><xsl:attribute name="class">tabbed</xsl:attribute></xsl:if>
						<a href="{$absActionURL}/{$_lang}/fiche/environnement/{$_oid}/{$_oidSpecialite}/{$_oidUe}">
						<xsl:value-of select="$variablesExt/variables/libelleVar/libellePart[@type='libEnvironnement']/value[@lang=$_lang]"/></a></li>	
					<li><xsl:if test="$_onglet='international'"><xsl:attribute name="class">tabbed</xsl:attribute></xsl:if>
						<a href="{$absActionURL}/{$_lang}/fiche/international/{$_oid}/{$_oidSpecialite}/{$_oidUe}">
						<xsl:value-of select="$variablesExt/variables/libelleVar/libellePart[@type='libEtudeEtranger']/value[@lang=$_lang]"/></a></li>
					<li><xsl:if test="$_onglet='insertion'"><xsl:attribute name="class">tabbed</xsl:attribute></xsl:if>
						<a href="{$absActionURL}/{$_lang}/fiche/insertion/{$_oid}/{$_oidSpecialite}/{$_oidUe}">
						<xsl:value-of select="$variablesExt/variables/libelleVar/libellePart[@type='libPoursuiteEtudes']/value[@lang=$_lang]"/></a></li>
					<li><xsl:if test="$_onglet='habilitation'"><xsl:attribute name="class">tabbed</xsl:attribute></xsl:if>
						<a href="{$absActionURL}/{$_lang}/fiche/habilitation/{$_oid}/{$_oidSpecialite}/{$_oidUe}">
						<xsl:value-of select="$variablesExt/variables/libelleVar/libellePart[@type='libHabilitation']/value[@lang=$_lang]"/></a></li>
					<!-- li><xsl:if test="$_onglet='etablissement'"><xsl:attribute name="class">tabbed</xsl:attribute></xsl:if>
						<a href="{$absActionURL}/{$_lang}/fiche/etablissement/{$_oid}/{$_oidSpecialite}/{$_oidUe}">
						<xsl:value-of select="$variablesExt/variables/libelleVar/libellePart[@type='libEtablissement']/value[@lang=$_lang]"/></a></li-->
				</xsl:if>
				<xsl:if test="$vBoolEstUneSpecialite='true'">
					<li><xsl:if test="$_onglet='international'"><xsl:attribute name="class">tabbed</xsl:attribute></xsl:if>
						<a href="{$absActionURL}/{$_lang}/fiche/international/{$_oid}/{$_oidSpecialite}/{$_oidUe}">
						<xsl:value-of select="$variablesExt/variables/libelleVar/libellePart[@type='libEtudeEtranger']/value[@lang=$_lang]"/></a></li>
				</xsl:if>
			</ul>
			<br/>
		</div>
		<div id="content">
			<div id="domaine"> 
				<ul>
					<!-- utilisation des anciens libelles / A VOIR SI ON GARDE -->
					<li>
						<span>
							<xsl:value-of select="$variablesExt/variables/libelleVar/libellePart[@type='libTypeDiplome']/value[@lang=$_lang]"/>
							<xsl:call-template name="tProgramQualificationDegreeWithText"/>
							<!--xsl:call-template name="tProgramQualificationDegreeInfoBlockType"/-->
						</span>
					</li>
					<li><xsl:call-template name="tCommunDoc"><xsl:with-param name="idDoc" select="'habilitation/field/@primaryDomainname'"/></xsl:call-template>
						<span>
							<xsl:value-of select="$variablesExt/variables/libelleVar/libellePart[@type='libDomainePrincipal']/value[@lang=$_lang]"/>
							<xsl:call-template name="tHabilitationFieldFieldPrimaryDomainName"/>
						</span>
					</li>
					<!-- 
					<li>_oid : <span><xsl:value-of select="$_oid"/></span></li>
					<li>_oidSpecialite : <span><xsl:value-of select="$_oidSpecialite"/></span></li>
					<li>idP : <span><xsl:value-of select="$idP"/></span></li>
					<li>_lang : <span><xsl:value-of select="$_lang"/></span></li>
					<li>nb elements fils description : <span><xsl:value-of select="count(key('objet',$idP)/programDescription/*[@blockLang=$_lang or not(@blockLang)])"/></span></li>
					-->
				</ul>
			</div>
			<xsl:choose>
				<xsl:when test="$_onglet='programme'">
					<xsl:call-template name="user-programme"/>
				</xsl:when>
				<xsl:when test="$_onglet='admission'">
					<xsl:call-template name="user-admission"/>
				</xsl:when>
				<xsl:when test="$_onglet='environnement'">
					<xsl:call-template name="user-environnement"/>
				</xsl:when>
				<xsl:when test="$_onglet='international'">
					<xsl:call-template name="user-international"/>
				</xsl:when>
				<xsl:when test="$_onglet='insertion'">
					<xsl:call-template name="user-insertion"/>
				</xsl:when>
				<xsl:when test="$_onglet='habilitation'">
					<xsl:call-template name="user-habilitation"/>
				</xsl:when>
				<xsl:when test="$_onglet='etablissement'">
					<xsl:call-template name="user-etablissement"/>
				</xsl:when>
				<xsl:otherwise><!-- description -->
					<xsl:call-template name="user-description"/>
				</xsl:otherwise>
			</xsl:choose>
			<xsl:if test="$vBoolEstUneMention='true'">
			<!-- Date de la dernière modification de la fiche basee sur la balise properties
				 A retoucher plus tard -->
				<p><xsl:call-template name="tCommunGestionLibelle"><xsl:with-param name="pIdent" select="'libDerniereModification'"/><xsl:with-param name="idDoc" select="'datetime'"/></xsl:call-template>
				<xsl:call-template name="tPropertiesDateTimeTransformDate"/><text> (</text><xsl:call-template name="tPropertiesDateTimeTransformTime"/>)</p>
			</xsl:if>
		</div>
	</xsl:template>

	<!-- TEMPLATES A NE PAS SORTIR CAR PROPRE A LA PAGE -->
	<xsl:template name="user-col_droite">
		<xsl:call-template name="tContactsRefPerson2"/>
		<h3><xsl:call-template name="tCommunGestionLibelle"><xsl:with-param name="pIdent" select="'libEnSavoirPlus'"/></xsl:call-template></h3>
		<xsl:call-template name="tProgramWebLink"/>
	</xsl:template>

	<!-- A personnaliser -->
	<xsl:template match="refPerson">
		<xsl:if test="@ref and key('objet',@ref)">
			<h3><xsl:call-template name="tContactsRefPersonNameRole"><xsl:with-param name="pRef" select="@ref"/></xsl:call-template></h3>
			<p><xsl:call-template name="tContactsRefPersonGivenName"><xsl:with-param name="pRef" select="@ref"/></xsl:call-template><xsl:text>  </xsl:text><xsl:call-template name="tContactsRefPersonNameFamily"><xsl:with-param name="pRef" select="@ref"/></xsl:call-template></p>
			<p>Tel : <xsl:call-template name="tContactsRefPersonNameContactDataTelephone"><xsl:with-param name="pRef" select="@ref"/></xsl:call-template></p>
			<p><xsl:call-template name="tContactsRefPersonNameContactDataEmail"><xsl:with-param name="pRef" select="@ref"/></xsl:call-template></p>
			<hr/>
		</xsl:if>
	</xsl:template>

	<xsl:template match="refProgram">
		<li>
			<a href="{$absActionURL}/{$_lang}/fiche/description/{$_oid}/{key('noeudId',@ref)/@nid}">
				<xsl:call-template name="tProgramRefProgramProgramNameText"><xsl:with-param name="pRef" select="@ref"/></xsl:call-template>
			</a>
		</li>
	</xsl:template>


	<!-- TEMPLATES A NE PAS SORTIR CAR PROPRE A LA PAGE -->
	
</xsl:stylesheet>