This commit is contained in:
Laurent Destailleur 2020-05-15 17:14:28 +02:00
parent bfbe0037b6
commit 9fb1766266
3 changed files with 8 additions and 6 deletions

View File

@ -2226,10 +2226,10 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'; print '<td>';
print $projectstatic->getNomUrl(1); print $projectstatic->getNomUrl(1, '', 0, '', '-', 0 , -1, 'nowraponall');
if (!in_array('projectlabel', $hiddenfields)) print '<br><span class="opacitymedium">'.dol_trunc($objp->title, 24).'</span>'; if (!in_array('projectlabel', $hiddenfields)) print '<br><span class="opacitymedium">'.dol_trunc($objp->title, 24).'</span>';
print '</td>'; print '</td>';
print '<td>'; print '<td class="nowraponall tdoverflowmax100">';
if ($objp->fk_soc > 0) if ($objp->fk_soc > 0)
{ {
$thirdpartystatic->id = $objp->fk_soc; $thirdpartystatic->id = $objp->fk_soc;

View File

@ -1026,18 +1026,19 @@ class Project extends CommonObject
} }
/** /**
* Return clicable name (with picto eventually) * Return clickable name (with picto eventually)
* *
* @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 where the link point to ('', '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 popup * @param string $moreinpopup Text to add into popup
* @param string $sep Separator between ref and label if option addlabel is set * @param string $sep Separator between ref and label if option addlabel is set
* @param int $notooltip 1=Disable tooltip * @param int $notooltip 1=Disable tooltip
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @param string $morecss More css on a link
* @return string String with URL * @return string String with URL
*/ */
public function getNomUrl($withpicto = 0, $option = '', $addlabel = 0, $moreinpopup = '', $sep = ' - ', $notooltip = 0, $save_lastsearch_value = -1) public function getNomUrl($withpicto = 0, $option = '', $addlabel = 0, $moreinpopup = '', $sep = ' - ', $notooltip = 0, $save_lastsearch_value = -1, $morecss = '')
{ {
global $conf, $langs, $user, $hookmanager; global $conf, $langs, $user, $hookmanager;
@ -1115,6 +1116,7 @@ class Project extends CommonObject
if (!$this->public) $picto = 'project'; if (!$this->public) $picto = 'project';
$linkstart = '<a href="'.$url.'"'; $linkstart = '<a href="'.$url.'"';
$linkstart .= ($morecss ? ' class="'.$morecss.'"' : '');
$linkstart .= $linkclose.'>'; $linkstart .= $linkclose.'>';
$linkend = '</a>'; $linkend = '</a>';

View File

@ -318,7 +318,7 @@ if ($resql)
} }
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td class="nowrap">'; print '<td class="nowraponall tdoverflowmax100">';
if ($obj->socid) if ($obj->socid)
{ {
$companystatic->id = $obj->socid; $companystatic->id = $obj->socid;