Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/core/lib/project.lib.php htdocs/projet/list.php
This commit is contained in:
commit
5070a40fa4
@ -1395,14 +1395,14 @@ class Contact extends CommonObject
|
|||||||
* @param string $moreparam Add more param into URL
|
* @param string $moreparam Add more param into URL
|
||||||
* @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 int $notooltip 1=Disable tooltip
|
* @param int $notooltip 1=Disable tooltip
|
||||||
|
* @param string $morecss Add more css on link
|
||||||
* @return string String with URL
|
* @return string String with URL
|
||||||
*/
|
*/
|
||||||
public function getNomUrl($withpicto = 0, $option = '', $maxlen = 0, $moreparam = '', $save_lastsearch_value = -1, $notooltip = 0)
|
public function getNomUrl($withpicto = 0, $option = '', $maxlen = 0, $moreparam = '', $save_lastsearch_value = -1, $notooltip = 0, $morecss = '')
|
||||||
{
|
{
|
||||||
global $conf, $langs, $hookmanager;
|
global $conf, $langs, $hookmanager;
|
||||||
|
|
||||||
$result = ''; $label = '';
|
$result = ''; $label = '';
|
||||||
|
|
||||||
if (!empty($this->photo) && class_exists('Form')) {
|
if (!empty($this->photo) && class_exists('Form')) {
|
||||||
$label .= '<div class="photointooltip floatright">';
|
$label .= '<div class="photointooltip floatright">';
|
||||||
$label .= Form::showphoto('contact', $this, 0, 40, 0, 'photoref', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip.
|
$label .= Form::showphoto('contact', $this, 0, 40, 0, 'photoref', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip.
|
||||||
@ -1454,7 +1454,7 @@ class Contact extends CommonObject
|
|||||||
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
|
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||||
}
|
}
|
||||||
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
|
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||||
$linkclose .= ' class="classfortooltip"';
|
$linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$hookmanager->initHooks(array('contactdao'));
|
$hookmanager->initHooks(array('contactdao'));
|
||||||
@ -1476,7 +1476,7 @@ class Contact extends CommonObject
|
|||||||
$result .= $linkstart;
|
$result .= $linkstart;
|
||||||
if ($withpicto) {
|
if ($withpicto) {
|
||||||
if ($withpicto == -2) {
|
if ($withpicto == -2) {
|
||||||
$result .= '<!-- picto photo user --><span class="nopadding userimg'.($moreparam ? ' '.$moreparam : '').'">'.Form::showphoto('contact', $this, 0, 0, 0, 'userphoto'.($withpicto == -3 ? 'small' : ''), 'mini', 0, 1).'</span>';
|
$result .= '<!-- picto photo user --><span class="nopadding userimg'.($morecss ? ' '.$morecss : '').'">'.Form::showphoto('contact', $this, 0, 0, 0, 'userphoto'.($withpicto == -3 ? 'small' : ''), 'mini', 0, 1).'</span>';
|
||||||
} else {
|
} else {
|
||||||
$result .= img_object(($notooltip ? '' : $label), ( $this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
|
$result .= img_object(($notooltip ? '' : $label), ( $this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -679,22 +679,23 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
|||||||
|
|
||||||
// Title of task
|
// Title of task
|
||||||
if (count($arrayfields) > 0 && !empty($arrayfields['t.label']['checked'])) {
|
if (count($arrayfields) > 0 && !empty($arrayfields['t.label']['checked'])) {
|
||||||
print '<td>';
|
$labeltoshow = '';
|
||||||
if ($showlineingray) {
|
if ($showlineingray) {
|
||||||
print '<i>';
|
$labeltoshow .= '<i>';
|
||||||
}
|
}
|
||||||
//else print '<a href="'.DOL_URL_ROOT.'/projet/tasks/task.php?id='.$lines[$i]->id.'&withproject=1">';
|
//else print '<a href="'.DOL_URL_ROOT.'/projet/tasks/task.php?id='.$lines[$i]->id.'&withproject=1">';
|
||||||
for ($k = 0; $k < $level; $k++) {
|
for ($k = 0; $k < $level; $k++) {
|
||||||
print '<div class="marginleftonly">';
|
$labeltoshow .= '<div class="marginleftonly">';
|
||||||
}
|
}
|
||||||
print $lines[$i]->label;
|
$labeltoshow .= dol_escape_htmltag($lines[$i]->label);
|
||||||
for ($k = 0; $k < $level; $k++) {
|
for ($k = 0; $k < $level; $k++) {
|
||||||
print '</div>';
|
$labeltoshow .= '</div>';
|
||||||
}
|
}
|
||||||
if ($showlineingray) {
|
if ($showlineingray) {
|
||||||
print '</i>';
|
$labeltoshow .= '</i>';
|
||||||
}
|
}
|
||||||
//else print '</a>';
|
print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($labeltoshow).'">';
|
||||||
|
print $labeltoshow;
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -822,28 +823,6 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Contacts of tasks. Disabled, because available by default just after
|
|
||||||
/*
|
|
||||||
if (!empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) {
|
|
||||||
print '<td>';
|
|
||||||
foreach (array('internal', 'external') as $source) {
|
|
||||||
$tab = $lines[$i]->liste_contact(-1, $source);
|
|
||||||
$num = count($tab);
|
|
||||||
if (!empty($num)) {
|
|
||||||
foreach ($tab as $contacttask) {
|
|
||||||
//var_dump($contacttask);
|
|
||||||
if ($source == 'internal') {
|
|
||||||
$c = new User($db);
|
|
||||||
} else {
|
|
||||||
$c = new Contact($db);
|
|
||||||
}
|
|
||||||
$c->fetch($contacttask['id']);
|
|
||||||
print $c->getNomUrl(1).' ('.$contacttask['libelle'].')<br>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
print '</td>';
|
|
||||||
}*/
|
|
||||||
if (count($arrayfields) > 0 && !empty($arrayfields['c.budget_amount']['checked'])) {
|
if (count($arrayfields) > 0 && !empty($arrayfields['c.budget_amount']['checked'])) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
print price($lines[$i]->budget_amount, 0, $langs, 1, 0, 0, $conf->currency);
|
print price($lines[$i]->budget_amount, 0, $langs, 1, 0, 0, $conf->currency);
|
||||||
@ -854,6 +833,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
|||||||
// Contacts of task
|
// Contacts of task
|
||||||
if (count($arrayfields) > 0 && !empty($arrayfields['c.assigned']['checked'])) {
|
if (count($arrayfields) > 0 && !empty($arrayfields['c.assigned']['checked'])) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
|
$ifisrt = 1;
|
||||||
foreach (array('internal', 'external') as $source) {
|
foreach (array('internal', 'external') as $source) {
|
||||||
$tab = $lines[$i]->liste_contact(-1, $source);
|
$tab = $lines[$i]->liste_contact(-1, $source);
|
||||||
$numcontact = count($tab);
|
$numcontact = count($tab);
|
||||||
@ -867,14 +847,19 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
|||||||
}
|
}
|
||||||
$c->fetch($contacttask['id']);
|
$c->fetch($contacttask['id']);
|
||||||
if (!empty($c->photo)) {
|
if (!empty($c->photo)) {
|
||||||
print $c->getNomUrl(-2).' ';
|
if (get_class($c) == 'User') {
|
||||||
|
print $c->getNomUrl(-2, '', 0, 0, 24, 1, '', ($ifisrt ? '' : 'notfirst'));
|
||||||
|
} else {
|
||||||
|
print $c->getNomUrl(-2, '', 0, '', -1, 0, ($ifisrt ? '' : 'notfirst'));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (get_class($c) == 'User') {
|
if (get_class($c) == 'User') {
|
||||||
print $c->getNomUrl(2, '', 0, 0, 24, 1);//.' ';
|
print $c->getNomUrl(2, '', 0, 0, 24, 1, '', ($ifisrt ? '' : 'notfirst'));
|
||||||
} else {
|
} else {
|
||||||
print $c->getNomUrl(2);//.' ';
|
print $c->getNomUrl(2, '', 0, '', -1, 0, ($ifisrt ? '' : 'notfirst'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$ifisrt = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1323,6 +1323,7 @@ while ($i < min($num, $limit)) {
|
|||||||
// Contacts of project
|
// Contacts of project
|
||||||
if (!empty($arrayfields['c.assigned']['checked'])) {
|
if (!empty($arrayfields['c.assigned']['checked'])) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
|
$ifisrt = 1;
|
||||||
foreach (array('internal', 'external') as $source) {
|
foreach (array('internal', 'external') as $source) {
|
||||||
$tab = $object->liste_contact(-1, $source);
|
$tab = $object->liste_contact(-1, $source);
|
||||||
$numcontact = count($tab);
|
$numcontact = count($tab);
|
||||||
@ -1336,14 +1337,19 @@ while ($i < min($num, $limit)) {
|
|||||||
}
|
}
|
||||||
$c->fetch($contactproject['id']);
|
$c->fetch($contactproject['id']);
|
||||||
if (!empty($c->photo)) {
|
if (!empty($c->photo)) {
|
||||||
print $c->getNomUrl(-2).' ';
|
if (get_class($c) == 'User') {
|
||||||
|
print $c->getNomUrl(-2, '', 0, 0, 24, 1, '', ($ifisrt ? '' : 'notfirst'));
|
||||||
|
} else {
|
||||||
|
print $c->getNomUrl(-2, '', 0, '', -1, 0, ($ifisrt ? '' : 'notfirst'));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (get_class($c) == 'User') {
|
if (get_class($c) == 'User') {
|
||||||
print $c->getNomUrl(2, '', 0, 0, 24, 1);//.' ';
|
print $c->getNomUrl(2, '', 0, 0, 24, 1, '', ($ifisrt ? '' : 'notfirst'));
|
||||||
} else {
|
} else {
|
||||||
print $c->getNomUrl(2);//.' ';
|
print $c->getNomUrl(2, '', 0, '', -1, 0, ($ifisrt ? '' : 'notfirst'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$ifisrt = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -381,6 +381,10 @@ a.butStatus {
|
|||||||
margin: 0 0.45em !important;
|
margin: 0 0.45em !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span.userimg.notfirst {
|
||||||
|
margin-left: -5px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Used by timesheets */
|
/* Used by timesheets */
|
||||||
span.timesheetalreadyrecorded input {
|
span.timesheetalreadyrecorded input {
|
||||||
border: none;
|
border: none;
|
||||||
|
|||||||
@ -568,6 +568,10 @@ a.butStatus {
|
|||||||
margin: 0 0.45em !important;
|
margin: 0 0.45em !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span.userimg.notfirst {
|
||||||
|
margin-left: -5px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Used by timesheets */
|
/* Used by timesheets */
|
||||||
span.timesheetalreadyrecorded input {
|
span.timesheetalreadyrecorded input {
|
||||||
border: none;
|
border: none;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user