Skip to content

Commit

Permalink
Fix label of project was not visible
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jun 3, 2015
1 parent 76865c0 commit d109c78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions htdocs/core/lib/project.lib.php
Expand Up @@ -541,16 +541,16 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t
{
$projectstatic->id=$lines[$i]->fk_project;
$projectstatic->ref=$lines[$i]->projectref;
$projectstatic->title=$lines[$i]->projectlabel;
$projectstatic->public=$lines[$i]->public;
$projectstatic->label=$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project];

$taskstatic->id=$lines[$i]->id;

print "<tr ".$bc[$var].">\n";

// Project
print "<td>";
print $projectstatic->getNomUrl(1);
print $projectstatic->getNomUrl(1,'',0,$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]);
print "</td>";

// Ref
Expand Down Expand Up @@ -711,9 +711,9 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
print '<td class="nowrap">';
$projectstatic->id=$lines[$i]->fk_project;
$projectstatic->ref=$lines[$i]->projectref;
$projectstatic->title=$lines[$i]->projectlabel;
$projectstatic->public=$lines[$i]->public;
$projectstatic->label=$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project];
print $projectstatic->getNomUrl(1);
print $projectstatic->getNomUrl(1,'',0,$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]);
print "</td>";

// Ref
Expand Down
6 changes: 4 additions & 2 deletions htdocs/projet/class/project.class.php
Expand Up @@ -818,9 +818,10 @@ function LibStatut($statut, $mode=0)
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param string $option Variant ('', 'nolink')
* @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
*/
function getNomUrl($withpicto=0, $option='', $addlabel=0)
function getNomUrl($withpicto=0, $option='', $addlabel=0, $moreinpopup='')
{
global $langs;

Expand All @@ -831,7 +832,8 @@ function getNomUrl($withpicto=0, $option='', $addlabel=0)
if (! empty($this->ref))
$label .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
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">';

if ($option != 'nolink') {
Expand Down

0 comments on commit d109c78

Please sign in to comment.