diff --git a/data/template/lcube6/object_printing/userprint/auth.mxt b/data/template/lcube6/object_printing/userprint/auth.mxt
index feed880..246db0a 100755
--- a/data/template/lcube6/object_printing/userprint/auth.mxt
+++ b/data/template/lcube6/object_printing/userprint/auth.mxt
@@ -18,7 +18,9 @@
+
+
diff --git a/lib/object_printing/userprint/userprint.php b/lib/object_printing/userprint/userprint.php
index 2d2867c..270fc6a 100755
--- a/lib/object_printing/userprint/userprint.php
+++ b/lib/object_printing/userprint/userprint.php
@@ -65,10 +65,10 @@ class UserPrint extends Printing
global $SERVER_NAME, $SCRIPT_NAME, $CONF_AUTH_SECURE;
if ($GLOBALS["SYSTEM_USER_SESSION"]->user->getId()==$GLOBALS["SYSTEM_DEFAULT_USER_GUEST"])
{
- $MaTemplate = new ModeliXeQware($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_printing/userprint/auth.mxt");
+ $MaTemplate = new ModeliXeQware($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_printing/userprint/auth.mxt");
$MaTemplate->SetModeliXe(true);
-
- $nodeId = $GLOBALS["SYSTEM_USER_SESSION"]->navigationNodeId;
+
+ $nodeId = $GLOBALS["SYSTEM_USER_SESSION"]->navigationNodeId;
$GLOBALS['SYSTEM_TEMPLATE']->MxText("imgPath", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']);
/* création de l'url de login */
@@ -81,22 +81,27 @@ class UserPrint extends Printing
{
if ($tabObject[$i][0]->getClassName()=="Home")
{
-// var_dump($tabObject[$i][1]->getId());
$urlArray["id"]=$tabObject[$i][1]->getId();
}
}
-
+
+ $node=$GLOBALS["SYSTEM_USER_SESSION"]->getNode(recupCommunity());
+
/* Création de l'URL pour nouveau compte */
$urlNewAccount = $_SERVER['SCRIPT_NAME'];
$urlNewAccount.= "?system=authNewAccount";
$urlNewAccount = addIdToUrl($urlNewAccount);
-// if( isset($_SERVER["HTTPS"]) )
-// $proto = "https://";
-// else
-// $proto = "http://";
-// $MaTemplate->MxAttribut("urlActionNewAccount", $proto."www.fab-l3.org/wwwfab_lorg-142-les_communautes-formlecture-2.htm?abs=1¶m=139");
+
$MaTemplate->MxAttribut("urlActionNewAccount", formatUrl($urlArray["id"],"Home","formLecture","",recupCommunity()));
- $MaTemplate->MxAttribut("urlActionNewSubscription", formatUrl($urlArray["id"],"Home","formLectureAdh","",recupCommunity()));
+
+// var_dump($node->getCType());
+ if ($node->getCType() == "asso")
+ {
+ $MaTemplate->MxText("blocSubscription".".NEWSUBSCRIPTION", getMessage("UserPrintNewSubscription"));
+ $MaTemplate->MxAttribut("blocSubscription".".urlActionNewSubscription", formatUrl($urlArray["id"], "Home", "formLectureAdh", "", recupCommunity()));
+ }
+ else
+ $MaTemplate->MxBloc("blocSubscription", "delete");
/* Création de l'URL pour rappel du mot de passe */
$urlForgotPassword = $_SERVER['SCRIPT_NAME'];
@@ -113,7 +118,6 @@ class UserPrint extends Printing
$MaTemplate->MxFormField("password", "password", "password", "", "title='".getMessage("tipUserPrintPassword")."'");
$MaTemplate->MxAttribut("urlActionNewAccount", $urlNewAccount);
$MaTemplate->MxText("NEWACCOUNT", getMessage("UserPrintNewAccount"));
- $MaTemplate->MxText("NEWSUBSCRIPTION", getMessage("UserPrintNewSubscription"));
$MaTemplate->MxAttribut("urlActionForgotPassword", $urlForgotPassword);
$MaTemplate->MxText("FORGOTPASSWORD", getMessage("UserPrintForgotPassword"));
$MaTemplate->MxAttribut("urlActionLogin", $url);