diff --git a/htdocs/comm/askpricesupplier/card.php b/htdocs/comm/askpricesupplier/card.php index c49881ba542..6759ae22196 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 '
'; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 5be006c0053..9d25daa8091 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 '
'; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 4b7d0104ec9..5a4b434286c 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 '
'; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 59b5715402f..410377c5683 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 '
'; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 0e22145157c..3a9c716dd7a 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4844,16 +4844,24 @@ class Form $ret.=''; } 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.=''; - $ret.='Photo found on Gravatar'; // gravatar need md5 hash + $ret.='Photo found on Gravatar'; // gravatar need md5 hash } else - { - $ret.='No photo'; + { + $ret.='No photo'; } } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 8b6dfa38657..ce5e7bbf33d 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.='
'; $out.=''.$langs->trans("More").'...'; $out.='
'.$outmore.'
'; @@ -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 6df0f77f500..1e9f418a594 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.='
'; - //$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.='
'; + + $toprightmenu.='
'; + $toprightmenu.='
'; $toprightmenu.='
'; @@ -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 00000000000..12c1007048b 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 00000000000..762e83d4a36 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 00000000000..d9fee3c3d64 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 2482989b0cc..aff2c5f1199 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 6e8bcbf98a5..8722632547c 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 6e8bcbf98a5..a81e2fa0df6 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 90364fc908d..5b7b1f8dcf3 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 5c7c62f9d91..544b584e525 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1740,7 +1740,7 @@ else // Photo print ''; - print $form->showphoto('userphoto',$object,0,$caneditfield); + print $form->showphoto('userphoto',$object,100,$caneditfield); print ''; print ''; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 7d006c1a7f7..408a6c75145 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.=''; + $result.=$form->showphoto('userphoto', $this, ($with?$with:16)); + $result.=''; + + return $result; + } + /** * Return a link to the user card (with optionaly the picto) * Use this->id,this->lastname, this->firstname