Skip to content

Commit

Permalink
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
eldy committed Oct 24, 2015
2 parents 3015a03 + 082e41b commit 086582a
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 29 deletions.
4 changes: 2 additions & 2 deletions htdocs/langs/en_US/bills.lang
Expand Up @@ -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
Expand Down
12 changes: 4 additions & 8 deletions htdocs/main.inc.php
Expand Up @@ -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>';
Expand Down
23 changes: 18 additions & 5 deletions htdocs/theme/eldy/style.css.php
Expand Up @@ -699,7 +699,7 @@
<?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 } ?>
}

Expand Down Expand Up @@ -888,7 +888,6 @@

div.mainmenu.products {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/products.png',1) ?>);
margin-left: 10px;
}

div.mainmenu.project {
Expand Down Expand Up @@ -3877,7 +3876,22 @@
}
@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 {
Expand All @@ -3887,9 +3901,8 @@
#tooltip {
position: absolute;
width: <?php print dol_size(300,'width'); ?>px;
}
}
}


<?php
if (is_object($db)) $db->close();
22 changes: 18 additions & 4 deletions htdocs/theme/md/style.css.php
Expand Up @@ -499,7 +499,7 @@
.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; }
Expand Down Expand Up @@ -731,7 +731,7 @@
<?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 } ?>
}

Expand Down Expand Up @@ -913,7 +913,6 @@

div.mainmenu.products {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/products.png',1) ?>);
margin-left: 10px;
}

div.mainmenu.project {
Expand Down Expand Up @@ -3715,7 +3714,22 @@
}
@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 {
Expand Down
31 changes: 21 additions & 10 deletions htdocs/user/class/user.class.php
Expand Up @@ -1842,23 +1842,24 @@ function getPhotoUrl($width, $height, $cssclass='')
* 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 = '';

Expand Down Expand Up @@ -1908,18 +1909,28 @@ function getNomUrl($withpicto=0, $option='', $infologin=0, $notooltip=0, $maxlen
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;
}
if (abs($withpictoimg) != 2)
{
$result.='<div class="inline-block valignmiddle'.($morecss?' usertext'.$morecss:'').'">'.$this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen).'</div>';
}
$result.= $link . $this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen) . $linkend . $companylink;
$result.=$linkend;
if (abs($withpictoimg) == 1) $result.='</div>';
$result.=$companylink;
return $result;
}

Expand Down

0 comments on commit 086582a

Please sign in to comment.