Change on column Assigned to on projet and task.
This commit is contained in:
parent
6acf59fe20
commit
b3b1e82100
@ -844,7 +844,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
}
|
||||
print '</td>';
|
||||
}*/
|
||||
if (count($arrayfields) > 0 && !empty($arrayfields['c.assigned']['checked'])) {
|
||||
if (count($arrayfields) > 0 && !empty($arrayfields['c.budget_amount']['checked'])) {
|
||||
print '<td class="center">';
|
||||
print price($lines[$i]->budget_amount, 0, $langs, 1, 0, 0, $conf->currency);
|
||||
$total_budget_amount += $lines[$i]->budget_amount;
|
||||
@ -856,8 +856,8 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
print '<td class="center">';
|
||||
foreach (array('internal', 'external') as $source) {
|
||||
$tab = $lines[$i]->liste_contact(-1, $source);
|
||||
$num = count($tab);
|
||||
if (!empty($num)) {
|
||||
$numcontact = count($tab);
|
||||
if (!empty($numcontact)) {
|
||||
foreach ($tab as $contacttask) {
|
||||
//var_dump($contacttask);
|
||||
if ($source == 'internal') {
|
||||
|
||||
@ -198,6 +198,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
||||
// Add non object fields to fields for list
|
||||
$arrayfields['s.nom'] = array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'position'=>21, 'enabled'=>(empty($conf->societe->enabled) ? 0 : 1));
|
||||
$arrayfields['commercial'] = array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>0, 'position'=>23);
|
||||
$arrayfields['c.assigned'] = array('label'=>$langs->trans("AssignedTo"), 'checked'=>-1, 'position'=>120);
|
||||
$arrayfields['opp_weighted_amount'] = array('label'=>$langs->trans('OpportunityWeightedAmountShort'), 'checked'=>0, 'position'=> 116, 'enabled'=>(empty($conf->global->PROJECT_USE_OPPORTUNITIES) ? 0 : 1), 'position'=>106);
|
||||
// Force some fields according to search_usage filter...
|
||||
if (GETPOST('search_usage_opportunity')) {
|
||||
@ -911,7 +912,7 @@ if (!empty($arrayfields['p.public']['checked'])) {
|
||||
// Opp status
|
||||
if (!empty($arrayfields['p.fk_opp_status']['checked'])) {
|
||||
print '<td class="liste_titre nowrap center">';
|
||||
print $formproject->selectOpportunityStatus('search_opp_status', $search_opp_status, 1, 0, 1, 0, 'maxwidth100');
|
||||
print $formproject->selectOpportunityStatus('search_opp_status', $search_opp_status, 1, 0, 1, 0, 'maxwidth100', 1);
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['p.opp_amount']['checked'])) {
|
||||
@ -933,6 +934,10 @@ 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);
|
||||
@ -1003,7 +1008,7 @@ if (!empty($arrayfields['p.fk_statut']['checked'])) {
|
||||
$arrayofstatus[$key] = $langs->trans($val);
|
||||
}
|
||||
$arrayofstatus['99'] = $langs->trans("NotClosed").' ('.$langs->trans('Draft').' + '.$langs->trans('Opened').')';
|
||||
print $form->selectarray('search_status', $arrayofstatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'minwidth75imp maxwidth150 selectarrowonleft');
|
||||
print $form->selectarray('search_status', $arrayofstatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'minwidth75imp maxwidth125 selectarrowonleft');
|
||||
print ajax_combobox('search_status');
|
||||
print '</td>';
|
||||
}
|
||||
@ -1052,6 +1057,9 @@ 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 ');
|
||||
}
|
||||
@ -1312,6 +1320,35 @@ 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">';
|
||||
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)) {
|
||||
print $c->getNomUrl(-2).' ';
|
||||
} else {
|
||||
if (get_class($c) == 'User') {
|
||||
print $c->getNomUrl(2, '', 0, 0, 24, 1);//.' ';
|
||||
} else {
|
||||
print $c->getNomUrl(2);//.' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
// Usage opportunity
|
||||
if (!empty($arrayfields['p.usage_opportunity']['checked'])) {
|
||||
print '<td class="right">';
|
||||
|
||||
@ -811,9 +811,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
||||
$linktocreatetask = dolGetButtonTitle($langs->trans('AddTask'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/tasks.php?action=create'.$param.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.$object->id), '', $linktocreatetaskUserRight, $linktocreatetaskParam);
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
|
||||
if ($optioncss != '') {
|
||||
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
}
|
||||
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user