NEWW Add selection of the mode to show icon/text in setup
This commit is contained in:
parent
23468929df
commit
f276c66614
@ -101,9 +101,14 @@ if ($action == 'update') {
|
||||
if ($mode == 'template') {
|
||||
dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
/*$val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE');
|
||||
if (! $val) dolibarr_del_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', $conf->entity);
|
||||
else dolibarr_set_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', GETPOST('THEME_TOPMENU_DISABLE_IMAGE'), 'chaine', 0, '', $conf->entity);*/
|
||||
if (GETPOSTISSET('THEME_TOPMENU_DISABLE_IMAGE')) {
|
||||
$val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE');
|
||||
if (!$val) {
|
||||
dolibarr_del_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', GETPOST('THEME_TOPMENU_DISABLE_IMAGE'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'), array()))));
|
||||
if ($val == '') {
|
||||
|
||||
@ -450,26 +450,6 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
||||
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
}
|
||||
|
||||
// Show logo
|
||||
if ($foruserprofile) {
|
||||
// Nothing
|
||||
} else {
|
||||
// Show logo
|
||||
print '<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans("EnableShowLogo").'</td><td>';
|
||||
if ($edit) {
|
||||
print ajax_constantonoff('MAIN_SHOW_LOGO', array(), null, 0, 0, 1);
|
||||
//print $form->selectyesno('MAIN_SHOW_LOGO', $conf->global->MAIN_SHOW_LOGO, 1);
|
||||
} else {
|
||||
print yn($conf->global->MAIN_SHOW_LOGO);
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
/*
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("EnableShowLogo").'</td><td>' . yn($conf->global->MAIN_SHOW_LOGO) . '</td>';
|
||||
print "</tr>";*/
|
||||
}
|
||||
|
||||
|
||||
// TopMenuDisableImages
|
||||
if ($foruserprofile) {
|
||||
/*
|
||||
@ -493,26 +473,51 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
||||
if ($edit) print '<br>('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
||||
print '</td>';*/
|
||||
} else {
|
||||
$default = $langs->trans('No');
|
||||
$listoftopmenumodes = array(
|
||||
'0' => $langs->transnoentitiesnoconv("IconAndText"),
|
||||
'1' => $langs->transnoentitiesnoconv("TextOnly"),
|
||||
'2' => $langs->transnoentitiesnoconv("IconOnlyAllTextsOnHover"),
|
||||
'3' => $langs->transnoentitiesnoconv("IconOnlyTextOnHover"),
|
||||
'4' => $langs->transnoentitiesnoconv("IconOnly"),
|
||||
);
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("TopMenuDisableImages").'</td>';
|
||||
print '<td colspan="'.($colspan - 1).'">';
|
||||
if ($edit) {
|
||||
print ajax_constantonoff('THEME_TOPMENU_DISABLE_IMAGE', array(), null, 0, 0, 1);
|
||||
//print $form->selectyesno('THEME_TOPMENU_DISABLE_IMAGE', $conf->global->THEME_TOPMENU_DISABLE_IMAGE, 1);
|
||||
//print ajax_constantonoff('THEME_TOPMENU_DISABLE_IMAGE', array(), null, 0, 0, 1);
|
||||
print $form->selectarray('THEME_TOPMENU_DISABLE_IMAGE', $listoftopmenumodes, $conf->global->THEME_TOPMENU_DISABLE_IMAGE);
|
||||
} else {
|
||||
print yn($conf->global->THEME_TOPMENU_DISABLE_IMAGE);
|
||||
$listoftopmenumodes[$conf->global->THEME_TOPMENU_DISABLE_IMAGE];
|
||||
//print yn($conf->global->THEME_TOPMENU_DISABLE_IMAGE);
|
||||
}
|
||||
print ' <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> ';
|
||||
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
|
||||
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes"));
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Show logo
|
||||
if ($foruserprofile) {
|
||||
// Nothing
|
||||
} else {
|
||||
// Show logo
|
||||
print '<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans("EnableShowLogo").'</td><td>';
|
||||
if ($edit) {
|
||||
print ajax_constantonoff('MAIN_SHOW_LOGO', array(), null, 0, 0, 1);
|
||||
//print $form->selectyesno('MAIN_SHOW_LOGO', $conf->global->MAIN_SHOW_LOGO, 1);
|
||||
} else {
|
||||
print yn($conf->global->MAIN_SHOW_LOGO);
|
||||
}
|
||||
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes"));
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
/*
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("EnableShowLogo").'</td><td>' . yn($conf->global->MAIN_SHOW_LOGO) . '</td>';
|
||||
print "</tr>";*/
|
||||
}
|
||||
|
||||
// BorderTableActive
|
||||
if ($foruserprofile) {
|
||||
} else {
|
||||
$default = $langs->trans('No');
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("UseBorderOnTable").'</td>';
|
||||
print '<td colspan="'.($colspan - 1).'">';
|
||||
@ -522,8 +527,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
||||
} else {
|
||||
print yn($conf->global->THEME_ELDY_USEBORDERONTABLE);
|
||||
}
|
||||
print ' <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong>'.$default.'</strong> ';
|
||||
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
|
||||
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes"));
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -2254,4 +2254,9 @@ ReadOnlyMode=Is instance in "Read Only" mode
|
||||
DEBUGBAR_USE_LOG_FILE=Use the <b>dolibarr.log</b> file to trap Logs
|
||||
UsingLogFileShowAllRecordOfSubrequestButIsSlower=Use the dolibarr.log file to trap Logs instead of live memory catching. It allows to catch all logs instead of only log of current process (so including the one of ajax subrequests pages) but will make your instance very very slow. Not recommended.
|
||||
FixedOrPercent=Fixed (use keyword 'fixed') or percent (use keyword 'percent')
|
||||
DefaultOpportunityStatus=Default opportunity status (first status when lead is created)
|
||||
DefaultOpportunityStatus=Default opportunity status (first status when lead is created)
|
||||
IconAndText=Icon and text
|
||||
TextOnly=Text only
|
||||
IconOnlyAllTextsOnHover=Icon only - All texts appears under icon on mouse hover menu bar
|
||||
IconOnlyTextOnHover=Icon only - Text of icon appears under icon on mouse hover the icon
|
||||
IconOnly=Icon only - Text on tooltip only
|
||||
|
||||
Loading…
Reference in New Issue
Block a user