diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php index c2cc1cb041b..b4a020cf500 100644 --- a/htdocs/core/boxes/box_project.php +++ b/htdocs/core/boxes/box_project.php @@ -78,7 +78,7 @@ class box_project extends ModeleBoxes // list the summary of the orders if ($user->rights->projet->lire) { - $sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut "; + $sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut, p.public"; $sql.= " FROM ".MAIN_DB_PREFIX."projet as p"; if($user->socid) $sql.= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid=p.fk_soc"; $sql.= " WHERE p.entity = ".$conf->entity; @@ -98,7 +98,7 @@ class box_project extends ModeleBoxes $tooltip = $langs->trans('Project') . ': ' . $objp->ref; $this->info_box_contents[$i][0] = array( 'td' => 'align="left" width="16"', - 'logo' => 'object_project', + 'logo' => 'object_project'.($objp->public?'pub':''), 'tooltip' => $tooltip, 'url' => DOL_URL_ROOT."/projet/card.php?id=".$objp->rowid, ); @@ -124,12 +124,12 @@ class box_project extends ModeleBoxes $objTask = $db->fetch_object($resultTask); $this->info_box_contents[$i][3] = array( 'td' => 'class="right"', - 'text' => number_format($objTask->nb, 0, ',', ' ')." ".$langs->trans("Tasks"), + 'text' => $objTask->nb." ".$langs->trans("Tasks"), ); if ($objTask->nb > 0 ) $this->info_box_contents[$i][4] = array( 'td' => 'class="right"', - 'text' => number_format(($objTask->totprogress/$objTask->nb), 0, ',', ' ')."%", + 'text' => round($objTask->totprogress/$objTask->nb, 0)."%", ); else $this->info_box_contents[$i][4] = array('td' => 'class="right"', 'text' => "N/A "); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 3851a173c24..c987b9dd954 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1045,7 +1045,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r $morehtmlleft.=''; } } - elseif ($conf->browser->layout != 'phone') // Show no photo link + elseif ($conf->browser->layout != 'phone') // Show No photo link (picto of pbject) { $morehtmlleft.='
'; if ($object->element == 'action') @@ -1057,7 +1057,9 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r else { $width=14; $cssclass='photorefcenter'; - $nophoto=img_picto('', 'object_'.$object->picto, '', false, 1); + $picto = $object->picto; + if ($object->element == 'project' && ! $object->public) $picto = 'project'; // instead of projectpub + $nophoto=img_picto('', 'object_'.$picto, '', false, 1); $morehtmlleft.='
No photo
'; } $morehtmlleft.='
';