Skip to content
Snippets Groups Projects
Commit d109c78c authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix label of project was not visible

parent 76865c00
No related branches found
No related tags found
No related merge requests found
...@@ -541,8 +541,8 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t ...@@ -541,8 +541,8 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t
{ {
$projectstatic->id=$lines[$i]->fk_project; $projectstatic->id=$lines[$i]->fk_project;
$projectstatic->ref=$lines[$i]->projectref; $projectstatic->ref=$lines[$i]->projectref;
$projectstatic->title=$lines[$i]->projectlabel;
$projectstatic->public=$lines[$i]->public; $projectstatic->public=$lines[$i]->public;
$projectstatic->label=$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project];
$taskstatic->id=$lines[$i]->id; $taskstatic->id=$lines[$i]->id;
...@@ -550,7 +550,7 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t ...@@ -550,7 +550,7 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t
// Project // Project
print "<td>"; print "<td>";
print $projectstatic->getNomUrl(1); print $projectstatic->getNomUrl(1,'',0,$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]);
print "</td>"; print "</td>";
// Ref // Ref
...@@ -711,9 +711,9 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ ...@@ -711,9 +711,9 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
print '<td class="nowrap">'; print '<td class="nowrap">';
$projectstatic->id=$lines[$i]->fk_project; $projectstatic->id=$lines[$i]->fk_project;
$projectstatic->ref=$lines[$i]->projectref; $projectstatic->ref=$lines[$i]->projectref;
$projectstatic->title=$lines[$i]->projectlabel;
$projectstatic->public=$lines[$i]->public; $projectstatic->public=$lines[$i]->public;
$projectstatic->label=$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]; print $projectstatic->getNomUrl(1,'',0,$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]);
print $projectstatic->getNomUrl(1);
print "</td>"; print "</td>";
// Ref // Ref
......
...@@ -818,9 +818,10 @@ class Project extends CommonObject ...@@ -818,9 +818,10 @@ class Project extends CommonObject
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param string $option Variant ('', 'nolink') * @param string $option Variant ('', 'nolink')
* @param int $addlabel 0=Default, 1=Add label into string, >1=Add first chars into string * @param int $addlabel 0=Default, 1=Add label into string, >1=Add first chars into string
* @param string $moreinpopup Text to add into popu
* @return string Chaine avec URL * @return string Chaine avec URL
*/ */
function getNomUrl($withpicto=0, $option='', $addlabel=0) function getNomUrl($withpicto=0, $option='', $addlabel=0, $moreinpopup='')
{ {
global $langs; global $langs;
...@@ -831,7 +832,8 @@ class Project extends CommonObject ...@@ -831,7 +832,8 @@ class Project extends CommonObject
if (! empty($this->ref)) if (! empty($this->ref))
$label .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref; $label .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
if (! empty($this->title)) if (! empty($this->title))
$label .= '<br><b>' . $langs->trans('Name') . ':</b> ' . $this->title; $label .= '<br><b>' . $langs->trans('Label') . ':</b> ' . $this->title;
if ($moreinpopup) $label.='<br>'.$moreinpopup;
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; $linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
if ($option != 'nolink') { if ($option != 'nolink') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment