diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index b6cc390ca33..6370062a6a9 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -379,16 +379,6 @@ class Conf $this->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER=1; } - if (! empty($conf->productbatch->enabled)) - { - $this->global->STOCK_CALCULATE_ON_BILL=0; - $this->global->STOCK_CALCULATE_ON_VALIDATE_ORDER=0; - $this->global->STOCK_CALCULATE_ON_SHIPMENT=1; - $this->global->STOCK_CALCULATE_ON_SUPPLIER_BILL=0; - $this->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER=0; - $this->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER=1; - } - // conf->currency if (empty($this->global->MAIN_MONNAIE)) $this->global->MAIN_MONNAIE='EUR'; $this->currency=$this->global->MAIN_MONNAIE; @@ -448,6 +438,9 @@ class Conf // Default pdf use dash between lines if (! isset($this->global->MAIN_PDF_DASH_BETWEEN_LINES)) $this->global->MAIN_PDF_DASH_BETWEEN_LINES=1; + // Set default value to MAIN_SHOW_LOGO + if (! isset($this->global->MAIN_SHOW_LOGO)) $this->global->MAIN_SHOW_LOGO=1; + // Default max file size for upload $this->maxfilesize = (empty($this->global->MAIN_UPLOAD_DOC) ? 0 : $this->global->MAIN_UPLOAD_DOC * 1024); @@ -455,8 +448,8 @@ class Conf if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,askpricesupplier,facture,categorie,commande,fournisseur,contact,propal,projet,contrat,societe,ficheinter,expedition,agenda,adherent'; // '' means 'all'. Note that contact is added here as it should be a module later. // Enable select2 - if (empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)) $conf->global->MAIN_USE_JQUERY_MULTISELECT='select2'; - + if (empty($this->global->MAIN_USE_JQUERY_MULTISELECT)) $this->global->MAIN_USE_JQUERY_MULTISELECT='select2'; + // Timeouts if (empty($this->global->MAIN_USE_CONNECT_TIMEOUT)) $this->global->MAIN_USE_CONNECT_TIMEOUT=10; if (empty($this->global->MAIN_USE_RESPONSE_TIMEOUT)) $this->global->MAIN_USE_RESPONSE_TIMEOUT=30; diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index aa92e6ee50f..8d54d05a810 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -91,7 +91,8 @@ class Notify $error=0; $num=0; - $valueforthreshold = $object->total_ht; + $valueforthreshold = 0; + if (is_object($object)) $valueforthreshold = $object->total_ht; if (! $error) { @@ -103,8 +104,11 @@ class Notify $sql.= " WHERE n.fk_contact = c.rowid"; $sql.= " AND a.rowid = n.fk_action"; $sql.= " AND n.fk_soc = s.rowid"; - if (is_numeric($notifcode)) $sql.= " AND n.fk_action = ".$notifcode; // Old usage - else $sql.= " AND a.code = '".$notifcode."'"; // New usage + if ($notifcode) + { + if (is_numeric($notifcode)) $sql.= " AND n.fk_action = ".$notifcode; // Old usage + else $sql.= " AND a.code = '".$notifcode."'"; // New usage + } $sql.= " AND s.entity IN (".getEntity('societe', 1).")"; if ($socid > 0) $sql.= " AND s.rowid = ".$socid; @@ -125,16 +129,21 @@ class Notify if (! $error) { + // List of notifications enabled for fixed email foreach($conf->global as $key => $val) { - if ($val == '' || ! preg_match('/^NOTIFICATION_FIXEDEMAIL_'.$notifcode.'_THRESHOLD_HIGHER_(.*)$/', $key, $reg)) continue; + if ($notifcode) + { + if ($val == '' || ! preg_match('/^NOTIFICATION_FIXEDEMAIL_'.$notifcode.'_THRESHOLD_HIGHER_(.*)$/', $key, $reg)) continue; + } + else + { + if ($val == '' || ! preg_match('/^NOTIFICATION_FIXEDEMAIL_.*_THRESHOLD_HIGHER_(.*)$/', $key, $reg)) continue; + } $threshold = (float) $reg[1]; - if ($valueforthreshold <= $threshold) - { - continue; - } + if ($valueforthreshold < $threshold) continue; $tmpemail=explode(',',$val); $num+=count($tmpemail); diff --git a/htdocs/core/get_menudiv.php b/htdocs/core/get_menudiv.php index b52c1f73c98..b8eae83d4eb 100644 --- a/htdocs/core/get_menudiv.php +++ b/htdocs/core/get_menudiv.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2015 Laurent Destailleur * * This file is a modified version of datepicker.php from phpBSM to fix some * bugs, to add new features and to dramatically increase speed. diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index cfa5a945841..8abdf32c635 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -471,7 +471,7 @@ function show_projects($conf,$langs,$db,$object,$backtopage='') print_fiche_titre($langs->trans("ProjectsDedicatedToThisThirdParty"),$buttoncreate,''); print "\n".''; - $sql = "SELECT p.rowid,p.title,p.ref,p.public, p.dateo as do, p.datee as de"; + $sql = "SELECT p.rowid as id, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql .= " WHERE p.fk_soc = ".$object->id; $sql .= " ORDER BY p.dateo DESC"; @@ -483,23 +483,24 @@ function show_projects($conf,$langs,$db,$object,$backtopage='') print ''; print ''; + print ''; print ''; if ($num > 0) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; - $projectstatic = new Project($db); + $projecttmp = new Project($db); $i=0; $var=false; while ($i < $num) { $obj = $db->fetch_object($result); - $projectstatic->fetch($obj->rowid); + $projecttmp->fetch($obj->id); // To verify role of users - $userAccess = $projectstatic->restrictedProjectArea($user); + $userAccess = $projecttmp->restrictedProjectArea($user); if ($user->rights->projet->lire && $userAccess > 0) { @@ -507,13 +508,15 @@ function show_projects($conf,$langs,$db,$object,$backtopage='') print ""; // Ref - print ''; + print ''; // Label print ''; // Date start print ''; // Date end print ''; + // Status + print ''; print ''; } diff --git a/htdocs/core/login/functions_dolibarr.php b/htdocs/core/login/functions_dolibarr.php index 0a0ab1e8bfe..69aec814413 100644 --- a/htdocs/core/login/functions_dolibarr.php +++ b/htdocs/core/login/functions_dolibarr.php @@ -36,9 +36,6 @@ function check_user_password_dolibarr($usertotest,$passwordtotest,$entitytotest=1) { global $db,$conf,$langs; - global $mc; - - dol_syslog("functions_dolibarr::check_user_password_dolibarr usertotest=".$usertotest); // Force master entity in transversal mode $entity=$entitytotest; @@ -48,6 +45,8 @@ function check_user_password_dolibarr($usertotest,$passwordtotest,$entitytotest= if (! empty($usertotest)) { + dol_syslog("functions_dolibarr::check_user_password_dolibarr usertotest=".$usertotest." passwordtotest=".preg_replace('/./','*',$passwordtotest)." entitytotest=".$entitytotest); + // If test username/password asked, we define $test=false and $login var if ok, set $_SESSION["dol_loginmesg"] if ko $table = MAIN_DB_PREFIX."user"; $usernamecol1 = 'login'; @@ -60,7 +59,6 @@ function check_user_password_dolibarr($usertotest,$passwordtotest,$entitytotest= if (preg_match('/@/',$usertotest)) $sql.=' OR '.$usernamecol2." = '".$db->escape($usertotest)."'"; $sql.=') AND '.$entitycol." IN (0," . ($entity ? $entity : 1) . ")"; - dol_syslog("functions_dolibarr::check_user_password_dolibarr", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -99,12 +97,6 @@ function check_user_password_dolibarr($usertotest,$passwordtotest,$entitytotest= } } - if ($passok && ! empty($obj->entity) && (! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode))) - { - $ret=$mc->checkRight($obj->rowid, $entitytotest); // The module multicompany check here user belong to at least one group into company. This is a bugged behaviour, so you must hack module to make thing working. - if ($ret < 0) $passok=false; - } - // Password ok ? if ($passok) { @@ -112,12 +104,24 @@ function check_user_password_dolibarr($usertotest,$passwordtotest,$entitytotest= } else { - dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ko bad password pour '".$usertotest."'"); + dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ko bad password for '".$usertotest."'"); sleep(1); $langs->load('main'); $langs->load('errors'); $_SESSION["dol_loginmesg"]=$langs->trans("ErrorBadLoginPassword"); } + + if ($passok && ! empty($conf->multicompany->enabled)) // We must check entity + { + global $mc; + + $ret=$mc->checkRight($obj->rowid, $entitytotest); + if ($ret < 0) + { + dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ko entity '".$entitytotest."' not allowed for user '".$obj->rowid."'"); + $login=''; // force authentication failure + } + } } else { diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php index a67bc040e2f..208ccd0c37c 100644 --- a/htdocs/core/login/functions_ldap.php +++ b/htdocs/core/login/functions_ldap.php @@ -34,7 +34,8 @@ */ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest) { - global $_POST,$db,$conf,$langs; + global $db,$conf,$langs; + global $_POST; global $dolibarr_main_auth_ldap_host,$dolibarr_main_auth_ldap_port; global $dolibarr_main_auth_ldap_version,$dolibarr_main_auth_ldap_servertype; global $dolibarr_main_auth_ldap_login_attribute,$dolibarr_main_auth_ldap_dn; @@ -42,6 +43,13 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest) global $dolibarr_main_auth_ldap_filter; global $dolibarr_main_auth_ldap_debug; + // Force master entity in transversal mode + $entity=$entitytotest; + if (! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)) $entity=1; + + $login=''; + $resultFetchUser=''; + if (! function_exists("ldap_connect")) { dol_syslog("functions_ldap::check_user_password_ldap Authentification ko failed to connect to LDAP. LDAP functions are disabled on this PHP"); @@ -52,11 +60,10 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest) return; } - $login=''; - $resultFetchUser=''; - - if (!empty($_POST["username"]) || $usertotest) + if ($usertotest) { + dol_syslog("functions_ldap::check_user_password_ldap usertotest=".$usertotest." passwordtotest=".preg_replace('/./','*',$passwordtotest)." entitytotest=".$entitytotest); + // If test username/password asked, we define $test=false and $login var if ok, set $_SESSION["dol_loginmesg"] if ko $ldaphost=$dolibarr_main_auth_ldap_host; $ldapport=$dolibarr_main_auth_ldap_port; @@ -80,7 +87,6 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest) $ldap->searchUser=$ldapadminlogin; $ldap->searchPassword=$ldapadminpass; - dol_syslog("functions_ldap::check_user_password_ldap usertotest=".$usertotest); if ($ldapdebug) { dol_syslog("functions_ldap::check_user_password_ldap Server:".join(',',$ldap->server).", Port:".$ldap->serverPort.", Protocol:".$ldap->ldapProtocolVersion.", Type:".$ldap->serverType); @@ -146,52 +152,56 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest) $login=$usertotest; // ldap2dolibarr synchronisation - if ($login && ! empty($conf->ldap->enabled) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr') + if ($login && ! empty($conf->ldap->enabled) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr') // ldap2dolibarr synchronisation { - dol_syslog("functions_ldap::check_user_password_ldap Sync ldap2dolibarr"); + dol_syslog("functions_ldap::check_user_password_ldap Sync ldap2dolibarr"); - // On charge les attributs du user ldap - if ($ldapdebug) print "DEBUG: login ldap = ".$login."
\n"; - $resultFetchLdapUser = $ldap->fetch($login,$userSearchFilter); + // On charge les attributs du user ldap + if ($ldapdebug) print "DEBUG: login ldap = ".$login."
\n"; + $resultFetchLdapUser = $ldap->fetch($login,$userSearchFilter); - if ($ldapdebug) print "DEBUG: UACF = ".join(',',$ldap->uacf)."
\n"; - if ($ldapdebug) print "DEBUG: pwdLastSet = ".dol_print_date($ldap->pwdlastset,'day')."
\n"; - if ($ldapdebug) print "DEBUG: badPasswordTime = ".dol_print_date($ldap->badpwdtime,'day')."
\n"; + if ($ldapdebug) print "DEBUG: UACF = ".join(',',$ldap->uacf)."
\n"; + if ($ldapdebug) print "DEBUG: pwdLastSet = ".dol_print_date($ldap->pwdlastset,'day')."
\n"; + if ($ldapdebug) print "DEBUG: badPasswordTime = ".dol_print_date($ldap->badpwdtime,'day')."
\n"; - // On recherche le user dolibarr en fonction de son SID ldap - $sid = $ldap->getObjectSid($login); - if ($ldapdebug) print "DEBUG: sid = ".$sid."
\n"; + // On recherche le user dolibarr en fonction de son SID ldap + $sid = $ldap->getObjectSid($login); + if ($ldapdebug) print "DEBUG: sid = ".$sid."
\n"; - $user=new User($db); - $resultFetchUser=$user->fetch('',$login,$sid); - if ($resultFetchUser > 0) - { - dol_syslog("functions_ldap::check_user_password_ldap Sync user found id=".$user->id); - // On verifie si le login a change et on met a jour les attributs dolibarr - - if ($conf->multicompany->enabled) + $usertmp=new User($db); + $resultFetchUser=$usertmp->fetch('',$login,$sid); + if ($resultFetchUser > 0) { - global $mc; + dol_syslog("functions_ldap::check_user_password_ldap Sync user found user id=".$usertmp->id); + // On verifie si le login a change et on met a jour les attributs dolibarr - $ret=$mc->checkRight($user->id, $entitytotest, $user); // The module multicompany check here user belong to at least one group into company. This is a bugged behaviour, so you must hack module to make thing working. - if ($ret < 0) + if ($usertmp->login != $ldap->login && $ldap->login) { - dol_syslog("Failed to checkRight by module multicompany for user id = ".$user->id." into entity ".$entitytotest); - $login=false; // force error of authentication + $usertmp->login = $ldap->login; + $usertmp->update($usertmp); + // TODO Que faire si update echoue car on update avec un login deja existant. } + + //$resultUpdate = $usertmp->update_ldap2dolibarr($ldap); } - - - if ($user->login != $ldap->login && $ldap->login) - { - $user->login = $ldap->login; - $user->update($user); - // TODO Que faire si update echoue car on update avec un login deja existant. - } - - //$resultUpdate = $user->update_ldap2dolibarr($ldap); - } + unset($usertmp); } + + if (! empty($conf->multicompany->enabled)) // We must check entity (even if sync is not active) + { + global $mc; + + $usertmp=new User($db); + $usertmp->fetch('',$login); + $ret=$mc->checkRight($usertmp->id, $entitytotest); + if ($ret < 0) + { + dol_syslog("functions_ldap::check_user_password_ldap Authentification ko entity '".$entitytotest."' not allowed for user '".$usertmp->id."'"); + $login=''; // force authentication failure + } + unset($usertmp); + } + } if ($result == 1) { diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index cbc73b2767d..59c0329b172 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -220,22 +220,27 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM $leftmenu=($forceleftmenu?'':(empty($_SESSION["leftmenu"])?'none':$_SESSION["leftmenu"])); // Show logo company - if (empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO)) + if (empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI; if (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_mini); - print "\n".''."\n"; - print '
'."\n"; - print ''; - print ''; - print ''; - print ''; - print '
'."\n"; } + else + { + $urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo.png'; + } + $title=$langs->trans("GoIntoSetupToChangeLogo"); + print "\n".''."\n"; + print '
'."\n"; + print ''; + print ''; + print ''; + print ''; + print '
'."\n"; } // We update newmenu with entries found into database diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index 36ecfd7effa..b54c746388e 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -218,18 +218,42 @@ class MenuManager } foreach($submenu->liste as $key2 => $val2) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu' { - $relurl2=dol_buildpath($val2['url'],1); - $relurl2=preg_replace('/__LOGIN__/',$user->login,$relurl2); - $relurl2=preg_replace('/__USERID__/',$user->id,$relurl2); - $canonurl2=preg_replace('/\?.*$/','',$val2['url']); - //var_dump($val2['url'].' - '.$canonurl2.' - '.$val2['level']); - if (in_array($canonurl2,array('/admin/index.php','/admin/tools/index.php','/core/tools.php'))) $relurl2=''; - if ($val2['level']==0) print str_pad('',$val2['level']+1).''; // ui-btn to highlight on clic - else print str_pad('',$val2['level']+1).'
  • '; // ui-btn to highlight on clic - if ($relurl2) print ''; - print $val2['titre']; - if ($relurl2) print ''; - print '
  • '."\n"; + $showmenu=true; + if (! empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) && empty($val2['enabled'])) $showmenu=false; + + if ($showmenu) // Visible (option to hide when not allowed is off or allowed) + { + $relurl2=dol_buildpath($val2['url'],1); + $relurl2=preg_replace('/__LOGIN__/',$user->login,$relurl2); + $relurl2=preg_replace('/__USERID__/',$user->id,$relurl2); + $canonurl2=preg_replace('/\?.*$/','',$val2['url']); + //var_dump($val2['url'].' - '.$canonurl2.' - '.$val2['level']); + if (in_array($canonurl2,array('/admin/index.php','/admin/tools/index.php','/core/tools.php'))) $relurl2=''; + if ($val2['level']==0) print str_pad('',$val2['level']+1).''; // ui-btn to highlight on clic + else print str_pad('',$val2['level']+1).'
  • '; // ui-btn to highlight on clic + if ($relurl2) + { + if ($val2['enabled']) // Allowed + { + print ''; + } + else // Not allowed but visible (greyed) + { + print ''; + } + } + print $val2['titre']; + if ($relurl2) + { + if ($val2['enabled']) // Allowed + print ''; + else + print ''; + } + print '
  • '."\n"; + } } //var_dump($submenu); print ''; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index c4e04c6d507..b6122c095a2 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -426,22 +426,27 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $leftmenu=($forceleftmenu?'':(empty($_SESSION["leftmenu"])?'none':$_SESSION["leftmenu"])); // Show logo company - if (empty($conf->global->MAIN_MENU_INVERT) && empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO)) + if (empty($conf->global->MAIN_MENU_INVERT) && empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI; if (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_mini); - print "\n".''."\n"; - print '
    '."\n"; - print ''; - print ''; - print ''; - print ''; - print '
    '."\n"; } + else + { + $urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo.png'; + } + $title=$langs->trans("GoIntoSetupToChangeLogo"); + print "\n".''."\n"; + print '
    '."\n"; + print ''; + print ''; + print ''; + print ''; + print '
    '."\n"; } /** @@ -824,7 +829,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (empty($leftmenu) || preg_match('/^tax_salary/i',$leftmenu)) $newmenu->add("/compta/salaries/card.php?leftmenu=tax_salary&action=create",$langs->trans("NewPayment"),2,$user->rights->salaries->write); if (empty($leftmenu) || preg_match('/^tax_salary/i',$leftmenu)) $newmenu->add("/compta/salaries/index.php?leftmenu=tax_salary",$langs->trans("Payments"),2,$user->rights->salaries->read); } - + // Loan if (! empty($conf->loan->enabled)) { diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index 40d1d562552..fc66eef7fd6 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -150,6 +150,7 @@ class MenuManager { print '
      '; print '
    • '; + if ($val['enabled'] == 1) { $relurl=dol_buildpath($val['url'],1); @@ -184,23 +185,42 @@ class MenuManager } foreach($submenu->liste as $key2 => $val2) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'] { - $relurl2=dol_buildpath($val2['url'],1); - $relurl2=preg_replace('/__LOGIN__/',$user->login,$relurl2); - $relurl2=preg_replace('/__USERID__/',$user->id,$relurl2); - $canonurl2=preg_replace('/\?.*$/','',$val2['url']); - //var_dump($val2['url'].' - '.$canonurl2.' - '.$val2['level']); - if (in_array($canonurl2,array('/admin/index.php','/admin/tools/index.php','/core/tools.php'))) $relurl2=''; - if ($val2['level']==0) print str_pad('',$val2['level']+1).''; // ui-btn to highlight on clic - else print str_pad('',$val2['level']+1).'
    • '; // ui-btn to highlight on clic - if ($relurl2) - { - print ''; - } - print $val2['titre']; - if ($relurl2) print ''; - print '
    • '."\n"; + $showmenu=true; + if (! empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) && empty($val2['enabled'])) $showmenu=false; + + if ($showmenu) // Visible (option to hide when not allowed is off or allowed) + { + $relurl2=dol_buildpath($val2['url'],1); + $relurl2=preg_replace('/__LOGIN__/',$user->login,$relurl2); + $relurl2=preg_replace('/__USERID__/',$user->id,$relurl2); + $canonurl2=preg_replace('/\?.*$/','',$val2['url']); + //var_dump($val2['url'].' - '.$canonurl2.' - '.$val2['level']); + if (in_array($canonurl2,array('/admin/index.php','/admin/tools/index.php','/core/tools.php'))) $relurl2=''; + if ($val2['level']==0) print str_pad('',$val2['level']+1).''; // ui-btn to highlight on clic + else print str_pad('',$val2['level']+1).'
    • '; // ui-btn to highlight on clic + if ($relurl2) + { + if ($val2['enabled']) // Allowed + { + print ''; + } + else // Not allowed but visible (greyed) + { + print ''; + } + } + print $val2['titre']; + if ($relurl2) + { + if ($val2['enabled']) // Allowed + print ''; + else + print ''; + } + print '
    • '."\n"; + } } //var_dump($submenu); print '
    '; diff --git a/htdocs/core/modules/modResource.class.php b/htdocs/core/modules/modResource.class.php index 9acebd5d90d..e63f44c3945 100644 --- a/htdocs/core/modules/modResource.class.php +++ b/htdocs/core/modules/modResource.class.php @@ -59,7 +59,7 @@ class modResource extends DolibarrModules // Module description // used if translation string 'ModuleXXXDesc' not found // (where XXX is value of numeric property 'numero' of module) - $this->description = "Description of module Resource"; + $this->description = "Manage resources (printers, cars, room, ...) you can then share into events"; // Possible values for version are: 'development', 'experimental' or version $this->version = 'development'; // Key used in llx_const table to save module status enabled/disabled diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 3c2844f3fe4..e543c269fb4 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -100,7 +100,7 @@ if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->ex if ($result < 0) { setEventMessage($object->error,'errors'); } - else + else { $res = $object->reprogram_jobs($user->login); if ($res > 0) @@ -314,11 +314,11 @@ print "\n
    \n"; if (! $user->rights->cron->create) { - print ''.$langs->trans("New").''; + print ''.$langs->trans("CronCreateJob").''; } else { - print ''.$langs->trans("New").''; + print ''.$langs->trans("CronCreateJob").''; } print '
    '; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index fac5e5ae710..21b008b1d0e 100755 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -517,7 +517,7 @@ Module2000Desc=Allow to edit some text area using an advanced editor Module2200Name=Dynamic Prices Module2200Desc=Enable the usage of math expressions for prices Module2300Name=Cron -Module2300Desc=Scheduled task management +Module2300Desc=Scheduled job management Module2400Name=Agenda Module2400Desc=Events/tasks and agenda management Module2500Name=Electronic Content Management @@ -765,10 +765,10 @@ Permission1237=Export supplier orders and their details Permission1251=Run mass imports of external data into database (data load) Permission1321=Export customer invoices, attributes and payments Permission1421=Export customer orders and attributes -Permission23001 = Read Scheduled task -Permission23002 = Create/update Scheduled task -Permission23003 = Delete Scheduled task -Permission23004 = Execute Scheduled task +Permission23001=Read Scheduled job +Permission23002=Create/update Scheduled job +Permission23003=Delete Scheduled job +Permission23004=Execute Scheduled job Permission2401=Read actions (events or tasks) linked to his account Permission2402=Create/modify actions (events or tasks) linked to his account Permission2403=Delete actions (events or tasks) linked to his account diff --git a/htdocs/langs/en_US/cron.lang b/htdocs/langs/en_US/cron.lang index 9ca1a6df430..cf5e1a6198c 100644 --- a/htdocs/langs/en_US/cron.lang +++ b/htdocs/langs/en_US/cron.lang @@ -26,15 +26,15 @@ CronLastOutput=Last run output CronLastResult=Last result code CronListOfCronJobs=List of scheduled jobs CronCommand=Command -CronList=Jobs list -CronDelete= Delete cron jobs -CronConfirmDelete= Are you sure you want to delete this cron job ? -CronExecute=Launch job -CronConfirmExecute= Are you sure to execute this job now -CronInfo= Jobs allow to execute task that have been planned -CronWaitingJobs=Wainting jobs +CronList=Scheduled job +CronDelete=Delete scheduled jobs +CronConfirmDelete=Are you sure you want to delete this scheduled jobs ? +CronExecute=Launch scheduled jobs +CronConfirmExecute=Are you sure to execute this scheduled jobs now ? +CronInfo=Scheduled job module allow to execute job that have been planned +CronWaitingJobs=Waiting jobs CronTask=Job -CronNone= None +CronNone=None CronDtStart=Start date CronDtEnd=End date CronDtNextLaunch=Next execution @@ -75,6 +75,7 @@ CronObjectHelp=The object name to load.
    For exemple to fetch method of Doli CronMethodHelp=The object method to launch.
    For exemple to fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value of method is is fecth CronArgsHelp=The method arguments.
    For exemple to fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value of paramters can be 0, ProductRef CronCommandHelp=The system command line to execute. +CronCreateJob=Create new Scheduled Job # Info CronInfoPage=Information # Common diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 551807aad59..b160c4303a0 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -694,6 +694,7 @@ AddBox=Add box SelectElementAndClickRefresh=Select an element and click Refresh PrintFile=Print File %s ShowTransaction=Show transaction +GoIntoSetupToChangeLogo=Go into Home - Setup - Company to change logo or go into Home - Setup - Display to hide. # Week day Monday=Monday Tuesday=Tuesday diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index cf5df4eb21c..da0296e4b00 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1391,6 +1391,8 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a if (empty($conf->dol_hide_topmenu)) { + print '
    '; + // Show menu entries print '
    '."\n"; $menumanager->atarget=$target; @@ -1431,8 +1433,8 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a print '
    '; unset($form); } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 7a96d672024..74d94d5b98c 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1006,6 +1006,7 @@ div.vmenu, td.vmenu { } .menu_contenu { padding-top: 1px; } +#menu_contenu_logo { padding-right: 4px; } a.vmenu:link, a.vmenu:visited, a.vmenu:hover, a.vmenu:active { font-size:px; font-family: ; text-align: ; font-weight: bold; } font.vmenudisabled { font-size:px; font-family: ; text-align: ; font-weight: bold; color: #93a5aa; } @@ -1393,10 +1394,10 @@ div.tabsElem { margin-top: 8px; } /* To avoid overlap of tabs when not browser div.tabBar { color: #; - padding-top: 9px; + padding-top: px; padding-left: px; padding-right: px; - padding-bottom: 12px; + padding-bottom: px; margin: 0px 0px 14px 0px; -moz-border-radius:6px; -webkit-border-radius: 6px; @@ -2202,6 +2203,13 @@ div.dolgraph div.legend table tbody tr { height: auto; } margin-bottom: 2px; margin-top: 2px; } +.photointooltip { + -webkit-box-shadow: -1px -1px 5px #777; + -moz-box-shadow: -1px -1px 5px #777; + box-shadow: -1px -1px 5px #777; + margin-top: 6px; + float: left; +} .logo_setup { @@ -2322,6 +2330,7 @@ border-radius: 6px; #tiptip_content { background-color: rgb(252,248,246); background-color: rgba(252,248,246,0.95); + line-height: 1.4em; } /* ============================================================================== */ diff --git a/htdocs/theme/md_exp/style.css.php b/htdocs/theme/md_exp/style.css.php index d7b3deb75fb..4b8ebe8d178 100644 --- a/htdocs/theme/md_exp/style.css.php +++ b/htdocs/theme/md_exp/style.css.php @@ -114,14 +114,15 @@ $fontsizesmaller='11'; // Eldy colors if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) { + // 90A4AE, 607D8B, 455A64, 37474F //$conf->global->THEME_ELDY_TOPMENU_BACK1=join(',',colorStringToArray('#37474f')); // topmenu #607D8B - $conf->global->THEME_ELDY_TOPMENU_BACK1=join(',',colorStringToArray('#607D8B')); // topmenu #607D8B + $conf->global->THEME_ELDY_TOPMENU_BACK1=join(',',colorStringToArray('#37474F')); // topmenu #607D8B //$conf->global->THEME_ELDY_TOPMENU_BACK1=join(',',colorStringToArray('000')); // topmenu #607D8B $conf->global->THEME_ELDY_TOPMENU_BACK2='236,236,236'; $conf->global->THEME_ELDY_VERMENU_BACK1='255,255,255'; // vmenu $conf->global->THEME_ELDY_VERMENU_BACK1b='230,232,232'; // vmenu (not menu) $conf->global->THEME_ELDY_VERMENU_BACK2='240,240,240'; - $conf->global->THEME_ELDY_BACKTITLE1=join(',',colorStringToArray('607D8B')); // title of arrays + $conf->global->THEME_ELDY_BACKTITLE1=join(',',colorStringToArray('#607D8B')); // title of arrays $conf->global->THEME_ELDY_BACKTITLE2='230,230,230'; $conf->global->THEME_ELDY_BACKTABCARD2='255,255,255'; // card $conf->global->THEME_ELDY_BACKTABCARD1='234,234,234'; @@ -512,19 +513,25 @@ td.showDragHandle { table-layout: fixed; } #id-right, #id-left { - padding-top: 8px; display: table-cell; float: none; vertical-align: top; } +#id-top { +/* min-width: 100%; + position: relative; + heigth: 52px; + background: #f00;*/ +} #id-left { min-height: 100%; position: relative; - width: 184px; + width: 183px; } -#id-right { /* This must stay id-right ant not be replaced with echo $right */ +#id-right { /* This must stay id-right and not be replaced with echo $right */ width: 100%; padding-left: 184px; + padding-top: 12px; } .side-nav { @@ -537,7 +544,6 @@ td.showDragHandle { left: 0; position: fixed; top: 50px; - width: 192px; z-index: 4; -webkit-transform: translateZ(0); -moz-transform: translateZ(0); @@ -565,10 +571,13 @@ td.showDragHandle { overflow-x: hidden; overflow-y: auto; } +.side-nav-vert { + margin-left: 184px; +} div.fiche { - margin-: global->MAIN_MENU_USE_JQUERY_LAYOUT))?($dol_hide_leftmenu?'4':'20'):'24')); ?>px; + margin-: global->MAIN_MENU_USE_JQUERY_LAYOUT))?($dol_hide_leftmenu?'4':'12'):'24')); ?>px; margin-: dol_optimize_smallscreen)?'12':'4')); ?>px; dol_hide_leftmenu) && ! empty($conf->dol_hide_topmenu)) print 'margin-top: 4px;'; ?> } @@ -619,7 +628,7 @@ div#tmenu_tooltip { display:none; - padding-: 100px; + /* padding-: 100px; */ background: ; /*box-shadow: 0 0 6px rgba(0, 0, 0, .4) !important;*/ @@ -978,11 +987,19 @@ table.login_table_securitycode tr td { } div.login_block { + padding-top: 8px; position: absolute; - : 5px; - top: 3px; + : 5px; + left: 0; + top: 0px; + position: fixed; font-weight: bold; - max-width: 110px; + z-index: 10; + text-align: center; + vertical-align: middle; + background: #FFF; + width: 183px; + height: 42px; display: none; @@ -1049,7 +1066,7 @@ div.vmenu, td.vmenu { float: left; padding: 0px; padding-bottom: 0px; - padding-top: 1px; + padding-top: 0px; width: 174px; } @@ -1516,7 +1533,7 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { text-decoration: none; white-space: nowrap; - -moz-border-radius:6px 6px 0px 0px; + /*-moz-border-radius:6px 6px 0px 0px; -webkit-border-radius:6px 6px 0px 0px; border-radius:6px 6px 0px 0px; @@ -1524,7 +1541,7 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { -webkit-box-shadow: 0 -1px 4px rgba(0,0,0,.1); box-shadow: 0 -1px 4px rgba(0,0,0,.1); - /*border-bottom: none; + border-bottom: none; border-right: 1px solid #CCCCCC; border-left: 1px solid #D0D0D0; border-top: 1px solid #D8D8D8; @@ -1901,7 +1918,7 @@ table.liste { border-left-width: 1px; border-left-color: #CCC; border-left-style: solid; - + margin-bottom: 2px; margin-top: 0px; @@ -2299,6 +2316,13 @@ div.dolgraph div.legend table tbody tr { height: auto; } margin-bottom: 2px; margin-top: 2px; } +.photointooltip { + -webkit-box-shadow: 0px 0px 5px #777; + -moz-box-shadow: 0px 0px 5px #777; + box-shadow: 0px 0px 6px #777; + margin-top: 8px; + float: left; +} .logo_setup { @@ -2419,6 +2443,7 @@ border-radius: 6px; #tiptip_content { background-color: rgb(252,248,246); background-color: rgba(252,248,246,0.95); + line-height: 1.4em; } /* ============================================================================== */ diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 9ffa762afd1..d8d8a1f071c 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1808,12 +1808,13 @@ class User extends CommonObject } $type=($this->societe_id?$langs->trans("External").$company:$langs->trans("Internal")); $label.= '
    ' . $langs->trans("Type") . ': ' . $type; + $label.='
    '; if (! empty($this->photo)) { - $label.= '
    '; + $label.= '
    '; $label.= Form::showphoto('userphoto', $this, 80); + $label.= '
    '; } - $label.= '
    '; // Info Login if ($infologin)
    '.$langs->trans("Ref").''.$langs->trans("Name").''.$langs->trans("DateStart").''.$langs->trans("DateEnd").''.$langs->trans("Status").'
    '.img_object($langs->trans("ShowProject"),($obj->public?'projectpub':'project'))." ".$obj->ref.''.img_object($langs->trans("ShowProject"),($obj->public?'projectpub':'project'))." ".$obj->ref.''.$obj->title.''.dol_print_date($db->jdate($obj->do),"day").''.dol_print_date($db->jdate($obj->de),"day").''.$projecttmp->getLibStatut(5).'