Fixed issues #111

This commit is contained in:
Rooty 2024-03-02 10:02:02 +01:00
parent 5b2a5a282b
commit c01d97a618
2 changed files with 49 additions and 34 deletions

View File

@ -13,30 +13,32 @@
</select>
</div>
</div>
<div class="card-header"><h3><mx:text id="ComText"/></h3></div>
<div class="card-body">
<div class="row w-25 mx-auto my-auto">
<mx:bloc id="blocImgLogo">
<mx:image id="logo"/>
</mx:bloc id="blocImgLogo">
<mx:bloc id="TEXTRESUME">
<mx:text id="text_resume"/>
</mx:bloc id="TEXTRESUME">
</div>
<mx:bloc id="blocTextText">
<div class="row mx-auto mt-3">
<div class="col">
<mx:text id="text_text"/>
<mx:bloc id="blocComContent">
<div class="card-header"><h3><mx:text id="ComText"/></h3></div>
<div class="card-body">
<div class="row w-25 mx-auto my-auto">
<mx:bloc id="blocImgLogo">
<mx:image id="logo"/>
</mx:bloc id="blocImgLogo">
<mx:bloc id="blocTextResume">
<mx:text id="text_resume"/>
</mx:bloc id="blocTextResume">
</div>
<mx:bloc id="blocTextText">
<div class="row mx-auto mt-3">
<div class="col">
<mx:text id="text_text"/>
</div>
</div>
</mx:bloc id="blocTextText">
</div>
</mx:bloc id="blocTextText">
</div>
<div class="card-footer border-0 bg-white text-center">
<mx:bloc id="blocRegisterCom">
<mx:formField id="inscrire" aria-pressed="true"/>
</mx:bloc id="blocRegisterCom">
<input type="button" name="return" class="btn btn-outline-secondary btn-lg btn-sm" aria-pressed="true" title="<mx:text id="tipReturnButton"/>" value="<mx:text id="BtnReturn"/>" onclick="history.back(); return false;"/>
</div>
<div class="card-footer border-0 bg-white text-center">
<mx:bloc id="blocRegisterCom">
<mx:formField id="inscrire" aria-pressed="true"/>
</mx:bloc id="blocRegisterCom">
<input type="button" name="return" class="btn btn-outline-secondary btn-lg btn-sm" aria-pressed="true" title="<mx:text id="tipReturnButton"/>" value="<mx:text id="BtnReturn"/>" onclick="history.back(); return false;"/>
</div>
</mx:bloc id="blocComContent">
</div>
</form>
</div>

View File

@ -55,11 +55,19 @@ Class Community extends CoordinationObj
if(isset($_REQUEST['param']))
{
$title=getMessage("titlPagePresentation")." ".recupCommunity($_REQUEST['param'], "lib", $currentCode);
$currentCommunityName=recupCommunity($_REQUEST['param'], "lib", $currentCode);
if( $currentCommunityName == "Anonyme" )
$currentCommunityName = "Qware";
$title=getMessage("titlPagePresentation")." ".$currentCommunityName;
mxPageTitle($title);
} else
mxPageTitle("titlPageSelectCommunities");
mxCallCss('');
mxCallJs('');
$arrayRawJs[] = "function FselectCom(){if(document.getElementById){if(document.getElementById(\"FselectCom\")){document.getElementById(\"FselectCom\").submit();}}else if(document.all){if(document.all[\"FselectCom\"]){document.all[\"FselectCom\"].submit();}}}";
mxRawJs($arrayRawJs);
@ -95,14 +103,17 @@ Class Community extends CoordinationObj
//Si aucune valeur, on demande à l'utilisateur de choisir une communauté
if(!$_REQUEST['param'])
{
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComText", getMessage("selectCom"));
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocComContent".".ComText", getMessage("selectCom"));
$GLOBALS["SYSTEM_CONTROL"]->messageSystem = "selectCom";
$msg= "selectCom";
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocComContent", "delete");
}
else //Sinon on récupère la valeur
{
$idNode = $_REQUEST['param'];
}
} else {
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocComContent", "delete");
}
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlReturn", htmlentitiesconv($GLOBALS['CONF_PAGE_EXECUTION']."?id=".$GLOBALS['SYSTEM_USER_SESSION']->id."&system=navigationNode&navigationNodeId=".$GLOBALS["SYSTEM_USER_SESSION"]->entryNodeId));
@ -168,25 +179,27 @@ Class Community extends CoordinationObj
{
$list = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow();
$textResume = $list['textentrynode_resume'];
$textText = $list['textentrynode_resume'];
$textText = $list['textentrynode_text'];
//On masque le texte d'intro affiché par défaut à partir de message
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComTextdefault", "");
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocTextResume".".text_resume", $textResume);
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocTextText".".text_text", $textText);
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocComContent".".blocTextResume".".text_resume", $textResume);
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocComContent".".blocTextText".".text_text", $textText);
} else {
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocComContent", "delete");
}
# Destruction des éléments
$GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
#Affichage des contenus
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ComText",$tabNode[$i][1]);
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("blocComContent".".ComText",$tabNode[$i][1]);
if( !isset($textResume) || $textResume == "" ) $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocTextResume", "delete");
if( !isset($textText) || $textText == "" ) $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocTextText", "delete");
if( !isset($textResume) || $textResume == "" ) $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocComContent".".blocTextResume", "delete");
if( !isset($textText) || $textText == "" ) $GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocComContent".".blocTextText", "delete");
if( is_file("data/image/communities/".$idNode."_logo.svg" ) )
$GLOBALS['SYSTEM_TEMPLATE']->MxImage("blocImgLogo".".logo", "data/image/communities/".$idNode."_logo.svg", $tabNode[$i][1], "", 32);
$GLOBALS['SYSTEM_TEMPLATE']->MxImage("blocComContent".".blocImgLogo".".logo", "data/image/communities/".$idNode."_logo.svg", $tabNode[$i][1], "", 32);
else
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocImgLogo", "delete");
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocComContent".".blocImgLogo", "delete");
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("bloc1.entrynodeid",$tabNode[$i][0]);
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("bloc1.entrynodeselected"," selected='selected' ");
@ -194,9 +207,9 @@ Class Community extends CoordinationObj
if( $tabNode[$i][3] == "on" )
{
$url_inscrire = Navigation::formatUrl($this->GetId(),"Community","formlecture","",$tabNode[$i][0]);
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("blocRegisterCom".".inscrire", "button", "ok", getMessage("registerCom"), " onclick=\"javascript:window.location.href='$url_inscrire';\" class=\"btn btn-outline-secondary btn-lg btn-sm\"");
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("blocComContent".".blocRegisterCom".".inscrire", "button", "ok", getMessage("registerCom"), " onclick=\"javascript:window.location.href='$url_inscrire';\" class=\"btn btn-outline-secondary btn-lg btn-sm\"");
} else {
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("blocRegisterCom".".inscrire", "button", "ok", getMessage("registerComClosed"), "class=\"btn btn-secondary btn-lg btn-sm\" disabled");
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("blocComContent".".blocRegisterCom".".inscrire", "button", "ok", getMessage("registerComClosed"), "class=\"btn btn-secondary btn-lg btn-sm\" disabled");
}
}
else