From cc9868337bc4dc9f2e8b76fa7ee7c552d61443cc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 19 Aug 2005 16:45:24 +0000 Subject: [PATCH] Correction sur personalisation du theme. On peut choisir de s'aligner sur theme global. --- htdocs/user/param_ihm.php | 49 +++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index b7f83d8572a..295dccf1b2d 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -72,7 +72,8 @@ if ($_POST["action"] == 'update') if ($_POST["check_SIZE_LISTE_LIMIT"]=="on") $tabparam["SIZE_LISTE_LIMIT"]=$_POST["size_liste_limit"]; else $tabparam["SIZE_LISTE_LIMIT"]=''; - $tabparam["MAIN_THEME"]=$_POST["main_theme"]; + if ($_POST["check_MAIN_THEME"]=="on") $tabparam["MAIN_THEME"]=$_POST["main_theme"]; + else $tabparam["MAIN_THEME"]=''; $tabparam["MAIN_SEARCHFORM_CONTACT"]=$_POST["main_searchform_contact"]; $tabparam["MAIN_SEARCHFORM_SOCIETE"]=$_POST["main_searchform_societe"]; @@ -141,13 +142,13 @@ if ($_GET["action"] == 'edit') $var=true; print ''; - print ''; + print ''; // Langue par defaut $var=!$var; - print ''; + print ''; print ''; - print ''; + print ''; print ''; print ''; - print ''; + print ''; print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("DefaultValue").' '.$langs->trans("PersonalValue").'
'.$langs->trans("Parameter").''.$langs->trans("DefaultValue").' '.$langs->trans("PersonalValue").'
'.$langs->trans("Language").'
'.$langs->trans("Language").''.$conf->global->MAIN_LANG_DEFAULT.'conf->MAIN_LANG_DEFAULT?" checked":"").'> '.$langs->trans("UsePersonalValue").'conf->MAIN_LANG_DEFAULT?" checked":"").'> '.$langs->trans("UsePersonalValue").''; $html=new Form($db); $html->select_lang($fuser->conf->MAIN_LANG_DEFAULT,'main_lang_default'); @@ -157,7 +158,7 @@ if ($_GET["action"] == 'edit') $var=!$var; print '
'.$langs->trans("MaxSizeList").''.$conf->global->SIZE_LISTE_LIMIT.'conf->SIZE_LISTE_LIMIT?" checked":"").'> '.$langs->trans("UsePersonalValue").'conf->SIZE_LISTE_LIMIT?" checked":"").'> '.$langs->trans("UsePersonalValue").'

'; @@ -181,18 +182,18 @@ else $var=true; print ''; - print ''; + print ''; $var=!$var; - print ''; + print ''; print ''; - print ''; + print ''; print ''; $var=!$var; print ''; print ''; - print ''; + print ''; print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("DefaultValue").' '.$langs->trans("PersonalValue").'
'.$langs->trans("Parameter").''.$langs->trans("DefaultValue").' '.$langs->trans("PersonalValue").'
'.$langs->trans("Language").'
'.$langs->trans("Language").''.$conf->global->MAIN_LANG_DEFAULT.'conf->MAIN_LANG_DEFAULT?" checked":"").'> '.$langs->trans("UsePersonalValue").'conf->MAIN_LANG_DEFAULT?" checked":"").'> '.$langs->trans("UsePersonalValue").'' . $fuser->conf->MAIN_LANG_DEFAULT . '
'.$langs->trans("MaxSizeList").''.$conf->global->SIZE_LISTE_LIMIT.'conf->SIZE_LISTE_LIMIT?" checked":"").'> '.$langs->trans("UsePersonalValue").'conf->SIZE_LISTE_LIMIT?" checked":"").'> '.$langs->trans("UsePersonalValue").'' . $fuser->conf->SIZE_LISTE_LIMIT . '

'; @@ -219,20 +220,32 @@ llxFooter('$Date$ - $Revision$'); function show_theme($fuser,$edit=0) { - global $langs,$dirtheme,$bc; + global $conf,$langs,$dirtheme,$bc; + + $thumbsbyrow=6; - $nbofthumbs=5; print ''; - print ''; + print ''; - $handle=opendir($dirtheme); $var=false; + + print ''; + print ''; + print ''; + print ''; + + $var=!$var; + print ''; print '
'.$langs->trans("Skin").'
'.$langs->trans("Parameter").''.$langs->trans("DefaultValue").' 
'.$langs->trans("DefaultSkin").''.$conf->global->MAIN_THEME.'conf->MAIN_THEME?" checked":"").'> '.$langs->trans("UsePersonalValue").' 
'; + + print ''; + $handle=opendir($dirtheme); $i=0; while (($subdir = readdir($handle))!==false) { if (is_dir($dirtheme."/".$subdir) && substr($subdir, 0, 1) <> '.' && substr($subdir, 0, 3) <> 'CVS') { - if ($i % $nbofthumbs == 0) { + if ($i % $thumbsbyrow == 0) + { print ''; } @@ -252,17 +265,19 @@ function show_theme($fuser,$edit=0) $i++; - if ($i % $nbofthumbs == 0) print ''; + if ($i % $thumbsbyrow == 0) print ''; } } - if ($i % $nbofthumbs != 0) { - while ($i % $nbofthumbs != 0) { + if ($i % $thumbsbyrow != 0) { + while ($i % $thumbsbyrow != 0) { print ''; $i++; } print ''; } + print '
 
'; + print '
'; }