diff --git a/htdocs/comm/askpricesupplier/card.php b/htdocs/comm/askpricesupplier/card.php index c49881ba5427fc2d4e6320a0ee009e6494dc7c7f..6759ae22196341aacc529c48785eb6d16c704af4 100644 --- a/htdocs/comm/askpricesupplier/card.php +++ b/htdocs/comm/askpricesupplier/card.php @@ -1737,7 +1737,7 @@ if ($action == 'create') $ref = dol_sanitizeFileName($object->ref); include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; $fileparams = dol_most_recent_file($conf->askpricesupplier->dir_output . '/' . $ref, preg_quote($ref, '/')); - $file = $fileparams ['fullname']; + $file = $fileparams['fullname']; // Define output language $outputlangs = $langs; @@ -1763,7 +1763,7 @@ if ($action == 'create') exit(); } $fileparams = dol_most_recent_file($conf->askpricesupplier->dir_output . '/' . $ref, preg_quote($ref, '/')); - $file = $fileparams ['fullname']; + $file = $fileparams['fullname']; } print '<br>'; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 5be006c005386a5fd25dae4b8788f0423f03e260..9d25daa809171fe1e204577dbb011207c3c78720 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -2312,7 +2312,7 @@ if ($action == 'create') $ref = dol_sanitizeFileName($object->ref); include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; $fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref, preg_quote($ref, '/')); - $file = $fileparams ['fullname']; + $file = $fileparams['fullname']; // Define output language $outputlangs = $langs; @@ -2337,7 +2337,7 @@ if ($action == 'create') exit(); } $fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref, preg_quote($ref, '/')); - $file = $fileparams ['fullname']; + $file = $fileparams['fullname']; } print '<br>'; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 4b7d0104ec95c39897c5022a53a348c19e944532..5a4b434286c839c0cbd7ddacb12824d4985e2658 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2325,7 +2325,7 @@ if ($action == 'create' && $user->rights->commande->creer) $ref = dol_sanitizeFileName($object->ref); include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; $fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($ref, '/')); - $file = $fileparams ['fullname']; + $file = $fileparams['fullname']; // Define output language $outputlangs = $langs; @@ -2350,7 +2350,7 @@ if ($action == 'create' && $user->rights->commande->creer) exit(); } $fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($ref, '/')); - $file = $fileparams ['fullname']; + $file = $fileparams['fullname']; } print '<br>'; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 59b5715402fc95c658f97027320d0bb41a13115e..410377c5683d47dc20196d3c8dbec5fa6ee4435d 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3885,7 +3885,7 @@ if ($action == 'create') $ref = dol_sanitizeFileName($object->ref); include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; $fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref, '/')); - $file = $fileparams ['fullname']; + $file = $fileparams['fullname']; // Define output language $outputlangs = $langs; @@ -3910,7 +3910,7 @@ if ($action == 'create') exit(); } $fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref, '/')); - $file = $fileparams ['fullname']; + $file = $fileparams['fullname']; } print '<br>'; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 0e22145157c402aa7d1bd57c5c3374a4fc2f6dc5..3a9c716dd7a1a7dceca18c808283e6e6f656cd27 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4844,16 +4844,24 @@ class Form $ret.='</a>'; } 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; $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 - { - $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.'">'; } } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 8b6dfa38657bad7f9cd33f2c7952101c2a276485..ce5e7bbf33d4fc5458c15eb2ac77a6f06c2e6260 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -789,7 +789,7 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p if ($displaytab > $limittoshow) { - $tabsname=str_replace ("@", "", $picto); + $tabsname=str_replace ("@", "", $picto); $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.='<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'); - return img_picto($titlealt, 'warning.png', ($float ? 'style="float: right"' : '')); + return img_picto($titlealt, 'warning.png', 'class="pictowarning"'.($float ? ' style="float: right"' : '')); } /** diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 6df0f77f50067732817b9b5766457ddd4b169fe0..1e9f418a5948ac076679ab448c4e4e3b75bf50e2 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1436,8 +1436,16 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a // Add login user link $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 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 - // Logout link + // Logout link $toprightmenu.=$form->textwithtooltip('',$logouthtmltext,2,1,$logouttext,'login_block_elem',2); // Link to print main content area diff --git a/htdocs/theme/common/ical.gif b/htdocs/theme/common/ical.gif old mode 100755 new mode 100644 diff --git a/htdocs/theme/common/rss.gif b/htdocs/theme/common/rss.gif old mode 100755 new mode 100644 diff --git a/htdocs/theme/common/user_anonymous.png b/htdocs/theme/common/user_anonymous.png new file mode 100644 index 0000000000000000000000000000000000000000..12c1007048bd87f7014e8c6aab788843a9695558 Binary files /dev/null and b/htdocs/theme/common/user_anonymous.png differ diff --git a/htdocs/theme/common/user_man.png b/htdocs/theme/common/user_man.png new file mode 100644 index 0000000000000000000000000000000000000000..762e83d4a3650070d0461065bf04d2eba388867d Binary files /dev/null and b/htdocs/theme/common/user_man.png differ diff --git a/htdocs/theme/common/user_woman.png b/htdocs/theme/common/user_woman.png new file mode 100644 index 0000000000000000000000000000000000000000..d9fee3c3d6400eefcb0dc59dd83ff531021a8a57 Binary files /dev/null and b/htdocs/theme/common/user_woman.png differ diff --git a/htdocs/theme/common/vcal.gif b/htdocs/theme/common/vcal.gif old mode 100755 new mode 100644 diff --git a/htdocs/theme/eldy/img/delete.png b/htdocs/theme/eldy/img/delete.png index 2482989b0cc5112cf6608b337b1480f45f866081..aff2c5f11994ed4a24c87bf0a5f0b69af1a2a1b3 100644 Binary files a/htdocs/theme/eldy/img/delete.png and b/htdocs/theme/eldy/img/delete.png differ diff --git a/htdocs/theme/eldy/img/object_printer.png b/htdocs/theme/eldy/img/object_printer.png index 6e8bcbf98a57f1c6e80aa31b21e15677e3796778..8722632547c5b7179d68c6e3e670131c72c80bd3 100644 Binary files a/htdocs/theme/eldy/img/object_printer.png and b/htdocs/theme/eldy/img/object_printer.png differ diff --git a/htdocs/theme/eldy/img/printer.png b/htdocs/theme/eldy/img/printer.png index 6e8bcbf98a57f1c6e80aa31b21e15677e3796778..a81e2fa0df60af0e3719f655335833d9d8172810 100644 Binary files a/htdocs/theme/eldy/img/printer.png and b/htdocs/theme/eldy/img/printer.png differ diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 90364fc908d851610c08d742f8675765d67e9cf5..5b7b1f8dcf39256563319edfec646b343bcee4da 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -281,6 +281,7 @@ input.liste_titre { input.removedfile { padding: 0px !important; border: 0px !important; + vertical-align: text-bottom; } textarea:disabled { background:#ddd; @@ -555,6 +556,9 @@ margin : 0px auto; padding-left: 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 { - border: 1px solid #D0D0D0; + border: 1px solid #E0E0E0; border-collapse: collapse; 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; } 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 { vertical-align: middle; @@ -1808,7 +1812,7 @@ div.tabBar .tdtop { table.border td, div.border div div.tagtd { padding: 2px 2px 2px 2px; - border: 1px solid #D0D0D0; + border: 1px solid #E0E0E0; border-collapse: collapse; } diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 5c7c62f9d91056f33801626310883b7dd7aa761d..544b584e525d8f1ab05d70bc62fc30aca822849a 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1740,7 +1740,7 @@ else // Photo 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 '</tr>'; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 7d006c1a7f7ec6352462459014107aa7941bdd9a..408a6c751451df69e1efe83d2a5b30347aa7952d 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -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) * Use this->id,this->lastname, this->firstname