parent
d11638fcc9
commit
d95940b3d1
@ -1,14 +1,14 @@
|
||||
<nav id="navigationprint" class="navbar main-nav fixed-top navbar-expand-lg navbar-light bg-light" role="navigation">
|
||||
<a class="navbar-brand" href="/">
|
||||
<a class="navbar-brand" href="/">
|
||||
<img class="img-responsive" style="max-width: 25%;" src="data/image/communities/139_logo.png" alt="logo"/>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#topmenu" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="collapse navbar-collapse" id="topmenu">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<mx:text id="Navigation"/>
|
||||
<mx:text id="Navigation"/><mx:text id="nodeDir"/>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="nav-item"><a class="nav-link envelope" href="mailto:contact@fab-l3.org" target="_blank"><i class="fa fa-lg fa-envelope"></i></a></li>
|
||||
|
@ -1,9 +1,6 @@
|
||||
<mx:bloc id="bloc1">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" mXattribut="href:nodeUrl">
|
||||
<mx:image id="pictoNode"/>
|
||||
<mx:text id="nodeName"/>
|
||||
</a>
|
||||
<a class="nav-link dropdown-toggle" role="button" data-toggle="dropdown" mXattribut="href:nodeUrl" aria-haspopup="true" aria-expanded="false"><mx:image id="pictoNode"/><mx:text id="nodeName"/></a>
|
||||
<mx:text id="nodeDir"/>
|
||||
</li>
|
||||
</mx:bloc id="bloc1">
|
||||
|
@ -1,9 +1,14 @@
|
||||
<mx:bloc id="bloc1">
|
||||
<li mxAttribut="class:class">
|
||||
<a class="nav-link" mXattribut="href:nodeUrl">
|
||||
<mx:image id="pictoNode"/>
|
||||
<mx:text id="nodeName"/>1
|
||||
</a>
|
||||
<mx:text id="nodeDir"/>
|
||||
<li mXattribut="class:class">
|
||||
<mx:bloc id="blocDropdown">
|
||||
<a class="nav-link dropdown-toggle" role="button" data-toggle="dropdown" href="#" aria-haspopup="true" aria-expanded="false"><mx:image id="pictoNode"/><mx:text id="nodeName"/></a>
|
||||
|
||||
<mx:bloc id="nodeDir">
|
||||
<mx:text id="nodeDir"/>
|
||||
</mx:bloc id="nodeDir">
|
||||
</mx:bloc id="blocDropdown">
|
||||
<mx:bloc id="blocNoDropdown">
|
||||
<a class="nav-link" mXattribut="href:nodeUrl"><mx:image id="pictoNode"/><mx:text id="nodeName"/><span class="sr-only">(current)</span></a>
|
||||
</mx:bloc id="blocNoDropdown">
|
||||
</li>
|
||||
</mx:bloc id="bloc1">
|
||||
|
@ -1,11 +1,7 @@
|
||||
<ul>
|
||||
<mx:bloc id="bloc1">
|
||||
<li mxAttribut="class:class">
|
||||
<a class="nav-link text-nowrap" mXattribut="href:nodeUrl">
|
||||
<mx:image id="pictoNode"/>
|
||||
<mx:text id="nodeName"/>2
|
||||
</a>
|
||||
<mx:text id="nodeDir"/>
|
||||
</li>
|
||||
</mx:bloc id="bloc1">
|
||||
<ul class="dropdown-menu">
|
||||
<mx:bloc id="bloc1">
|
||||
<mx:bloc id="blocDropdown">
|
||||
<li mXattribut="class:class"><a class="nav-link text-nowrap" mXattribut="href:nodeUrl"><mx:image id="pictoNode"/><mx:text id="nodeName"/></a></li><mx:text id="nodeDir"/>
|
||||
</mx:bloc id="blocDropdown">
|
||||
</mx:bloc id="bloc1">
|
||||
</ul>
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
/**-----------------------------------------------
|
||||
*
|
||||
* Granilim (C) 2004-2006, Limousin expansion
|
||||
* Limousin expansion contact@granilim.org
|
||||
* Rooty, 2018 <rooty@rooty.me>
|
||||
*
|
||||
*
|
||||
* This software is protected by copyright, please
|
||||
* read the file COPYRIGHT.
|
||||
@ -18,10 +18,10 @@
|
||||
* Ce fichier contient la classe NavigationPrint
|
||||
*<BR>
|
||||
* @author Initiance <www.initiance.com|martial@initiance.com>
|
||||
* @copyright Copyright © 2004-2006, Limousin expansion
|
||||
* @copyright Copyright © 2009-2018, Rooty
|
||||
* @since 2004/06/07
|
||||
* @version 0.1
|
||||
* @link www.granilim.org
|
||||
* @version 0.3
|
||||
* @link www.rooty.me
|
||||
* @package object_printing
|
||||
* @subpackage NavigationPrint
|
||||
*/
|
||||
@ -53,7 +53,7 @@ class NavigationPrint extends Printing
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct("1.0", "Olivier DEVAINE", "Affichage de la NavigationNode");
|
||||
parent::__construct("1.1", "Rooty <rooty@rooty.me>", "Affichage de la NavigationNode");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -62,6 +62,8 @@ class NavigationPrint extends Printing
|
||||
*/
|
||||
function __print()
|
||||
{
|
||||
global $SERVER_NAME, $SCRIPT_NAME, $CONF_AUTH_SECURE;
|
||||
|
||||
/* gestion du lib en fonction de la langue courante */
|
||||
$currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
|
||||
$defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
|
||||
@ -73,32 +75,135 @@ class NavigationPrint extends Printing
|
||||
$Node =$GLOBALS["SYSTEM_USER_SESSION"]->getNode($GLOBALS["SYSTEM_USER_SESSION"]->entryNodeId);
|
||||
|
||||
/* recuperation de l'image de la langue courante */
|
||||
if (file_exists("data/image/icons/node/".strtolower($Node->getIcone())) && ($Node->getIcone()!=""))
|
||||
if (file_exists($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."media/picto/node/".strtolower($Node->getIcone())) && ($Node->getIcone()!=""))
|
||||
{
|
||||
$img="data/image/icons/node/".strtolower($Node->getIcone());
|
||||
$img=$GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."media/picto/node/".strtolower($Node->getIcone());
|
||||
}else{
|
||||
$img="data/image/icons/node/defaultnode.gif";
|
||||
$img=$GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."media/picto/node/defaultnode.gif";
|
||||
}
|
||||
|
||||
// BLOC INFOS UTILISATEUR
|
||||
if ($GLOBALS["SYSTEM_USER_SESSION"]->user->getId()==$GLOBALS["SYSTEM_DEFAULT_USER_GUEST"])
|
||||
{
|
||||
$nodeId = $GLOBALS["SYSTEM_USER_SESSION"]->navigationNodeId;
|
||||
|
||||
/* création de l'url de login */
|
||||
$url =$_SERVER['SCRIPT_NAME'];
|
||||
$url.="?system=authSession";
|
||||
$url=addIdToUrl($url);
|
||||
|
||||
$tabObject =$this->getObjectSon(eid());
|
||||
for ($i=0; $i<count($tabObject);$i++)
|
||||
{
|
||||
if ($tabObject[$i][0]->getClassName()=="home")
|
||||
{
|
||||
$urlArray["id"]=$tabObject[$i][1]->getId();
|
||||
}
|
||||
}
|
||||
|
||||
/* Création de l'URL pour nouveau compte */
|
||||
$urlNewAccount = $_SERVER['SCRIPT_NAME'];
|
||||
$urlNewAccount.= "?system=authNewAccount";
|
||||
$urlNewAccount = addIdToUrl($urlNewAccount);
|
||||
$MaTemplate->MxAttribut("urlActionNewAccount", formatUrl($urlArray["id"],"Home","formLecture","",$this->recupCommunauty()));
|
||||
$MaTemplate->MxAttribut("urlActionNewSubscription", formatUrl($urlArray["id"],"Home","formLectureAdh","",$this->recupCommunauty()));
|
||||
|
||||
/* Création de l'URL pour rappel du mot de passe */
|
||||
$urlForgotPassword = $_SERVER['SCRIPT_NAME'];
|
||||
$urlForgotPassword.= "?system=authForgotPassword";
|
||||
$urlForgotPassword = addIdToUrl($urlForgotPassword);
|
||||
|
||||
$MaTemplate->MxText("blocGUEST".".auth", getMessage("UserPrintAuth"));
|
||||
$MaTemplate->MxText("blocGUEST".".LOGIN", getMessage("UserPrintLogin"));
|
||||
$MaTemplate->MxFormField("blocGUEST".".login", "text", "login", "", "title='".getMessage("tipUserPrintLogin")."'");
|
||||
$MaTemplate->MxText("blocGUEST".".PASSWORD", getMessage("UserPrintPassword"));
|
||||
$MaTemplate->MxFormField("blocGUEST".".password", "password", "password", "", "title='".getMessage("tipUserPrintPassword")."'");
|
||||
$MaTemplate->MxAttribut("blocGUEST".".urlActionNewAccount", $urlNewAccount);
|
||||
$MaTemplate->MxText("blocGUEST".".NEWACCOUNT", getMessage("UserPrintNewAccount"));
|
||||
$MaTemplate->MxText("blocGUEST".".NEWSUBSCRIPTION", getMessage("UserPrintNewSubscription"));
|
||||
$MaTemplate->MxAttribut("blocGUEST".".urlActionForgotPassword", $urlForgotPassword);
|
||||
$MaTemplate->MxText("blocGUEST".".FORGOTPASSWORD", getMessage("UserPrintForgotPassword"));
|
||||
$MaTemplate->MxAttribut("blocGUEST".".urlAction", $url);
|
||||
$MaTemplate->MxAttribut("blocGUEST".".BtnEnter", getMessage("UserPrintEnter"));
|
||||
$MaTemplate->MxAttribut("blocGUEST".".titleButton", getMessage("tipUserPrintEnter"));
|
||||
|
||||
$MaTemplate->MxBloc("blocAUTH", "delete");
|
||||
} else {
|
||||
$nodeId = $GLOBALS["SYSTEM_USER_SESSION"]->navigationNodeId;
|
||||
|
||||
/* création de l'url de déconnexion */
|
||||
$urlDisco =$_SERVER['SCRIPT_NAME'];
|
||||
$urlDisco.="?system=disconnectSession";
|
||||
$urlDisco=addIdToUrl($urlDisco);
|
||||
|
||||
// On récupère la liste des objets pour l'EID courant (racine)
|
||||
$tabObject =$this->getObjectSon(eid());
|
||||
|
||||
/* création de l'url de l'outil de gestion du compte utilisateur */
|
||||
$nodeId = $GLOBALS["SYSTEM_USER_SESSION"]->navigationNodeId;
|
||||
$tabObjectNode =$this->getObjectSon($nodeId);
|
||||
|
||||
for ($j=0; $j<count($tabObjectNode);$j++)
|
||||
{
|
||||
if ($tabObjectNode[$j][0]->getClassName()=="UserModif")
|
||||
{
|
||||
$objID=$tabObjectNode[$j][1]->getId();
|
||||
$objCN=$tabObjectNode[$j][0]->getClassName();
|
||||
$objMN=$tabObjectNode[$j][0]->getMethodName();
|
||||
}
|
||||
}
|
||||
|
||||
// var_dump($objID."\n".$objCN."\n".$objMN);
|
||||
|
||||
if( isset($objID) AND isset($objCN) AND isset($objMN) )
|
||||
$MaTemplate->MxAttribut("blocAUTH".".urlAccount", formatUrl($objID, $objCN, $objMN, "", ""));
|
||||
|
||||
$MaTemplate->MxAttribut("blocAUTH".".disconnectURL", $urlDisco);
|
||||
$MaTemplate->MxText("blocAUTH".".firstName", $GLOBALS["SYSTEM_USER_SESSION"]->user->getFirstName());
|
||||
$MaTemplate->MxText("blocAUTH".".lastName", $GLOBALS["SYSTEM_USER_SESSION"]->user->getLastName());
|
||||
// $MaTemplate->MxText("id", $GLOBALS["SYSTEM_USER_SESSION"]->user->getId());
|
||||
// $MaTemplate->MxText("mail", $GLOBALS["SYSTEM_USER_SESSION"]->user->getMail());
|
||||
// $MaTemplate->MxText("organisation", $GLOBALS["SYSTEM_USER_SESSION"]->user->getOrganisation());
|
||||
// $MaTemplate->MxText("title", $GLOBALS["SYSTEM_USER_SESSION"]->user->getTitle());
|
||||
// $MaTemplate->MxText("postalAddress", $GLOBALS["SYSTEM_USER_SESSION"]->user->getPostalAddress());
|
||||
// $MaTemplate->MxText("postalCode", $GLOBALS["SYSTEM_USER_SESSION"]->user->getPostalCode());
|
||||
// $MaTemplate->MxText("state", $GLOBALS["SYSTEM_USER_SESSION"]->user->getState());
|
||||
// $MaTemplate->MxText("country", $GLOBALS["SYSTEM_USER_SESSION"]->user->getCountry());
|
||||
$MaTemplate->MxText("blocAUTH".".login", $GLOBALS["SYSTEM_USER_SESSION"]->user->getLogin());
|
||||
// $MaTemplate->MxText("tel", $GLOBALS["SYSTEM_USER_SESSION"]->user->getTel());
|
||||
$MaTemplate->MxText("blocAUTH".".decon", getMessage("UserPrintDecon"));
|
||||
// $MaTemplate->MxAttribut("decon", getMessage("UserPrintDecon"));
|
||||
// $MaTemplate->MxText("fax", $GLOBALS["SYSTEM_USER_SESSION"]->user->getFax());
|
||||
// $MaTemplate->MxText("TxtWelcome", getMessage("TxtWelcome"));
|
||||
|
||||
$MaTemplate->MxBloc("blocGUEST", "delete");
|
||||
}
|
||||
|
||||
$urlToGo = formatUrlNode("navigationNode", $Node->getId());
|
||||
|
||||
/* pour l'url */
|
||||
$MaTemplate->MxAttribut("nodeUrl", htmlentitiesconv($urlToGo));
|
||||
$lib=$Node->getLibelle($currentCode);
|
||||
if ($lib=="")
|
||||
|
||||
if ( $Node->getLibelle($currentCode) != "" )
|
||||
{
|
||||
$lib=$Node->getLibelle($defaultCode);
|
||||
if( !strstr("0.", $Node->getLibelle($currentCode)) )
|
||||
{
|
||||
$lib=$Node->getLibelle($currentCode);
|
||||
}
|
||||
} else {
|
||||
$lib = "";
|
||||
}
|
||||
|
||||
$MaTemplate->MxImage("pictoNode", $img ,htmlentitiesconv($lib),"");
|
||||
|
||||
/* objet en cours */
|
||||
if ($Node->getId()==nid())
|
||||
$MaTemplate->MxAttribut("style", "NavigationSelected");
|
||||
else
|
||||
$MaTemplate->MxAttribut("style", "Navigation");
|
||||
/* Fin des objets en cours */
|
||||
if ($lib=="")
|
||||
{
|
||||
if ( $Node->getLibelle($currentCode) != "" )
|
||||
{
|
||||
if( !strstr("0.", $Node->getLibelle($currentCode)) )
|
||||
$lib=$Node->getLibelle($defaultCode);
|
||||
}
|
||||
}
|
||||
|
||||
$MaTemplate->MxImage("pictoNode", $img , htmlentitiesconv($lib),"");
|
||||
$MaTemplate->MxText("nodeName", htmlentitiesconv($lib));
|
||||
|
||||
/* On affiche les noeuds suivants */
|
||||
@ -139,23 +244,49 @@ class NavigationPrint extends Printing
|
||||
|
||||
/* Pour le Tri/Nom */
|
||||
$tabName=array();
|
||||
|
||||
for ($i=0; $i<count($tabObj);$i++)
|
||||
{
|
||||
if(!is_object($tabObj[$i])) // c un obj!!!!
|
||||
{
|
||||
$lib=$tabObj[$i][1]->getName($currentCode);
|
||||
if ($lib=="")
|
||||
if( strpos( $tabObj[$i][1]->getName($currentCode), "zz. ") === false )
|
||||
{
|
||||
$lib=$tabObj[$i][1]->getName($defaultCode);
|
||||
if( $GLOBALS["SYSTEM_USER_SESSION"]->user->getId() != 1 )
|
||||
{
|
||||
if( !in_array($tabObj[$i][1]->getName($currentCode), $GLOBALS['EXCLUDETOOLSFROMUSERMENU']) )
|
||||
{
|
||||
$lib=$tabObj[$i][1]->getName($currentCode);
|
||||
} else {
|
||||
$lib = false;
|
||||
}
|
||||
} else {
|
||||
if( !in_array($tabObj[$i][1]->getName($currentCode), $GLOBALS['EXCLUDETOOLSFROMGUESTMENU']) )
|
||||
{
|
||||
$lib=$tabObj[$i][1]->getName($currentCode);
|
||||
} else {
|
||||
$lib = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$lib = false;
|
||||
}
|
||||
}else{
|
||||
$lib=$tabObj[$i]->getLibelle($currentCode);
|
||||
if ($lib=="")
|
||||
if( strpos( $tabObj[$i]->getLibelle($currentCode), "zz. ") === false )
|
||||
{
|
||||
$lib=$tabObj[$i]->getLibelle($defaultCode);
|
||||
if( $GLOBALS["SYSTEM_USER_SESSION"]->user->getId() != 1 )
|
||||
$lib=$tabObj[$i]->getLibelle($currentCode);
|
||||
else
|
||||
if( !in_array($tabObj[$i][1]->getName($currentCode), $GLOBALS['EXCLUDETOOLSFROMGUESTMENU']) )
|
||||
$lib=$tabObj[$i][1]->getName($currentCode);
|
||||
else
|
||||
$lib = false;
|
||||
} else {
|
||||
$lib = false;
|
||||
}
|
||||
}
|
||||
$tabName[$i]=$lib;
|
||||
|
||||
if( $lib && !empty($lib) )
|
||||
$tabName[$i]=$lib;
|
||||
}
|
||||
asort($tabName);
|
||||
reset($tabName);
|
||||
@ -176,17 +307,21 @@ class NavigationPrint extends Printing
|
||||
$urlToGo = formatUrlNode("navigationNode", $tabObj[$i]->getId());
|
||||
|
||||
/* pour l'url */
|
||||
$MaTemplate->MxAttribut("bloc1.nodeUrl", ($urlToGo));
|
||||
$MaTemplate->MxAttribut("bloc1.nodeUrl", $urlToGo);
|
||||
$MaTemplate->MxAttribut("bloc1.blocDropdown.nodeUrl", $urlToGo);
|
||||
$MaTemplate->MxAttribut("bloc1.blocNoDropdown.nodeUrl", $urlToGo);
|
||||
$lib=$tabObj[$i]->getLibelle($currentCode);
|
||||
|
||||
if ($lib=="")
|
||||
{
|
||||
$lib=$tabObj[$i]->getLibelle($defaultCode);
|
||||
}
|
||||
|
||||
/*Fonction permettant de supprimer les numeros, le point et l'espace à l'affichage*/
|
||||
// $lib = eregi_replace("^[[:space:]]*[a-z]+[.)".chr(176)."][[:space:]]+", "", $lib);
|
||||
$lib = ltrim(substr( $lib, strpos($lib, ". "), strlen($lib) ), ". ");
|
||||
$MaTemplate->MxImage("bloc1.pictoNode", $img ,htmlentitiesconv($lib),"");
|
||||
$lib = ltrim(substr( $lib, strpos($lib, ". "), strlen($lib) ), ". ");
|
||||
$MaTemplate->MxImage("bloc1.pictoNode", $img , htmlentitiesconv($lib), "");
|
||||
$MaTemplate->MxImage("bloc1.blocDropdown.pictoNode", $img , htmlentitiesconv($lib), "");
|
||||
$MaTemplate->MxImage("bloc1.blocNoDropdown.pictoNode", $img , htmlentitiesconv($lib), "");
|
||||
|
||||
/* objet en cours */
|
||||
$bool=false;
|
||||
@ -199,18 +334,31 @@ class NavigationPrint extends Printing
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($tabObj[$i]->getId()==nid() || $bool==true)
|
||||
$MaTemplate->MxAttribut("bloc1.class", "active");
|
||||
else
|
||||
$MaTemplate->MxAttribut("bloc1.class", "none");
|
||||
|
||||
if ($tabObj[$i]->getId()==nid() || $bool==true) {
|
||||
$classBoostrapMenu = " active";
|
||||
} else {
|
||||
$classBoostrapMenu = "";
|
||||
}
|
||||
/* Fin des objets en cours */
|
||||
|
||||
$MaTemplate->MxText("bloc1.nodeName", htmlentitiesconv($lib)."1");
|
||||
$MaTemplate->MxText("bloc1.nodeName", htmlentitiesconv($lib));
|
||||
$MaTemplate->MxText("bloc1.blocDropdown.nodeName", htmlentitiesconv($lib));
|
||||
$MaTemplate->MxText("bloc1.blocNoDropdown.nodeName", htmlentitiesconv($lib));
|
||||
// on récupére les sous niveau...
|
||||
|
||||
$ssLevel=$this->printForNode($tabObj[$i]->getId(), ( (($modelixeMxt=="navigationsub.mxt") || ($modelixeMxt=="navigationdiv.mxt")) && (($modelixeMxt!="navigationnode.mxt"))?"navigationdiv.mxt":"navigationsub.mxt"));
|
||||
$MaTemplate->MxText("bloc1.nodeDir", $ssLevel);
|
||||
$MaTemplate->MxText("bloc1.blocDropdown.nodeDir.nodeDir", $ssLevel);
|
||||
|
||||
if( $ssLevel ) {
|
||||
$classBoostrapMenu = " dropdown".$classBoostrapMenu;
|
||||
$MaTemplate->MxBloc("bloc1.blocNoDropdown", "delete");
|
||||
} else {
|
||||
$classBoostrapMenu = $classBoostrapMenu;
|
||||
$MaTemplate->MxBloc("bloc1.blocDropdown", "delete");
|
||||
}
|
||||
|
||||
$MaTemplate->MxAttribut("bloc1.class", $classBoostrapMenu);
|
||||
}else{
|
||||
/* recuperation de l'image de la langue courante */
|
||||
if (file_exists("data/image/icons/object/".strtolower($tabObj[$i][1]->getIcone())) && ($tabObj[$i][1]->getIcone()!=""))
|
||||
@ -224,32 +372,46 @@ class NavigationPrint extends Printing
|
||||
|
||||
/* pour l'url */
|
||||
$MaTemplate->MxAttribut("bloc1.nodeUrl", $urlToGo);
|
||||
$MaTemplate->MxAttribut("bloc1.blocDropdown.nodeUrl", $urlToGo);
|
||||
$MaTemplate->MxAttribut("bloc1.blocNoDropdown.nodeUrl", $urlToGo);
|
||||
$lib=$tabObj[$i][1]->getName($currentCode);
|
||||
|
||||
if ($lib=="")
|
||||
{
|
||||
$lib=$tabObj[$i][1]->getName($defaultCode);
|
||||
}
|
||||
|
||||
$lib = ltrim(substr( $lib, strpos($lib, ". "), strlen($lib) ), ". ");
|
||||
|
||||
//$page -> MxImage(string $path, string $imageFile, [string $title], [string $imageAttribut], [string $getSize]);
|
||||
$MaTemplate->MxImage("bloc1.pictoNode", $img ,htmlentitiesconv($lib), "");
|
||||
$MaTemplate->MxImage("bloc1.pictoNode", $img ,htmlentitiesconv($lib), "");
|
||||
$MaTemplate->MxImage("bloc1.blocDropdown.pictoNode", $img ,htmlentitiesconv($lib), "");
|
||||
$MaTemplate->MxImage("bloc1.blocNoDropdown.pictoNode", $img ,htmlentitiesconv($lib), "");
|
||||
|
||||
/* objet en cours */
|
||||
if ( ($tabObj[$i][1]->getId()==oid() ) && ( strtolower($tabObj[$i][0]->getClassName())==strtolower(className())) && (!(strpos(strtolower(methodName()), strtolower(str_replace("action","",$tabObj[$i][0]->getMethodName())))===false)) )
|
||||
$MaTemplate->MxAttribut("bloc1.class", "active");
|
||||
else
|
||||
$MaTemplate->MxAttribut("bloc1.class", "none");
|
||||
if ( ($tabObj[$i][1]->getId()==oid() ) && ( strtolower($tabObj[$i][0]->getClassName())==strtolower(className())) && (!(strpos(strtolower(methodName()), strtolower(str_replace("action","",$tabObj[$i][0]->getMethodName())))===false)) ) {
|
||||
$MaTemplate->MxAttribut("bloc1.class", "active");
|
||||
$MaTemplate->MxAttribut("bloc1.blocDropdown.class", "nav-item active");
|
||||
$MaTemplate->MxAttribut("bloc1.blocNoDropdown.class", " nav-item active");
|
||||
} else {
|
||||
$MaTemplate->MxAttribut("bloc1.class", "");
|
||||
$MaTemplate->MxAttribut("bloc1.blocDropdown.class", "nav-item");
|
||||
$MaTemplate->MxAttribut("bloc1.blocNoDropdown.class", "nav-item");
|
||||
}
|
||||
/* Fin des objets en cours */
|
||||
|
||||
/*Fonction permettant de supprimer les numeros, le point et l'espace à l'affichage*/
|
||||
// $lib = eregi_replace("^[[:space:]]*[a-z]+[.)".chr(176)."][[:space:]]+", "", $lib);
|
||||
$lib = ltrim(substr( $lib, strpos($lib, ". "), strlen($lib) ), ". ");
|
||||
$lib = preg_replace("/^[[:space:]]*[a-z]+[.)".chr(176)."][[:space:]]+/i", "", $lib);
|
||||
$MaTemplate->MxText("bloc1.nodeName", htmlentitiesconv($lib));
|
||||
$MaTemplate->MxText("bloc1.blocNoDropdown.nodeName", htmlentitiesconv($lib));
|
||||
$MaTemplate->MxText("bloc1.blocDropdown.nodeName", htmlentitiesconv($lib));
|
||||
$MaTemplate->MxBloc("bloc1.blocDropdown.nodeDir", "delete");
|
||||
|
||||
$MaTemplate->MxText("bloc1.nodeName", htmlentitiesconv($lib)."2");
|
||||
$MaTemplate->MxText("bloc1.nodeDir", "");
|
||||
if ( $lib && ($GLOBALS["SYSTEM_USER_SESSION"]->user->getId() == 1) )
|
||||
$MaTemplate->MxBloc("bloc1.blocDropdown", "delete");
|
||||
}
|
||||
$MaTemplate->MxBloc("bloc1", "loop");
|
||||
}
|
||||
|
||||
if (count($tabName)!=0)
|
||||
$data=$MaTemplate->MxWrite();
|
||||
else
|
||||
@ -261,7 +423,7 @@ class NavigationPrint extends Printing
|
||||
* recupere les repertoires d'un noeud
|
||||
* @access public
|
||||
*/
|
||||
function getNodeSon($nodeId)
|
||||
private function getNodeSon($nodeId)
|
||||
{
|
||||
$tab=$GLOBALS["SYSTEM_USER_SESSION"]->getSonOfNodeAllowed($nodeId);
|
||||
return $tab;
|
||||
@ -271,10 +433,40 @@ class NavigationPrint extends Printing
|
||||
* recupere les fils d'un noeud depuis le noeud principal
|
||||
* @access public
|
||||
*/
|
||||
function getObjectSon($nodeId)
|
||||
private function getObjectSon($nodeId)
|
||||
{
|
||||
$tab=$GLOBALS["SYSTEM_CONTROL"]->getListObjectForNavigation($nodeId);
|
||||
return $tab;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function permettant de modifier le contenu dans la bd et redirection
|
||||
* @access private
|
||||
* @return chaine entier noeud de configuration
|
||||
*/
|
||||
private function recupCommunauty($get='id',$langcode="fr")
|
||||
{
|
||||
/* Récupération de la communauté courante */
|
||||
$myEntryNode =$GLOBALS["SYSTEM_USER_SESSION"]->entryNodeId; /* Noeud d'entrée de l'utilisateur */
|
||||
$myTree =$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE"]->createInstance($myEntryNode); /* Récupération du Tree correspondant */
|
||||
|
||||
$nodeId=NULL;
|
||||
for ($i=0; $i<count($myTree->tabFather); $i++)
|
||||
{
|
||||
if ($myTree->tabFather[$i]->getIdPere()==1)
|
||||
{
|
||||
if( $get == 'id' ) { $nodeId=$myTree->tabFather[$i]->getId();}
|
||||
elseif( $get == 'ctype' ) { $nodeId=$myTree->tabFather[$i]->getCType();}
|
||||
elseif( $get == 'lib' ) {$nodeId=$myTree->tabFather[$i]->getLibelle($langcode);}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (is_null($nodeId))
|
||||
{
|
||||
systemRedirect( $GLOBALS["CONF_PAGE_EXECUTION"] );
|
||||
}
|
||||
/* -- Fin Recup Communauté */
|
||||
return $nodeId;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user