Modification génération menu liée à un profil

This commit is contained in:
Michael RICOIS 2010-01-29 11:07:24 +00:00
parent e838aa64c6
commit cf499843ea

View File

@ -29,7 +29,7 @@ $children[] = array('data' => 'Fiche d\'identité',
'href' => 'menu_href_identite');
$children[] = array('data' => 'Fiche AGS',
'href' => 'menu_href_identite_profil',
'profil' => array('name'=>'identite','hidden'=>true, 'idClient'=>60));
'profil' => array('name'=>'identite','hidden'=>true));
$children[] = array('data' => 'Liste des établissements',
'href' => 'menu_href_etablissement' );
$children[] = array('data' => 'Liens inter-entreprise',
@ -212,20 +212,18 @@ function menu_children($children)
{
if( ( !isset($children['profil']['hidden']) ||
$children['profil']['hidden']===false ) &&
hasProfil($children['profil']['name'])!==false &&
$_SESSION['tabInfo']['idClient']!=$children['profil']['idClient'])
hasProfil($children['profil']['name'])===false )
{
$href = '#';
}
elseif( isset($children['profil']['hidden']) &&
$children['profil']['hidden']===true &&
hasProfil($children['profil']['name'])!==false &&
$_SESSION['tabInfo']['idClient']!=$children['profil']['idClient'])
$children['profil']['hidden'] &&
hasProfil($children['profil']['name'])===false )
{
$href = false;
}
}
//Output
$html = '';
if($href!==false)
@ -310,12 +308,8 @@ function menu_href_identite()
function menu_href_identite_profil()
{
global $siret, $idEntreprise;
if ($siret*1==0 && $idEntreprise*1==0){
return '#';
} else{
return './?page=identite&profil=1&siret='.$siret.'&idEntreprise='.$idEntreprise;
}
global $siret, $idEntreprise;
return './?page=identite&profil=1&siret='.$siret.'&idEntreprise='.$idEntreprise;
}