forked from Wavyzz/dolibarr
FIX Picto of project on dol_banner and box
Conflicts: htdocs/core/boxes/box_project.php
This commit is contained in:
@@ -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,
|
||||
);
|
||||
@@ -123,13 +123,13 @@ class box_project extends ModeleBoxes
|
||||
if ($resultTask) {
|
||||
$objTask = $db->fetch_object($resultTask);
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => number_format($objTask->nb, 0, ',', ' ')." ".$langs->trans("Tasks"),
|
||||
'td' => 'class="right"',
|
||||
'text' => $objTask->nb." ".$langs->trans("Tasks"),
|
||||
);
|
||||
if ($objTask->nb > 0 )
|
||||
if ($objTask->nb > 0)
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => 'align="right"',
|
||||
'text' => number_format(($objTask->totprogress/$objTask->nb), 0, ',', ' ')."%",
|
||||
'td' => 'class="right"',
|
||||
'text' => round($objTask->totprogress/$objTask->nb, 0)."%",
|
||||
);
|
||||
else
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => "N/A ");
|
||||
|
||||
@@ -1024,7 +1024,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
$morehtmlleft.='</div>';
|
||||
}
|
||||
}
|
||||
elseif ($conf->browser->layout != 'phone') // Show no photo link
|
||||
elseif ($conf->browser->layout != 'phone') // Show No photo link (picto of pbject)
|
||||
{
|
||||
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">';
|
||||
if ($object->element == 'action')
|
||||
@@ -1036,7 +1036,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.='<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.$nophoto.'"></div></div>';
|
||||
}
|
||||
$morehtmlleft.='</div>';
|
||||
|
||||
Reference in New Issue
Block a user