Debug kanban
This commit is contained in:
parent
341a9ad283
commit
75cddd8c09
@ -782,7 +782,7 @@ while ($i < $imaxinloop) {
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||||
// Fields from hook
|
// Fields from hook
|
||||||
$parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
$parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
/*if (!empty($arrayfields['anotherfield']['checked'])) {
|
/*if (!empty($arrayfields['anotherfield']['checked'])) {
|
||||||
print '<td class="right">'.$obj->anotherfield.'</td>';
|
print '<td class="right">'.$obj->anotherfield.'</td>';
|
||||||
|
|||||||
@ -202,8 +202,11 @@ class Project extends CommonObject
|
|||||||
public $statut; // 0=draft, 1=opened, 2=closed
|
public $statut; // 0=draft, 1=opened, 2=closed
|
||||||
|
|
||||||
public $opp_status; // opportunity status, into table llx_c_lead_status
|
public $opp_status; // opportunity status, into table llx_c_lead_status
|
||||||
|
public $opp_status_code;
|
||||||
public $fk_opp_status; // opportunity status, into table llx_c_lead_status
|
public $fk_opp_status; // opportunity status, into table llx_c_lead_status
|
||||||
|
public $opp_amount; // opportunity amount
|
||||||
public $opp_percent; // opportunity probability
|
public $opp_percent; // opportunity probability
|
||||||
|
public $opp_weighted_amount; // opportunity weighted amount
|
||||||
|
|
||||||
public $email_msgid;
|
public $email_msgid;
|
||||||
|
|
||||||
@ -2389,14 +2392,31 @@ class Project extends CommonObject
|
|||||||
//$return .= '<i class="fa fa-dol-action"></i>'; // Can be image
|
//$return .= '<i class="fa fa-dol-action"></i>'; // Can be image
|
||||||
$return .= '</span>';
|
$return .= '</span>';
|
||||||
$return .= '<div class="info-box-content">';
|
$return .= '<div class="info-box-content">';
|
||||||
$return .= '<span class="info-box-ref">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).'</span>';
|
$return .= '<span class="info-box-ref">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref);
|
||||||
if (property_exists($this, 'date_start_event')) {
|
if ($this->hasDelay()) {
|
||||||
$return .= '<br><span class="info-bo-label opacitymedium">'.$langs->trans("DateStart").'</span>';
|
$return .= img_warning($langs->trans('Late'));
|
||||||
$return .= '<span class="info-box-label "> : '.dol_print_date($this->db->jdate($this->date_start_event), 'day').'</>';
|
|
||||||
}
|
}
|
||||||
if (property_exists($this, 'user_author_id')) {
|
$return .= '</span>';
|
||||||
|
if (property_exists($this, 'date_start') && $this->date_start) {
|
||||||
|
$return .= '<br><span class="info-box-label ">'.dol_print_date($this->date_start, 'day').'</>';
|
||||||
|
}
|
||||||
|
if (property_exists($this, 'date_end') && $this->date_end) {
|
||||||
|
if ($this->date_start) {
|
||||||
|
$return .= ' - ';
|
||||||
|
} else {
|
||||||
|
$return .= '<br>';
|
||||||
|
}
|
||||||
|
$return .= '<span class="info-box-label ">'.dol_print_date($this->date_end, 'day').'</>';
|
||||||
|
}
|
||||||
|
/*if (property_exists($this, 'user_author_id')) {
|
||||||
$return .= '<br><span class="info-box-label opacitymedium">'.$langs->trans("Author").'</span>';
|
$return .= '<br><span class="info-box-label opacitymedium">'.$langs->trans("Author").'</span>';
|
||||||
$return .= '<span> : '.$user->getNomUrl(1).'</span>';
|
$return .= '<span> : '.$user->getNomUrl(1).'</span>';
|
||||||
|
}*/
|
||||||
|
if ($this->usage_opportunity && $this->opp_status_code) {
|
||||||
|
//$return .= '<br><span class="info-bo-label opacitymedium">'.$langs->trans("OpportunityStatusShort").'</span>';
|
||||||
|
$return .= '<br><span class="info-box-label ">'. $langs->trans("OppStatus".$this->opp_status_code);
|
||||||
|
$return .= ' <span class="opacitymedium">('.round($this->opp_percent).'%)</span>';
|
||||||
|
$return .= '</>';
|
||||||
}
|
}
|
||||||
if (method_exists($this, 'getLibStatut')) {
|
if (method_exists($this, 'getLibStatut')) {
|
||||||
$return .= '<br><div class="info-box-status margintoponly">'.$this->getLibStatut(5).'</div>';
|
$return .= '<br><div class="info-box-status margintoponly">'.$this->getLibStatut(5).'</div>';
|
||||||
|
|||||||
@ -379,6 +379,7 @@ $companystatic = new Societe($db);
|
|||||||
$taskstatic = new Task($db);
|
$taskstatic = new Task($db);
|
||||||
$formother = new FormOther($db);
|
$formother = new FormOther($db);
|
||||||
$formproject = new FormProjets($db);
|
$formproject = new FormProjets($db);
|
||||||
|
$userstatic = new User($db);
|
||||||
|
|
||||||
$help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
|
$help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
|
||||||
$title = $langs->trans("LeadsOrProjects");
|
$title = $langs->trans("LeadsOrProjects");
|
||||||
@ -1244,111 +1245,147 @@ if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
|||||||
}
|
}
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
|
$totalarray = array();
|
||||||
|
$totalarray['nbfield'] = 0;
|
||||||
|
|
||||||
|
// Fields title label
|
||||||
|
// --------------------------------------------------------------------
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.ref']['checked'])) {
|
if (!empty($arrayfields['p.ref']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], "p.ref", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], "p.ref", "", $param, "", $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.title']['checked'])) {
|
if (!empty($arrayfields['p.title']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.title']['label'], $_SERVER["PHP_SELF"], "p.title", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['p.title']['label'], $_SERVER["PHP_SELF"], "p.title", "", $param, "", $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['s.nom']['checked'])) {
|
if (!empty($arrayfields['s.nom']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], "s.name_alias", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], "s.name_alias", "", $param, "", $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['commercial']['checked'])) {
|
if (!empty($arrayfields['commercial']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['commercial']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder, 'tdoverflowmax100imp ');
|
print_liste_field_titre($arrayfields['commercial']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder, 'tdoverflowmax100imp ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.dateo']['checked'])) {
|
if (!empty($arrayfields['p.dateo']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.dateo']['label'], $_SERVER["PHP_SELF"], "p.dateo", "", $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre($arrayfields['p.dateo']['label'], $_SERVER["PHP_SELF"], "p.dateo", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.datee']['checked'])) {
|
if (!empty($arrayfields['p.datee']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.datee']['label'], $_SERVER["PHP_SELF"], "p.datee", "", $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre($arrayfields['p.datee']['label'], $_SERVER["PHP_SELF"], "p.datee", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.public']['checked'])) {
|
if (!empty($arrayfields['p.public']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.public']['label'], $_SERVER["PHP_SELF"], "p.public", "", $param, "", $sortfield, $sortorder, 'center ');
|
print_liste_field_titre($arrayfields['p.public']['label'], $_SERVER["PHP_SELF"], "p.public", "", $param, "", $sortfield, $sortorder, 'center ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['c.assigned']['checked'])) {
|
if (!empty($arrayfields['c.assigned']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['c.assigned']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center ', '');
|
print_liste_field_titre($arrayfields['c.assigned']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center ', '');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.fk_opp_status']['checked'])) {
|
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 ');
|
print_liste_field_titre($arrayfields['p.fk_opp_status']['label'], $_SERVER["PHP_SELF"], 'p.fk_opp_status', "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.opp_amount']['checked'])) {
|
if (!empty($arrayfields['p.opp_amount']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.opp_amount']['label'], $_SERVER["PHP_SELF"], 'p.opp_amount', "", $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['p.opp_amount']['label'], $_SERVER["PHP_SELF"], 'p.opp_amount', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.opp_percent']['checked'])) {
|
if (!empty($arrayfields['p.opp_percent']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.opp_percent']['label'], $_SERVER['PHP_SELF'], 'p.opp_percent', "", $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['p.opp_percent']['label'], $_SERVER['PHP_SELF'], 'p.opp_percent', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['opp_weighted_amount']['checked'])) {
|
if (!empty($arrayfields['opp_weighted_amount']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['opp_weighted_amount']['label'], $_SERVER['PHP_SELF'], 'opp_weighted_amount', '', $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['opp_weighted_amount']['label'], $_SERVER['PHP_SELF'], 'opp_weighted_amount', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.budget_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 ');
|
print_liste_field_titre($arrayfields['p.budget_amount']['label'], $_SERVER["PHP_SELF"], 'p.budget_amount', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.usage_opportunity']['checked'])) {
|
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 ');
|
print_liste_field_titre($arrayfields['p.usage_opportunity']['label'], $_SERVER["PHP_SELF"], 'p.usage_opportunity', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.usage_task']['checked'])) {
|
if (!empty($arrayfields['p.usage_task']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.usage_task']['label'], $_SERVER["PHP_SELF"], 'p.usage_task', "", $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['p.usage_task']['label'], $_SERVER["PHP_SELF"], 'p.usage_task', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.usage_bill_time']['checked'])) {
|
if (!empty($arrayfields['p.usage_bill_time']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.usage_bill_time']['label'], $_SERVER["PHP_SELF"], 'p.usage_bill_time', "", $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['p.usage_bill_time']['label'], $_SERVER["PHP_SELF"], 'p.usage_bill_time', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.usage_organize_event']['checked'])) {
|
if (!empty($arrayfields['p.usage_organize_event']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.usage_organize_event']['label'], $_SERVER["PHP_SELF"], 'p.usage_organize_event', "", $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['p.usage_organize_event']['label'], $_SERVER["PHP_SELF"], 'p.usage_organize_event', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.accept_conference_suggestions']['checked'])) {
|
if (!empty($arrayfields['p.accept_conference_suggestions']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.accept_conference_suggestions']['label'], $_SERVER["PHP_SELF"], 'p.accept_conference_suggestions', "", $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['p.accept_conference_suggestions']['label'], $_SERVER["PHP_SELF"], 'p.accept_conference_suggestions', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.accept_booth_suggestions']['checked'])) {
|
if (!empty($arrayfields['p.accept_booth_suggestions']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.accept_booth_suggestions']['label'], $_SERVER["PHP_SELF"], 'p.accept_booth_suggestions', "", $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['p.accept_booth_suggestions']['label'], $_SERVER["PHP_SELF"], 'p.accept_booth_suggestions', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.price_registration']['checked'])) {
|
if (!empty($arrayfields['p.price_registration']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.price_registration']['label'], $_SERVER["PHP_SELF"], 'p.price_registration', "", $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['p.price_registration']['label'], $_SERVER["PHP_SELF"], 'p.price_registration', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.price_booth']['checked'])) {
|
if (!empty($arrayfields['p.price_booth']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.price_booth']['label'], $_SERVER["PHP_SELF"], 'p.price_booth', "", $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['p.price_booth']['label'], $_SERVER["PHP_SELF"], 'p.price_booth', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['u.login']['checked'])) {
|
if (!empty($arrayfields['u.login']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||||
// Hook fields
|
// Hook fields
|
||||||
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
|
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (!empty($arrayfields['p.datec']['checked'])) {
|
if (!empty($arrayfields['p.datec']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.tms']['checked'])) {
|
if (!empty($arrayfields['p.tms']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.email_msgid']['checked'])) {
|
if (!empty($arrayfields['p.email_msgid']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.email_msgid']['label'], $_SERVER["PHP_SELF"], "p.email_msgid", "", $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre($arrayfields['p.email_msgid']['label'], $_SERVER["PHP_SELF"], "p.email_msgid", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.import_key']['checked'])) {
|
if (!empty($arrayfields['p.import_key']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, '', $sortfield, $sortorder, '');
|
print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, '', $sortfield, $sortorder, '');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.fk_statut']['checked'])) {
|
if (!empty($arrayfields['p.fk_statut']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.fk_statut']['label'], $_SERVER["PHP_SELF"], "p.fk_statut", "", $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre($arrayfields['p.fk_statut']['label'], $_SERVER["PHP_SELF"], "p.fk_statut", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
// Action column
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
|
print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
print "</tr>\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
$userstatic = new User($db);
|
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
$savnbfield = $totalarray['nbfield'];
|
||||||
$totalarray = array(
|
$totalarray = array(
|
||||||
'nbfield' => 0,
|
'nbfield' => 0,
|
||||||
'val' => array(),
|
'val' => array()
|
||||||
);
|
);
|
||||||
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
while ($i < $imaxinloop) {
|
while ($i < $imaxinloop) {
|
||||||
@ -1358,18 +1395,32 @@ while ($i < $imaxinloop) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$object->id = $obj->id;
|
$object->id = $obj->id;
|
||||||
$object->user_author_id = $obj->fk_user_creat;
|
|
||||||
$object->public = $obj->public;
|
|
||||||
$object->ref = $obj->ref;
|
$object->ref = $obj->ref;
|
||||||
$object->datee = $db->jdate($obj->date_end);
|
$object->title = $obj->title;
|
||||||
|
$object->fk_opp_status = $obj->fk_opp_status;
|
||||||
|
$object->user_author_id = $obj->fk_user_creat;
|
||||||
|
$object->date_creation = $db->jdate($obj->date_creation);
|
||||||
|
$object->date_start = $db->jdate($obj->date_start);
|
||||||
|
$object->date_end = $db->jdate($obj->date_end);
|
||||||
$object->statut = $obj->status; // deprecated
|
$object->statut = $obj->status; // deprecated
|
||||||
$object->status = $obj->status;
|
$object->status = $obj->status;
|
||||||
$object->public = $obj->public;
|
$object->public = $obj->public;
|
||||||
|
$object->opp_percent = $obj->opp_percent;
|
||||||
$object->opp_status = $obj->fk_opp_status;
|
$object->opp_status = $obj->fk_opp_status;
|
||||||
$object->title = $obj->title;
|
$object->opp_status_code = $obj->opp_status_code;
|
||||||
|
$object->opp_amount = $obj->opp_ammount;
|
||||||
|
$object->opp_weighted_amount = $obj->opp_weighted_amount;
|
||||||
|
$object->budget_amount = $obj->budget_amount;
|
||||||
|
$object->usage_opportunity = $obj->usage_opportunity;
|
||||||
|
$object->usage_task = $obj->usage_task;
|
||||||
|
$object->usage_bill_time = $obj->usage_bill_time;
|
||||||
|
$object->usage_organize_event = $obj->usage_organize_event;
|
||||||
|
$object->email_msgid = $obj->email_msgid;
|
||||||
|
$object->import_key = $obj->import_key;
|
||||||
|
|
||||||
$userAccess = $object->restrictedProjectArea($user); // why this ?
|
|
||||||
if ($userAccess >= 0) {
|
//$userAccess = $object->restrictedProjectArea($user); // disabled, permission on project must be done by the select
|
||||||
|
//if ($userAccess >= 0) {
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
$companystatic->id = $obj->socid;
|
$companystatic->id = $obj->socid;
|
||||||
$companystatic->name = $obj->name;
|
$companystatic->name = $obj->name;
|
||||||
@ -1385,32 +1436,29 @@ while ($i < $imaxinloop) {
|
|||||||
|
|
||||||
if ($mode == 'kanban') {
|
if ($mode == 'kanban') {
|
||||||
if ($i == 0) {
|
if ($i == 0) {
|
||||||
print '<tr><td colspan="12">';
|
print '<tr><td colspan="'.$savnbfield.'">';
|
||||||
print '<div class="box-flex-container">';
|
print '<div class="box-flex-container kanban">';
|
||||||
}
|
}
|
||||||
$object->date_start_event = $obj->date_start;
|
|
||||||
|
|
||||||
$userstatic->id = $obj->fk_user_creat;
|
|
||||||
$object->user_author_id = $userstatic->id;
|
|
||||||
//var_dump($object->user_author_id);exit;
|
|
||||||
print $object->getKanbanView('');
|
print $object->getKanbanView('');
|
||||||
|
|
||||||
if ($i == min($num, $limit)-1) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print '<tr class="oddeven">';
|
// Show here line of result
|
||||||
|
$j = 0;
|
||||||
|
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||||
// Action column
|
// Action column
|
||||||
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="nowrap center">';
|
print '<td class="nowrap center">';
|
||||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
$selected = 0;
|
$selected = 0;
|
||||||
if (in_array($obj->id, $arrayofselected)) {
|
if (in_array($object->id, $arrayofselected)) {
|
||||||
$selected = 1;
|
$selected = 1;
|
||||||
}
|
}
|
||||||
print '<input id="cb'.$obj->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
@ -1432,7 +1480,7 @@ while ($i < $imaxinloop) {
|
|||||||
// Title
|
// Title
|
||||||
if (!empty($arrayfields['p.title']['checked'])) {
|
if (!empty($arrayfields['p.title']['checked'])) {
|
||||||
print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($obj->title).'">';
|
print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($obj->title).'">';
|
||||||
print $obj->title;
|
print dol_escape_htmltag($obj->title);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
@ -1440,7 +1488,7 @@ while ($i < $imaxinloop) {
|
|||||||
}
|
}
|
||||||
// Company
|
// Company
|
||||||
if (!empty($arrayfields['s.nom']['checked'])) {
|
if (!empty($arrayfields['s.nom']['checked'])) {
|
||||||
print '<td class="tdoverflowmax100">';
|
print '<td class="tdoverflowmax125">';
|
||||||
if ($obj->socid) {
|
if ($obj->socid) {
|
||||||
print $companystatic->getNomUrl(1, '', 0, 0, -1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1);
|
print $companystatic->getNomUrl(1, '', 0, 0, -1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1);
|
||||||
} else {
|
} else {
|
||||||
@ -1778,8 +1826,8 @@ while ($i < $imaxinloop) {
|
|||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||||
// Fields from hook
|
// Fields from hook
|
||||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
$parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
// Date creation
|
// Date creation
|
||||||
if (!empty($arrayfields['p.datec']['checked'])) {
|
if (!empty($arrayfields['p.datec']['checked'])) {
|
||||||
@ -1821,14 +1869,14 @@ while ($i < $imaxinloop) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Action column
|
// Action column
|
||||||
if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="nowrap center">';
|
print '<td class="nowrap center">';
|
||||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
$selected = 0;
|
$selected = 0;
|
||||||
if (in_array($obj->id, $arrayofselected)) {
|
if (in_array($object->id, $arrayofselected)) {
|
||||||
$selected = 1;
|
$selected = 1;
|
||||||
}
|
}
|
||||||
print '<input id="cb'.$obj->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
@ -1836,9 +1884,9 @@ while ($i < $imaxinloop) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</tr>\n";
|
print '</tr>'."\n";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
//}
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -1863,10 +1911,10 @@ $parameters = array('arrayfields'=>$arrayfields, 'sql' => $sql);
|
|||||||
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
print "</table>\n";
|
print '</table>'."\n";
|
||||||
print '</div>';
|
print '</div>'."\n";
|
||||||
|
|
||||||
print "</form>\n";
|
print '</form>'."\n";
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user