NEW Show photo of logged user into login top right block.
NEW If no photo is available for user, we show a generic photo depending on gender
@ -1737,7 +1737,7 @@ if ($action == 'create')
|
|||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||||
$fileparams = dol_most_recent_file($conf->askpricesupplier->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
$fileparams = dol_most_recent_file($conf->askpricesupplier->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
||||||
$file = $fileparams ['fullname'];
|
$file = $fileparams['fullname'];
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
@ -1763,7 +1763,7 @@ if ($action == 'create')
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
$fileparams = dol_most_recent_file($conf->askpricesupplier->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
$fileparams = dol_most_recent_file($conf->askpricesupplier->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
||||||
$file = $fileparams ['fullname'];
|
$file = $fileparams['fullname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
@ -2312,7 +2312,7 @@ if ($action == 'create')
|
|||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||||
$fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
$fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
||||||
$file = $fileparams ['fullname'];
|
$file = $fileparams['fullname'];
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
@ -2337,7 +2337,7 @@ if ($action == 'create')
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
$fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
$fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
||||||
$file = $fileparams ['fullname'];
|
$file = $fileparams['fullname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
@ -2325,7 +2325,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||||
$fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
$fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
||||||
$file = $fileparams ['fullname'];
|
$file = $fileparams['fullname'];
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
@ -2350,7 +2350,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
$fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
$fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
||||||
$file = $fileparams ['fullname'];
|
$file = $fileparams['fullname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
@ -3885,7 +3885,7 @@ if ($action == 'create')
|
|||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||||
$fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
$fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
||||||
$file = $fileparams ['fullname'];
|
$file = $fileparams['fullname'];
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
@ -3910,7 +3910,7 @@ if ($action == 'create')
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
$fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
$fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
||||||
$file = $fileparams ['fullname'];
|
$file = $fileparams['fullname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
@ -4844,16 +4844,24 @@ class Form
|
|||||||
$ret.='</a>';
|
$ret.='</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! empty($conf->gravatar->enabled) && $email)
|
$nophoto='/theme/common/nophoto.jpg';
|
||||||
|
if (in_array($modulepart,array('userphoto','contact'))) // For module thar are "physical" users
|
||||||
|
{
|
||||||
|
$nophoto='/theme/common/user_anonymous.png';
|
||||||
|
if ($object->gender == 'man') $nophoto='/theme/common/user_man.png';
|
||||||
|
if ($object->gender == 'woman') $nophoto='/theme/common/user_woman.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! empty($conf->gravatar->enabled) && $email)
|
||||||
{
|
{
|
||||||
global $dolibarr_main_url_root;
|
global $dolibarr_main_url_root;
|
||||||
$ret.='<!-- Put link to gravatar -->';
|
$ret.='<!-- Put link to gravatar -->';
|
||||||
$ret.='<img alt="Photo found on Gravatar" title="Photo Gravatar.com - email '.$email.'" border="0"'.($width?' width="'.$width:'').'" src="http://www.gravatar.com/avatar/'.dol_hash($email,3).'?s='.$width.'&d='.urlencode(dol_buildpath('/theme/common/nophoto.jpg',2)).'">'; // gravatar need md5 hash
|
$ret.='<img class="photo'.$modulepart.'" alt="Photo found on Gravatar" title="Photo Gravatar.com - email '.$email.'" border="0"'.($width?' width="'.$width:'').'" src="http://www.gravatar.com/avatar/'.dol_hash($email,3).'?s='.$width.'&d='.urlencode(dol_buildpath($nophoto,2)).'">'; // gravatar need md5 hash
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$ret.='<img alt="No photo" border="0"'.($width?' width="'.$width:'').'" src="'.DOL_URL_ROOT.'/theme/common/nophoto.jpg">';
|
$ret.='<img class="photo'.$modulepart.'" alt="No photo" border="0"'.($width?' width="'.$width:'').'" src="'.DOL_URL_ROOT.$nophoto.'">';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -789,7 +789,7 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p
|
|||||||
|
|
||||||
if ($displaytab > $limittoshow)
|
if ($displaytab > $limittoshow)
|
||||||
{
|
{
|
||||||
$tabsname=str_replace ("@", "", $picto);
|
$tabsname=str_replace ("@", "", $picto);
|
||||||
$out.='<div id="moretabs'.$tabsname.'" class="inline-block tabsElem">';
|
$out.='<div id="moretabs'.$tabsname.'" class="inline-block tabsElem">';
|
||||||
$out.='<a href="" data-role="button" style="background-color: #f0f0f0;" class="tab inline-block">'.$langs->trans("More").'...</a>';
|
$out.='<a href="" data-role="button" style="background-color: #f0f0f0;" class="tab inline-block">'.$langs->trans("More").'...</a>';
|
||||||
$out.='<div id="moretabsList'.$tabsname.'" style="position: absolute; left: -999em;text-align: left;margin:0px;padding:2px">'.$outmore.'</div>';
|
$out.='<div id="moretabsList'.$tabsname.'" style="position: absolute; left: -999em;text-align: left;margin:0px;padding:2px">'.$outmore.'</div>';
|
||||||
@ -2217,7 +2217,7 @@ function img_warning($titlealt = 'default', $float = 0)
|
|||||||
|
|
||||||
if ($titlealt == 'default') $titlealt = $langs->trans('Warning');
|
if ($titlealt == 'default') $titlealt = $langs->trans('Warning');
|
||||||
|
|
||||||
return img_picto($titlealt, 'warning.png', ($float ? 'style="float: right"' : ''));
|
return img_picto($titlealt, 'warning.png', 'class="pictowarning"'.($float ? ' style="float: right"' : ''));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1436,8 +1436,16 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
|
|
||||||
// Add login user link
|
// Add login user link
|
||||||
$toprightmenu.='<div class="login_block_user">';
|
$toprightmenu.='<div class="login_block_user">';
|
||||||
//$toprightmenu.=$form->textwithtooltip('',$loginhtmltext,2,1,$logintext,'login_block_elem2',2); // This include div class="login"
|
|
||||||
$toprightmenu.= $user->getNomurl(0, '', true, 0, 11);
|
// User photo
|
||||||
|
$toprightmenu.='<div class="inline-block nowrap"><div class="inline-block login_block_elem" style="padding: 0px;">';
|
||||||
|
$toprightmenu.=$user->getPhotoUrl();
|
||||||
|
$toprightmenu.='</div></div>';
|
||||||
|
|
||||||
|
$toprightmenu.='<div class="inline-block nowrap"><div class="inline-block login_block_elem" style="padding: 0px;">';
|
||||||
|
$toprightmenu.=$user->getNomurl(0, '', true, 0, 11);
|
||||||
|
$toprightmenu.='</div></div>';
|
||||||
|
|
||||||
$toprightmenu.='</div>';
|
$toprightmenu.='</div>';
|
||||||
|
|
||||||
$toprightmenu.='<div class="login_block_other">';
|
$toprightmenu.='<div class="login_block_other">';
|
||||||
@ -1451,7 +1459,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
}
|
}
|
||||||
else $toprightmenu.=$result; // For backward compatibility
|
else $toprightmenu.=$result; // For backward compatibility
|
||||||
|
|
||||||
// Logout link
|
// Logout link
|
||||||
$toprightmenu.=$form->textwithtooltip('',$logouthtmltext,2,1,$logouttext,'login_block_elem',2);
|
$toprightmenu.=$form->textwithtooltip('',$logouthtmltext,2,1,$logouttext,'login_block_elem',2);
|
||||||
|
|
||||||
// Link to print main content area
|
// Link to print main content area
|
||||||
|
|||||||
0
htdocs/theme/common/ical.gif
Executable file → Normal file
|
Before Width: | Height: | Size: 460 B After Width: | Height: | Size: 460 B |
0
htdocs/theme/common/rss.gif
Executable file → Normal file
|
Before Width: | Height: | Size: 476 B After Width: | Height: | Size: 476 B |
BIN
htdocs/theme/common/user_anonymous.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
htdocs/theme/common/user_man.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
htdocs/theme/common/user_woman.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
0
htdocs/theme/common/vcal.gif
Executable file → Normal file
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 267 B |
|
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 296 B |
|
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 329 B |
@ -281,6 +281,7 @@ input.liste_titre {
|
|||||||
input.removedfile {
|
input.removedfile {
|
||||||
padding: 0px !important;
|
padding: 0px !important;
|
||||||
border: 0px !important;
|
border: 0px !important;
|
||||||
|
vertical-align: text-bottom;
|
||||||
}
|
}
|
||||||
textarea:disabled {
|
textarea:disabled {
|
||||||
background:#ddd;
|
background:#ddd;
|
||||||
@ -555,6 +556,9 @@ margin : 0px auto;
|
|||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
padding-right: 2px;
|
padding-right: 2px;
|
||||||
}
|
}
|
||||||
|
.pictowarning {
|
||||||
|
padding-left: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
@ -1787,7 +1791,7 @@ tr.nocellnopadd td.nobordernopadding, tr.nocellnopadd td.nocellnopadd
|
|||||||
|
|
||||||
|
|
||||||
table.border, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col, div.border {
|
table.border, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col, div.border {
|
||||||
border: 1px solid #D0D0D0;
|
border: 1px solid #E0E0E0;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
padding: 1px 2px 1px 3px; /* t r b l */
|
padding: 1px 2px 1px 3px; /* t r b l */
|
||||||
}
|
}
|
||||||
@ -1796,7 +1800,7 @@ table.border, table.dataTable, .table-border, .table-border-col, .table-key-bord
|
|||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
div.tabBar table.border tr, div.tabBar table.border tr td, div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar div.border .table-val-border-col {
|
div.tabBar table.border tr, div.tabBar table.border tr td, div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar div.border .table-val-border-col {
|
||||||
height: 24px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar .table-val-border-col {
|
div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar .table-val-border-col {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
@ -1808,7 +1812,7 @@ div.tabBar .tdtop {
|
|||||||
|
|
||||||
table.border td, div.border div div.tagtd {
|
table.border td, div.border div div.tagtd {
|
||||||
padding: 2px 2px 2px 2px;
|
padding: 2px 2px 2px 2px;
|
||||||
border: 1px solid #D0D0D0;
|
border: 1px solid #E0E0E0;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1740,7 +1740,7 @@ else
|
|||||||
|
|
||||||
// Photo
|
// Photo
|
||||||
print '<td align="center" valign="middle" width="25%" rowspan="'.$rowspan.'">';
|
print '<td align="center" valign="middle" width="25%" rowspan="'.$rowspan.'">';
|
||||||
print $form->showphoto('userphoto',$object,0,$caneditfield);
|
print $form->showphoto('userphoto',$object,100,$caneditfield);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -1779,6 +1779,31 @@ 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 string $option On what the link point to
|
||||||
|
* @param integer $infologin Add connection info to the tooltip
|
||||||
|
* @param integer $notooltip 1=Disable tooltip
|
||||||
|
* @param int $maxlen Max length of visible user name
|
||||||
|
* @return string String with URL
|
||||||
|
*/
|
||||||
|
function getPhotoUrl($with=0)
|
||||||
|
{
|
||||||
|
global $form;
|
||||||
|
|
||||||
|
$result='';
|
||||||
|
|
||||||
|
$result.='<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'">';
|
||||||
|
$result.=$form->showphoto('userphoto', $this, ($with?$with:16));
|
||||||
|
$result.='</a>';
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a link to the user card (with optionaly the picto)
|
* Return a link to the user card (with optionaly the picto)
|
||||||
* Use this->id,this->lastname, this->firstname
|
* Use this->id,this->lastname, this->firstname
|
||||||
|
|||||||