From 3de8381c2033ef5e5b409fe7e9c91cbdbd7be12f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Sep 2018 19:36:46 +0200 Subject: [PATCH] Website module --- htdocs/langs/en_US/website.lang | 3 ++- htdocs/website/index.php | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index 2ad4ecca5e7..5274ff87fab 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -88,4 +88,5 @@ AliasPageAlreadyExists=Alias page %s already exists CorporateHomePage=Corporate Home page EmptyPage=Empty page ExternalURLMustStartWithHttp=External URL must start with http:// or https:// -ZipOfWebsitePackageToImport=Zip file of website package \ No newline at end of file +ZipOfWebsitePackageToImport=Zip file of website package +ShowSubcontainers=Show included containers \ No newline at end of file diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 3a0273481c0..c463493df2b 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -180,6 +180,7 @@ if ($action == 'renamefile') $action='file_manager'; // After actions_linkedfil if ($action == 'seteditinline') { dolibarr_set_const($db, 'WEBSITE_EDITINLINE', 1); + dolibarr_set_const($db, 'WEBSITE_SUBCONTAINERSINLINE', 0); // Force disable of show included containers header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website','alphanohtml').'&pageid='.GETPOST('pageid','int')); exit; } @@ -189,6 +190,19 @@ if ($action == 'unseteditinline') header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website','alphanohtml').'&pageid='.GETPOST('pageid','int')); exit; } +if ($action == 'setshowsubcontainers') +{ + dolibarr_set_const($db, 'WEBSITE_SUBCONTAINERSINLINE', 1); + dolibarr_set_const($db, 'WEBSITE_EDITINLINE', 0); // Force disable of edit inline + header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website','alphanohtml').'&pageid='.GETPOST('pageid','int')); + exit; +} +if ($action == 'unsetshowsubcontainers') +{ + dolibarr_del_const($db, 'WEBSITE_SUBCONTAINERSINLINE'); + header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website','alphanohtml').'&pageid='.GETPOST('pageid','int')); + exit; +} // Add directory /*