diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index 75a20ac6852..07112ed66d9 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -205,7 +205,7 @@ function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0, $c /** * Render a string of an HTML content and output it. - * Used to ouput the page when viewed from server (Dolibarr or Apache). + * Used to ouput the page when viewed from a server (Dolibarr or Apache). * * @param string $content Content string * @param string $contenttype Content type @@ -231,7 +231,7 @@ function dolWebsiteOutput($content, $contenttype = 'html', $containerid = '') $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - if (defined('USEDOLIBARREDITOR')) // REPLACEMENT OF LINKS When page called from Dolibarr editor + if (defined('USEDOLIBARREDITOR')) // REPLACEMENT OF LINKS When page called from Dolibarr editor (this case should not happen) { // We remove the part of content if ($contenttype == 'html') @@ -296,7 +296,7 @@ function dolWebsiteOutput($content, $contenttype = 'html', $containerid = '') if (empty($includehtmlcontentopened)) { $content = str_replace('!~!~!~', '', $content); } - } else // REPLACEMENT OF LINKS When page called from virtual host + } else // REPLACEMENT OF LINKS When page called from virtual host web server { $symlinktomediaexists = 1; if ($website->virtualhost) { @@ -355,7 +355,7 @@ function dolWebsiteOutput($content, $contenttype = 'html', $containerid = '') } } - $content = str_replace(' contenteditable="true"', ' contenteditable="false"', $content); + //$content = str_replace(' contenteditable="true"', ' contenteditable="false"', $content); if (!empty($conf->global->WEBSITE_ADD_CSS_TO_BODY)) { $content = str_replace(''."\n"; print '
'; - print '
'; + + print '
'; // Button include dynamic contant + print $langs->trans("ShowSubcontainers"); + if (empty($conf->global->WEBSITE_SUBCONTAINERSINLINE)) + { + print ''.img_picto($langs->trans("ShowSubContainersOnOff", $langs->transnoentitiesnoconv("Off")), 'switch_off', '', false, 0, 0, '', 'nomarginleft').''; + } + else { + print ''.img_picto($langs->trans("ShowSubContainersOnOff", $langs->transnoentitiesnoconv("On")), 'switch_on', '', false, 0, 0, '', 'nomarginleft').''; + } + print '
'; + + print '
'; // Button edit inline print ''."\n"; print ''."\n"; @@ -2812,17 +2824,7 @@ if (!GETPOST('hide_websitemenu')) } print '
'; - print ''; + print '
'; // Set page as homepage @@ -4275,7 +4277,7 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa // REPLACEMENT OF LINKS When page called by website editor $out .= ''."\n"; - $out .= '