|
@@ -924,11 +924,15 @@ if (!empty($arrayfields['p.datee']['checked'])) {
|
|
|
print '</td>';
|
|
|
}
|
|
|
if (!empty($arrayfields['p.public']['checked'])) {
|
|
|
- print '<td class="liste_titre">';
|
|
|
+ print '<td class="liste_titre center">';
|
|
|
$array = array(''=>'', 0 => $langs->trans("PrivateProject"), 1 => $langs->trans("SharedProject"));
|
|
|
print $form->selectarray('search_public', $array, $search_public);
|
|
|
print '</td>';
|
|
|
}
|
|
|
+if (!empty($arrayfields['c.assigned']['checked'])) {
|
|
|
+ print '<td class="liste_titre center">';
|
|
|
+ print '</td>';
|
|
|
+}
|
|
|
// Opp status
|
|
|
if (!empty($arrayfields['p.fk_opp_status']['checked'])) {
|
|
|
print '<td class="liste_titre nowrap center">';
|
|
@@ -954,10 +958,6 @@ if (!empty($arrayfields['p.budget_amount']['checked'])) {
|
|
|
print '<input type="text" class="flat" name="search_budget_amount" size="4" value="'.$search_budget_amount.'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
-if (!empty($arrayfields['c.assigned']['checked'])) {
|
|
|
- print '<td class="liste_titre right">';
|
|
|
- print '</td>';
|
|
|
-}
|
|
|
if (!empty($arrayfields['p.usage_opportunity']['checked'])) {
|
|
|
print '<td class="liste_titre nowrap right">';
|
|
|
print $form->selectyesno('search_usage_opportunity', $search_usage_opportunity, 1, false, 1);
|
|
@@ -1060,7 +1060,10 @@ if (!empty($arrayfields['p.datee']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['p.datee']['label'], $_SERVER["PHP_SELF"], "p.datee", "", $param, '', $sortfield, $sortorder, 'center ');
|
|
|
}
|
|
|
if (!empty($arrayfields['p.public']['checked'])) {
|
|
|
- print_liste_field_titre($arrayfields['p.public']['label'], $_SERVER["PHP_SELF"], "p.public", "", $param, "", $sortfield, $sortorder);
|
|
|
+ print_liste_field_titre($arrayfields['p.public']['label'], $_SERVER["PHP_SELF"], "p.public", "", $param, "", $sortfield, $sortorder, 'center ');
|
|
|
+}
|
|
|
+if (!empty($arrayfields['c.assigned']['checked'])) {
|
|
|
+ print_liste_field_titre($arrayfields['c.assigned']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center ', '');
|
|
|
}
|
|
|
if (!empty($arrayfields['p.fk_opp_status']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['p.fk_opp_status']['label'], $_SERVER["PHP_SELF"], 'p.fk_opp_status', "", $param, '', $sortfield, $sortorder, 'center ');
|
|
@@ -1077,9 +1080,6 @@ if (!empty($arrayfields['opp_weighted_amount']['checked'])) {
|
|
|
if (!empty($arrayfields['p.budget_amount']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['p.budget_amount']['label'], $_SERVER["PHP_SELF"], 'p.budget_amount', "", $param, '', $sortfield, $sortorder, 'right ');
|
|
|
}
|
|
|
-if (!empty($arrayfields['c.assigned']['checked'])) {
|
|
|
- print_liste_field_titre($arrayfields['c.assigned']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center ', '');
|
|
|
-}
|
|
|
if (!empty($arrayfields['p.usage_opportunity']['checked'])) {
|
|
|
print_liste_field_titre($arrayfields['p.usage_opportunity']['label'], $_SERVER["PHP_SELF"], 'p.usage_opportunity', "", $param, '', $sortfield, $sortorder, 'right ');
|
|
|
}
|
|
@@ -1258,17 +1258,54 @@ while ($i < min($num, $limit)) {
|
|
|
}
|
|
|
// Visibility
|
|
|
if (!empty($arrayfields['p.public']['checked'])) {
|
|
|
- print '<td class="left">';
|
|
|
+ print '<td class="center">';
|
|
|
if ($obj->public) {
|
|
|
- print $langs->trans('SharedProject');
|
|
|
+ print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"');
|
|
|
+ //print $langs->trans('SharedProject');
|
|
|
} else {
|
|
|
- print $langs->trans('PrivateProject');
|
|
|
+ print img_picto($langs->trans('PrivateProject'), 'private', 'class="paddingrightonly"');
|
|
|
+ //print $langs->trans('PrivateProject');
|
|
|
}
|
|
|
print '</td>';
|
|
|
if (!$i) {
|
|
|
$totalarray['nbfield']++;
|
|
|
}
|
|
|
}
|
|
|
+ // Contacts of project
|
|
|
+ if (!empty($arrayfields['c.assigned']['checked'])) {
|
|
|
+ print '<td class="center">';
|
|
|
+ $ifisrt = 1;
|
|
|
+ foreach (array('internal', 'external') as $source) {
|
|
|
+ $tab = $object->liste_contact(-1, $source);
|
|
|
+ $numcontact = count($tab);
|
|
|
+ if (!empty($numcontact)) {
|
|
|
+ foreach ($tab as $contactproject) {
|
|
|
+ //var_dump($contacttask);
|
|
|
+ if ($source == 'internal') {
|
|
|
+ $c = new User($db);
|
|
|
+ } else {
|
|
|
+ $c = new Contact($db);
|
|
|
+ }
|
|
|
+ $c->fetch($contactproject['id']);
|
|
|
+ if (!empty($c->photo)) {
|
|
|
+ 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 {
|
|
|
+ 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'));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $ifisrt = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ print '</td>';
|
|
|
+ }
|
|
|
// Opp Status
|
|
|
if (!empty($arrayfields['p.fk_opp_status']['checked'])) {
|
|
|
print '<td class="center">';
|
|
@@ -1340,41 +1377,6 @@ while ($i < min($num, $limit)) {
|
|
|
$totalarray['pos'][$totalarray['nbfield']] = 'p.budget_amount';
|
|
|
}
|
|
|
}
|
|
|
- // Contacts of project
|
|
|
- if (!empty($arrayfields['c.assigned']['checked'])) {
|
|
|
- print '<td class="center">';
|
|
|
- $ifisrt = 1;
|
|
|
- foreach (array('internal', 'external') as $source) {
|
|
|
- $tab = $object->liste_contact(-1, $source);
|
|
|
- $numcontact = count($tab);
|
|
|
- if (!empty($numcontact)) {
|
|
|
- foreach ($tab as $contactproject) {
|
|
|
- //var_dump($contacttask);
|
|
|
- if ($source == 'internal') {
|
|
|
- $c = new User($db);
|
|
|
- } else {
|
|
|
- $c = new Contact($db);
|
|
|
- }
|
|
|
- $c->fetch($contactproject['id']);
|
|
|
- if (!empty($c->photo)) {
|
|
|
- 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 {
|
|
|
- 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'));
|
|
|
- }
|
|
|
- }
|
|
|
- $ifisrt = 0;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- print '</td>';
|
|
|
- }
|
|
|
// Usage opportunity
|
|
|
if (!empty($arrayfields['p.usage_opportunity']['checked'])) {
|
|
|
print '<td class="right">';
|