From 959b91502cda6aed2c012aa115c48efeea0adee5 Mon Sep 17 00:00:00 2001 From: "tristan.champomier" Date: Tue, 20 Apr 2021 02:38:55 +0200 Subject: [PATCH] Enhancement #73 done. --- .../object_printing/navigationprint/main.mxt | 45 +++++++++--------- .../object_printing/navigationprint/main.mxt | 46 +++++++++---------- .../object_printing/navigationprint/main.mxt | 17 ++++--- .../navigationprint/navigationprint.php | 21 ++++++++- 4 files changed, 76 insertions(+), 53 deletions(-) diff --git a/data/template/lcube6/object_printing/navigationprint/main.mxt b/data/template/lcube6/object_printing/navigationprint/main.mxt index 5f6afd7..12dabed 100755 --- a/data/template/lcube6/object_printing/navigationprint/main.mxt +++ b/data/template/lcube6/object_printing/navigationprint/main.mxt @@ -1,23 +1,24 @@ - - - logo - - + + logo + + - - + diff --git a/data/template/nhsys/object_printing/navigationprint/main.mxt b/data/template/nhsys/object_printing/navigationprint/main.mxt index ff2b4c4..ccd71be 100755 --- a/data/template/nhsys/object_printing/navigationprint/main.mxt +++ b/data/template/nhsys/object_printing/navigationprint/main.mxt @@ -1,24 +1,24 @@ - - - - - - + + + + - - + diff --git a/data/template/qware/object_printing/navigationprint/main.mxt b/data/template/qware/object_printing/navigationprint/main.mxt index 442da1f..ccd71be 100755 --- a/data/template/qware/object_printing/navigationprint/main.mxt +++ b/data/template/qware/object_printing/navigationprint/main.mxt @@ -9,13 +9,16 @@ + + diff --git a/lib/object_printing/navigationprint/navigationprint.php b/lib/object_printing/navigationprint/navigationprint.php index f722bef..513608b 100755 --- a/lib/object_printing/navigationprint/navigationprint.php +++ b/lib/object_printing/navigationprint/navigationprint.php @@ -91,7 +91,26 @@ class NavigationPrint extends Printing } /* Obtention des informations du bloc d'affichage des réseaux sociaux */ - /* #TODO */ + /* Cas où le noeud correspond à la racine de la plateforme Qware */ + if(recupCommunity() === "3") $nodeCom = "2"; else $nodeCom = recupCommunity(); + $NodeSettings=$GLOBALS["SYSTEM_MANAGER"]["NODESETTINGS"]->createInstance($nodeCom); + + /* Link Email */ + if( $NodeSettings->getEmail() && $NodeSettings->getEmail()!="" ) { $MaTemplate->MxAttribut("blocSLinks.linkEmail.email", "mailto:".$NodeSettings->getEmail()); } else $MaTemplate->MxBloc("blocSLinks.linkEmail", "DELETE"); + /* Link Mastodon */ + if( $NodeSettings->getMastodon() && $NodeSettings->getMastodon()!="" ) { $MaTemplate->MxAttribut("blocSLinks.linkMastodon.mastodon", $NodeSettings->getMastodon()); } else $MaTemplate->MxBloc("blocSLinks.linkMastodon", "DELETE"); + /* Link Mobilizon */ + if( $NodeSettings->getMobilizon() && $NodeSettings->getobilizon()!="" ) { $MaTemplate->MxAttribut("blocSLinks.linkMatrix.mobilizon", $NodeSettings->getMobilizon()); } else $MaTemplate->MxBloc("blocSLinks.linkMobilizon", "DELETE"); + /* Link Matrix */ + if( $NodeSettings->getMatrix() && $NodeSettings->getMatrix()!="" ) { $MaTemplate->MxAttribut("blocSLinks.linkMatrix.matrix", $NodeSettings->getMatrix()); } else $MaTemplate->MxBloc("blocSLinks.linkMatrix", "DELETE"); + /* Link Peertube */ + if( $NodeSettings->getPeertube() && $NodeSettings->getPeertube()!="" ) { $MaTemplate->MxAttribut("blocSLinks.linkPeertube.peertube", $NodeSettings->getPeertube()); } else $MaTemplate->MxBloc("blocSLinks.linkPeertube", "DELETE"); + /* Link Nextcloud */ + if( $NodeSettings->getNextcloud() && $NodeSettings->getNextcloud()!="" ) { $MaTemplate->MxAttribut("blocSLinks.linkNextcloud.nextcloud", $NodeSettings->getNextcloud()); } else $MaTemplate->MxBloc("blocSLinks.linkNextcloud", "DELETE"); + /* Link Twitter */ + if( $NodeSettings->getTwitter() && $NodeSettings->getTwitter()!="" ) { $MaTemplate->MxAttribut("blocSLinks.linkTwitter.twitter", $NodeSettings->getTwitter()); } else $MaTemplate->MxBloc("blocSLinks.linkTwitter", "DELETE"); + /* Link Facebook */ + if( $NodeSettings->getFacebook() && $NodeSettings->getFacebook()!="" ) { $MaTemplate->MxAttribut("blocSLinks.linkFacebook.facebook", $NodeSettings->getFacebook()); } else $MaTemplate->MxBloc("blocSLinks.linkFacebook", "DELETE"); // BLOC INFOS UTILISATEUR if ($GLOBALS["SYSTEM_USER_SESSION"]->user->getId()==$GLOBALS["SYSTEM_DEFAULT_USER_GUEST"])