Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2015-10-24 16:09:36 +02:00
commit 086582a7a0
5 changed files with 63 additions and 29 deletions

View File

@ -216,8 +216,8 @@ DateEcheance=Due date limit
DateInvoice=Invoice date
NoInvoice=No invoice
ClassifyBill=Classify invoice
SupplierBillsToPay=Suppliers invoices to pay
CustomerBillsUnpaid=Unpaid customers invoices
SupplierBillsToPay=Unpaid supplier invoices
CustomerBillsUnpaid=Unpaid customer invoices
NonPercuRecuperable=Non-recoverable
SetConditions=Set payment terms
SetMode=Set payment mode

View File

@ -1485,14 +1485,10 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
// Add login user link
$toprightmenu.='<div class="login_block_user">';
// User photo
$toprightmenu.='<div class="inline-block nowrap"><div class="inline-block login_block_elem" style="padding: 0px;">';
$toprightmenu.=$user->getPhotoUrl(0,0,'loginphoto');
$toprightmenu.='</div></div>';
// Login name with tooltip
$toprightmenu.='<div class="inline-block nowrap"><div class="inline-block login_block_elem login_block_elem_name" style="padding: 0px;">';
$toprightmenu.=$user->getNomurl(0, '', true, 0, 11, 0, ($user->firstname ? 'firstname' : -1),'atoplogin');
// Login name with photo and tooltip
$mode=-1;
$toprightmenu.='<div class="inline-block nowrap"><div class="inline-block login_block_elem login_block_elem_name" style="padding: 0px;">';
$toprightmenu.=$user->getNomurl($mode, '', true, 0, 11, 0, ($user->firstname ? 'firstname' : -1),'atoplogin');
$toprightmenu.='</div></div>';
$toprightmenu.='</div>';

View File

@ -699,7 +699,7 @@ div#tmenu_tooltip {
<?php if (GETPOST("optioncss") == 'print') { ?>
display:none;
<?php } else { ?>
padding-<?php echo $right; ?>: <? echo ($maxwidthloginblock - 10); ?>px;
padding-<?php echo $right; ?>: <?php echo ($maxwidthloginblock - 10); ?>px;
<?php } ?>
}
@ -888,7 +888,6 @@ div.mainmenu.members {
div.mainmenu.products {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/products.png',1) ?>);
margin-left: 10px;
}
div.mainmenu.project {
@ -3877,7 +3876,22 @@ border-top-right-radius: 6px;
}
@media only screen and (max-width: 570px)
{
div.mainmenu {
/* Reduce login top right info */
.usertextatoplogin {
display: none;
}
div#tmenu_tooltip {
<?php if (GETPOST("optioncss") == 'print') { ?>
display:none;
<?php } else { ?>
padding-<?php echo $right; ?>: 78px;
<?php } ?>
}
div.login_block {
top: 9px;
}
div.mainmenu {
min-width: 20px;
}
.topmenuimage {
@ -3887,9 +3901,8 @@ border-top-right-radius: 6px;
#tooltip {
position: absolute;
width: <?php print dol_size(300,'width'); ?>px;
}
}
}
<?php
if (is_object($db)) $db->close();

View File

@ -499,7 +499,7 @@ div.confirmmessage {
.maxwidth100 { max-width: 100px; }
.maxwidth200 { max-width: 200px; }
.maxwidth300 { max-width: 300px; }
.titlefield { width: 25%; }
.titlefield { width: 30%; }
<?php if (! empty($dol_optimize_smallscreen)) { ?>
.hideonsmartphone { display: none; }
.noenlargeonsmartphone { width : 50px !important; display: inline !important; }
@ -731,7 +731,7 @@ div#tmenu_tooltip {
<?php if (GETPOST("optioncss") == 'print') { ?>
display:none;
<?php } else { ?>
/* padding-<?php echo $right; ?>: <? echo ($maxwidthloginblock - 10); ?>px; */
/* padding-<?php echo $right; ?>: <?php echo ($maxwidthloginblock - 10); ?>px; */
<?php } ?>
}
@ -913,7 +913,6 @@ div.mainmenu.members {
div.mainmenu.products {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/products.png',1) ?>);
margin-left: 10px;
}
div.mainmenu.project {
@ -3715,7 +3714,22 @@ border-top-right-radius: 6px;
}
@media only screen and (max-width: 570px)
{
div.mainmenu {
/* Reduce login top right info */
.usertextatoplogin {
display: none;
}
div#tmenu_tooltip {
<?php if (GETPOST("optioncss") == 'print') { ?>
display:none;
<?php } else { ?>
/* padding-<?php echo $right; ?>: 78px; */
<?php } ?>
}
div.login_block {
top: 9px;
}
div.mainmenu {
min-width: 20px;
}
.topmenuimage {

View File

@ -1842,23 +1842,24 @@ class User extends CommonObject
* Return a link to the user card (with optionaly the picto)
* Use this->id,this->lastname, this->firstname
*
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
* @param int $withpictoimg Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto, -1=Include photo into link, -2=Only picto photo)
* @param string $option On what the link point to
* @param integer $infologin Add connection info to the tooltip
* @param integer $notooltip 1=Disable tooltip
* @param integer $notooltip 1=Disable tooltip on picto and name
* @param int $maxlen Max length of visible user name
* @param int $hidethirdpartylogo Hide logo of thirdparty if user is external user
* @param string $mode 'firstname'=Show only firstname
* @param string $morecss Add more css on link
* @return string String with URL
*/
function getNomUrl($withpicto=0, $option='', $infologin=0, $notooltip=0, $maxlen=24, $hidethirdpartylogo=0, $mode='',$morecss='')
function getNomUrl($withpictoimg=0, $option='', $infologin=0, $notooltip=0, $maxlen=24, $hidethirdpartylogo=0, $mode='',$morecss='')
{
global $langs, $conf, $db;
global $dolibarr_main_authentication, $dolibarr_main_demo;
global $menumanager;
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpictoimg) $withpictoimg=0;
$result = '';
$companylink = '';
@ -1908,18 +1909,28 @@ class User extends CommonObject
if (! empty($_SESSION["disablemodules"])) $label.= '<br><b>'.$langs->trans("DisabledModules").':</b> <br>'.join(', ',explode(',',$_SESSION["disablemodules"]));
}
$link = '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'"';
$link.= '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'"';
$link.= ($notooltip?'':' title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip'.($morecss?' '.$morecss:'').'"');
$link.= '>';
$linkend='</a>';
if ($withpicto)
if (abs($withpictoimg) == 1) $result.='<div class="nowrap">';
$result.=$link;
if ($withpictoimg)
{
$result.=($link.img_object(($notooltip?'':$label), 'user', ($notooltip?'':'class="classfortooltip"')).$linkend);
if ($withpicto != 2) $result.=' ';
$paddafterimage='';
if (abs($withpictoimg) == 1) $paddafterimage='style="padding-right: 3px;"';
if ($withpictoimg > 0) $picto='<div class="inline-block valignmiddle'.($morecss?' userimg'.$morecss:'').'">'.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"')).'</div>';
else $picto='<div class="inline-block valignmiddle'.($morecss?' userimg'.$morecss:'').'"'.($paddafterimage?' '.$paddafterimage:'').'>'.Form::showphoto('userphoto', $this, 0, 0, 0, 'loginphoto').'</div>';
$result.=$picto;
}
$result.= $link . $this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen) . $linkend . $companylink;
if (abs($withpictoimg) != 2)
{
$result.='<div class="inline-block valignmiddle'.($morecss?' usertext'.$morecss:'').'">'.$this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen).'</div>';
}
$result.=$linkend;
if (abs($withpictoimg) == 1) $result.='</div>';
$result.=$companylink;
return $result;
}