Merge branch 'develop' into patch-11
This commit is contained in:
commit
cc0fd9900c
16 changed files with 45 additions and 41 deletions
|
|
@ -121,7 +121,7 @@ if ($action == 'update') {
|
|||
}
|
||||
|
||||
if (GETPOSTISSET('THEME_TOPMENU_DISABLE_IMAGE')) {
|
||||
$val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE');
|
||||
$val = GETPOST('THEME_TOPMENU_DISABLE_IMAGE');
|
||||
if (!$val) {
|
||||
dolibarr_del_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', $conf->entity);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ function printDropdownBookmarksList()
|
|||
|
||||
$searchForm .= '<input name="bookmark" id="top-bookmark-search-input" class="dropdown-search-input" placeholder="'.$langs->trans('Bookmarks').'" autocomplete="off" >';
|
||||
} else {
|
||||
$searchForm .= '<select name"=bookmark" id="boxbookmark" class="topmenu-bookmark-dropdown .dropdown-toggle">';
|
||||
$searchForm .= '<select name="bookmark" id="boxbookmark" class="topmenu-bookmark-dropdown .dropdown-toggle maxwidth100">';
|
||||
//$searchForm .= '<option>--'.$langs->trans("Bookmarks").'--</option>';
|
||||
$searchForm .= '<option hidden value="listbookmarks" class="optiongrey" selected rel="'.DOL_URL_ROOT.'/bookmarks/list.php">'.$langs->trans('Bookmarks').'</option>';
|
||||
$searchForm .= '<option value="listbookmark" class="optionblue" rel="'.dol_escape_htmltag(DOL_URL_ROOT.'/bookmarks/list.php').'" ';
|
||||
|
|
|
|||
|
|
@ -9969,7 +9969,7 @@ class Form
|
|||
$ret .= '<a href="' . DOL_URL_ROOT . '/viewimage.php?modulepart=' . $modulepart . '&entity=' . $entity . '&file=' . urlencode($originalfile) . '&cache=' . $cache . '">';
|
||||
}
|
||||
}
|
||||
$ret .= '<img alt="Photo" class="photo' . $modulepart . ($cssclass ? ' ' . $cssclass : '') . ' photologo' . (preg_replace('/[^a-z]/i', '_', $file)) . '" ' . ($width ? ' width="' . $width . '"' : '') . ($height ? ' height="' . $height . '"' : '') . ' src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=' . $modulepart . '&entity=' . $entity . '&file=' . urlencode($file) . '&cache=' . $cache . '">';
|
||||
$ret .= '<img alt="" class="photo' . $modulepart . ($cssclass ? ' ' . $cssclass : '') . ' photologo' . (preg_replace('/[^a-z]/i', '_', $file)) . '" ' . ($width ? ' width="' . $width . '"' : '') . ($height ? ' height="' . $height . '"' : '') . ' src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=' . $modulepart . '&entity=' . $entity . '&file=' . urlencode($file) . '&cache=' . $cache . '">';
|
||||
if ($addlinktofullsize) {
|
||||
$ret .= '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2335,7 +2335,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
|
|||
if (empty($tabsname)) {
|
||||
$tabsname = str_replace("@", "", $picto);
|
||||
}
|
||||
$out .= '<div id="moretabs'.$tabsname.'" class="inline-block tabsElem valignmiddle">';
|
||||
$out .= '<div id="moretabs'.$tabsname.'" class="inline-block tabsElem">';
|
||||
$out .= '<div class="tab"><a href="#" class="tab moretab inline-block tabunactive"><span class="hideonsmartphone">'.$langs->trans("More").'</span>... ('.$nbintab.')</a></div>'; // Do not use "reposition" class in the "More".
|
||||
$out .= '<div id="moretabsList'.$tabsname.'" style="width: '.$widthofpopup.'px; position: absolute; '.$left.': -999em; text-align: '.$left.'; margin:0px; padding:2px; z-index:10;">';
|
||||
$out .= $outmore;
|
||||
|
|
|
|||
|
|
@ -526,14 +526,14 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||
/*
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("TopMenuDisableImages").'</td>';
|
||||
print '<td>'.($conf->global->THEME_TOPMENU_DISABLE_IMAGE?$conf->global->THEME_TOPMENU_DISABLE_IMAGE:$langs->trans("Default")).'</td>';
|
||||
print '<td>'.(getDolGlobalString('THEME_TOPMENU_DISABLE_IMAGE',$langs->trans("Default")).'</td>';
|
||||
print '<td class="left" class="nowrap" width="20%"><input name="check_THEME_TOPMENU_DISABLE_IMAGE" id="check_THEME_TOPMENU_DISABLE_IMAGE" type="checkbox" '.(!empty($object->conf->THEME_ELDY_TEXTLINK)?" checked":"");
|
||||
print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo
|
||||
print '> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td>';
|
||||
if ($edit)
|
||||
{
|
||||
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_TOPMENU_DISABLE_IMAGE,array()),''),'THEME_TOPMENU_DISABLE_IMAGE','',1).' ';
|
||||
print $formother->selectColor(colorArrayToHex(colorStringToArray(getDolGlobalString('THEME_TOPMENU_DISABLE_IMAGE'),array()),''),'THEME_TOPMENU_DISABLE_IMAGE','',1).' ';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -193,10 +193,8 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout
|
|||
*/
|
||||
function print_start_menu_array_auguria()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
print '<div class="tmenudiv">';
|
||||
print '<ul role="navigation" class="tmenu"'.(!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? '' : ' title="Top menu"').'>';
|
||||
print '<ul role="navigation" class="tmenu"'.(getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? ' alt="Top menu"' : '').'>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -607,10 +607,8 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
|
|||
*/
|
||||
function print_start_menu_array()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
print '<div class="tmenudiv">';
|
||||
print '<ul role="navigation" class="tmenu"'.(!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? '' : ' title="Top menu"').'>';
|
||||
print '<ul role="navigation" class="tmenu"'.(getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? ' title="Top menu"' : '').'>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -645,12 +643,12 @@ function print_start_menu_entry($idsel, $classname, $showmode)
|
|||
*/
|
||||
function print_text_menu_entry($text, $showmode, $url, $id, $idsel, $classname, $atarget, $menuval = array())
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $langs;
|
||||
|
||||
$classnameimg = str_replace('class="', 'class="tmenuimage ', $classname);
|
||||
$classnametxt = str_replace('class="', 'class="tmenulabel ', $classname);
|
||||
|
||||
//$conf->global->THEME_TOPMENU_DISABLE_TEXT=1;
|
||||
//$conf->global->THEME_TOPMENU_DISABLE_IMAGE=1;
|
||||
if ($showmode == 1) {
|
||||
print '<a '.$classnameimg.' tabindex="-1" href="'.$url.'"'.($atarget ? ' target="'.$atarget.'"' : '').' title="'.dol_escape_htmltag($text).'">';
|
||||
print '<div class="'.$id.' '.$idsel.' topmenuimage">';
|
||||
|
|
|
|||
|
|
@ -477,10 +477,8 @@ class MenuManager
|
|||
*/
|
||||
function print_start_menu_array_empty()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
print '<div class="tmenudiv">';
|
||||
print '<ul role="navigation" class="tmenu"'.(!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? '' : ' title="Top menu"').'>';
|
||||
print '<ul role="navigation" class="tmenu"'.(getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? ' title="Top menu"' : '').'>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1273,3 +1273,6 @@ FillMessageWithALayout=Fill message with a layout
|
|||
FillMessageWithAIContent=Fill message with AI content
|
||||
EnterYourAIPromptHere=Enter your AI prompt here
|
||||
UseOrOperatorShort=or
|
||||
GoOnList=Go on list
|
||||
ShowSearchFields=Do a search
|
||||
MyUserCard=My user file
|
||||
|
|
@ -1330,7 +1330,12 @@ if (GETPOSTINT('nojs')) { // If javascript was not disabled on URL
|
|||
// Set MAIN_OPTIMIZEFORTEXTBROWSER for user (must be after login part)
|
||||
if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') && !empty($user->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
$conf->global->MAIN_OPTIMIZEFORTEXTBROWSER = $user->conf->MAIN_OPTIMIZEFORTEXTBROWSER;
|
||||
if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') == 1) {
|
||||
$conf->global->THEME_TOPMENU_DISABLE_IMAGE = 1;
|
||||
}
|
||||
}
|
||||
//var_dump($conf->global->THEME_TOPMENU_DISABLE_IMAGE);
|
||||
//var_dump($user->conf->THEME_TOPMENU_DISABLE_IMAGE);
|
||||
|
||||
// set MAIN_OPTIMIZEFORCOLORBLIND for user
|
||||
$conf->global->MAIN_OPTIMIZEFORCOLORBLIND = empty($user->conf->MAIN_OPTIMIZEFORCOLORBLIND) ? '' : $user->conf->MAIN_OPTIMIZEFORCOLORBLIND;
|
||||
|
|
@ -2419,8 +2424,8 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
|
|||
$nophoto = '/public/theme/common/user_woman.png';
|
||||
}
|
||||
|
||||
$userImage = '<img class="photo photouserphoto userphoto" alt="No photo" src="'.DOL_URL_ROOT.$nophoto.'">';
|
||||
$userDropDownImage = '<img class="photo dropdown-user-image" alt="No photo" src="'.DOL_URL_ROOT.$nophoto.'">';
|
||||
$userImage = '<img class="photo photouserphoto userphoto" alt="" src="'.DOL_URL_ROOT.$nophoto.'">';
|
||||
$userDropDownImage = '<img class="photo dropdown-user-image" alt="" src="'.DOL_URL_ROOT.$nophoto.'">';
|
||||
}
|
||||
|
||||
$dropdownBody = '';
|
||||
|
|
@ -2605,7 +2610,7 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
|
|||
} else {
|
||||
$btnUser = '<!-- div for user link -->
|
||||
<div id="topmenu-login-dropdown" class="userimg atoplogin dropdown user user-menu inline-block">
|
||||
<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$user->id.'">
|
||||
<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$user->id.'" alt="'.$langs->trans("MyUserCard").'">
|
||||
'.$userImage.'
|
||||
<span class="hidden-xs maxwidth200 atoploginusername hideonsmartphone">'.dol_trunc($user->firstname ? $user->firstname : $user->login, 10).'</span>
|
||||
</a>
|
||||
|
|
@ -3265,7 +3270,7 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_
|
|||
// Left column
|
||||
print '<!-- Begin left menu -->'."\n";
|
||||
|
||||
print '<div class="vmenu"'.(!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? '' : ' title="Left menu"').'>'."\n\n";
|
||||
print '<div class="vmenu"'.(getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? ' alt="Left menu"' : '').'>'."\n\n";
|
||||
|
||||
// Show left menu with other forms
|
||||
$menumanager->menu_array = $menu_array_before;
|
||||
|
|
|
|||
|
|
@ -79,8 +79,6 @@ if (getDolGlobalString('MAIN_SEARCH_FORM_ON_HOME_AREAS')) { // This may be u
|
|||
* Draft receptions
|
||||
*/
|
||||
|
||||
$clause = " WHERE ";
|
||||
|
||||
$sql = "SELECT e.rowid, e.ref, e.ref_supplier,";
|
||||
$sql .= " s.nom as name, s.rowid as socid,";
|
||||
$sql .= " c.ref as commande_fournisseur_ref, c.rowid as commande_fournisseur_id";
|
||||
|
|
@ -89,11 +87,9 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_t
|
|||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande_fournisseur as c ON el.fk_source = c.rowid";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc";
|
||||
if (!$user->hasRight('societe', 'client', 'voir')) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc";
|
||||
$sql .= $clause." sc.fk_user = ".((int) $user->id);
|
||||
$clause = " AND ";
|
||||
$sql .= " AND EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = e.fk_soc AND sc.fk_user = ".((int) $user->id).")";
|
||||
}
|
||||
$sql .= $clause." e.fk_statut = 0";
|
||||
$sql .= " WHERE e.fk_statut = 0";
|
||||
$sql .= " AND e.entity IN (".getEntity('reception').")";
|
||||
if ($socid) {
|
||||
$sql .= " AND c.fk_soc = ".((int) $socid);
|
||||
|
|
@ -213,9 +209,6 @@ if ($resql) {
|
|||
$sql = "SELECT c.rowid, c.ref, c.ref_supplier as ref_supplier, c.fk_statut as status, c.billed as billed, s.nom as name, s.rowid as socid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c,";
|
||||
$sql .= " ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->hasRight('societe', 'client', 'voir')) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
}
|
||||
$sql .= " WHERE c.fk_soc = s.rowid";
|
||||
$sql .= " AND c.entity IN (".getEntity('supplier_order').")";
|
||||
$sql .= " AND c.fk_statut IN (".CommandeFournisseur::STATUS_ORDERSENT.", ".CommandeFournisseur::STATUS_RECEIVED_PARTIALLY.")";
|
||||
|
|
@ -223,7 +216,7 @@ if ($socid > 0) {
|
|||
$sql .= " AND c.fk_soc = ".((int) $socid);
|
||||
}
|
||||
if (!$user->hasRight('societe', 'client', 'voir')) {
|
||||
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
|
||||
$sql .= " AND EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = c.fk_soc AND sc.fk_user = ".((int) $user->id).")";
|
||||
}
|
||||
$sql .= " ORDER BY c.rowid ASC";
|
||||
$resql = $db->query($sql);
|
||||
|
|
@ -236,7 +229,8 @@ if ($resql) {
|
|||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th colspan="3">'.$langs->trans("SuppliersOrdersToProcess").' <span class="badge">'.$num.'</span></th></tr>';
|
||||
print '<th colspan="3">'.$langs->trans("SuppliersOrdersToProcess");
|
||||
print ' <a href="'.DOL_URL_ROOT.'/reception/list.php?search_status=1" alt="'.$langs->trans("GoOnList").'"><span class="badge">'.$num.'</span></a>';
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
|
|
|
|||
|
|
@ -328,7 +328,9 @@ if (isModEnabled('supplier_proposal') && $user->hasRight('supplier_proposal', 'l
|
|||
if ($num > 0) {
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><th colspan="5">'.$langs->trans("RequestsOpened").' <a href="'.DOL_URL_ROOT.'/supplier_proposal/list.php?search_status=1"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
print '<tr class="liste_titre"><th colspan="5">'.$langs->trans("RequestsOpened");
|
||||
print ' <a href="'.DOL_URL_ROOT.'/supplier_proposal/list.php?search_status=1" alt="'.$langs->trans("GoOnList").'"><span class="badge">'.$num.'</span></a>';
|
||||
print '</th></tr>';
|
||||
|
||||
$nbofloop = min($num, (!getDolGlobalString('MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||
while ($i < $nbofloop) {
|
||||
|
|
|
|||
|
|
@ -156,8 +156,9 @@ div#topmenu-global-search-dropdown a::after, div#topmenu-quickadd-dropdown a::af
|
|||
}
|
||||
|
||||
/*
|
||||
* MENU Dropdown
|
||||
*/
|
||||
* MENU Dropdown
|
||||
*/
|
||||
|
||||
.login_block.usedropdown .logout-btn{
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -207,7 +208,7 @@ div#topmenu-global-search-dropdown a::after, div#topmenu-quickadd-dropdown a::af
|
|||
}
|
||||
|
||||
div#topmenu-global-search-dropdown, div#topmenu-bookmark-dropdown, div#topmenu-quickadd-dropdown {
|
||||
<?php if (!getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE')) { ?>
|
||||
<?php if (!$disableimages) { ?>
|
||||
line-height: 46px;
|
||||
<?php } ?>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ $heightmenu = 50; /* height of top menu, part with image */
|
|||
$heightmenu2 = 49; /* height of top menu, part with login */
|
||||
$disableimages = 0;
|
||||
$maxwidthloginblock = 180;
|
||||
if (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 1) {
|
||||
if (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 1 || !empty($user->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
$disableimages = 1;
|
||||
$maxwidthloginblock = $maxwidthloginblock + 50;
|
||||
$minwidthtmenu = 0;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ div#topmenu-quickadd-dropdown {
|
|||
}
|
||||
div#topmenu-bookmark-dropdown {
|
||||
position: fixed;
|
||||
<?php echo $right; ?>: 55px;
|
||||
<?php echo $right; ?>: <?php print empty($user->conf->MAIN_OPTIMIZEFORTEXTBROWSER) ? 55 : 85; ?>px;
|
||||
top: 0px;
|
||||
}
|
||||
div#topmenu-login-dropdown {
|
||||
|
|
@ -135,7 +135,7 @@ button.dropdown-item.global-search-item {
|
|||
|
||||
|
||||
/* CSS to hide the arrow to show open/close */
|
||||
div#topmenu-global-search-dropdown, , div#topmenu-quickadd-dropdown, div#topmenu-bookmark-dropdown {
|
||||
div#topmenu-global-search-dropdown, div#topmenu-quickadd-dropdown, div#topmenu-bookmark-dropdown {
|
||||
padding-right: 2px;
|
||||
}
|
||||
div#topmenu-global-search-dropdown a::after, div#topmenu-quickadd-dropdown a::after, div#topmenu-bookmark-dropdown a::after {
|
||||
|
|
@ -221,7 +221,11 @@ div#topmenu-global-search-dropdown a::after, div#topmenu-quickadd-dropdown a::af
|
|||
}
|
||||
|
||||
div#topmenu-global-search-dropdown, div#topmenu-quickadd-dropdown, div#topmenu-bookmark-dropdown, div#topmenu-login-dropdown {
|
||||
line-height: <?php echo(getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 1 ? '35' : '46'); ?>px;
|
||||
<?php if ($disableimages) { ?>
|
||||
line-height: 35px;
|
||||
<?php } else { ?>
|
||||
line-height: 46px;
|
||||
<?php } ?>
|
||||
}
|
||||
a.top-menu-dropdown-link {
|
||||
padding: 8px;
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
|||
if (empty($user->id) && !empty($_SESSION['dol_login'])) {
|
||||
$user->fetch('', $_SESSION['dol_login'], '', 1);
|
||||
$user->getrights();
|
||||
//$user->loadPersonalConf();
|
||||
|
||||
// Reload menu now we have the good user (and we need the good menu to have ->showmenu('topnb') correct.
|
||||
$menumanager = new MenuManager($db, empty($user->socid) ? 0 : 1);
|
||||
|
|
@ -2775,7 +2776,7 @@ $heightmenu = 48; /* height of top menu, part with image */
|
|||
$heightmenu2 = 48; /* height of top menu, ârt with login */
|
||||
$disableimages = 0;
|
||||
$maxwidthloginblock = 110;
|
||||
if (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 1) {
|
||||
if (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 1 || !empty($user->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
$heightmenu = 30;
|
||||
$disableimages = 1;
|
||||
$maxwidthloginblock = 180;
|
||||
|
|
|
|||
Loading…
Reference in a new issue