From 7412a624c6d23d65b53004b1bf4380873a895758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 14 Feb 2019 21:26:39 +0100 Subject: [PATCH] update html5 contact list --- htdocs/contact/list.php | 53 +++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 244dffcc0e1..71d86016fe6 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -9,6 +9,7 @@ * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2018 Juanjo Menent + * Copyright (C) 2019 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -81,7 +82,7 @@ $search_town=GETPOST('search_town', 'alpha'); $search_import_key=GETPOST("search_import_key", "alpha"); $search_country=GETPOST("search_country", 'intcomma'); -if ($search_status=='') $search_status=1; // always display activ customer first +if ($search_status=='') $search_status=1; // always display active customer first $optioncss = GETPOST('optioncss', 'alpha'); @@ -400,15 +401,15 @@ $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas'; llxHeader('', $title, $help_url); $param=''; -if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; -if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; -$param.='&begin='.urlencode($begin).'&view='.urlencode($view).'&userid='.urlencode($userid).'&contactname='.urlencode($sall); -$param.='&type='.urlencode($type).'&view='.urlencode($view); -if (!empty($search_categ)) $param.='&search_categ='.urlencode($search_categ); -if (!empty($search_categ_thirdparty)) $param.='&search_categ_thirdparty='.urlencode($search_categ_thirdparty); -if (!empty($search_categ_supplier)) $param.='&search_categ_supplier='.urlencode($search_categ_supplier); +if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; +if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; +$param.='&begin='.urlencode($begin).'&userid='.urlencode($userid).'&contactname='.urlencode($sall); +$param.='&type='.urlencode($type).'&view='.urlencode($view); +if (!empty($search_categ)) $param.='&search_categ='.urlencode($search_categ); +if (!empty($search_categ_thirdparty)) $param.='&search_categ_thirdparty='.urlencode($search_categ_thirdparty); +if (!empty($search_categ_supplier)) $param.='&search_categ_supplier='.urlencode($search_categ_supplier); if ($sall != '') $param.='&sall='.urlencode($sall); -if ($search_id > 0) $param.= "&search_id=".urlencode($search_id); +if ($search_id > 0) $param.= "&search_id=".urlencode($search_id); if ($search_lastname != '') $param.='&search_lastname='.urlencode($search_lastname); if ($search_firstname != '') $param.='&search_firstname='.urlencode($search_firstname); if ($search_societe != '') $param.='&search_societe='.urlencode($search_societe); @@ -422,9 +423,9 @@ if ($search_phone_mobile != '') $param.='&search_phone_mobile='.urlencode($s if ($search_fax != '') $param.='&search_fax='.urlencode($search_fax); if ($search_email != '') $param.='&search_email='.urlencode($search_email); if ($search_status != '') $param.='&search_status='.urlencode($search_status); -if ($search_priv == '0' || $search_priv == '1') $param.="&search_priv=".urlencode($search_priv); -if ($search_import_key != '') $param.='&search_import_key='.urlencode($search_import_key); -if ($optioncss != '') $param.='&optioncss='.$optioncss; +if ($search_priv == '0' || $search_priv == '1') $param.="&search_priv=".urlencode($search_priv); +if ($search_import_key != '') $param.='&search_import_key='.urlencode($search_import_key); +if ($optioncss != '') $param.='&optioncss='.$optioncss; // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -572,7 +573,7 @@ if (! empty($arrayfields['p.town']['checked'])) // Country if (! empty($arrayfields['country.code_iso']['checked'])) { - print ''; + print ''; print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth100'); print ''; } @@ -632,7 +633,7 @@ if (! empty($arrayfields['p.thirdparty']['checked'])) } if (! empty($arrayfields['p.priv']['checked'])) { - print ''; + print ''; $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); print $form->selectarray('search_priv', $selectarray, $search_priv, 1); print ''; @@ -670,7 +671,7 @@ if (! empty($arrayfields['p.import_key']['checked'])) print ''; } // Action column -print ''; +print ''; $searchpicto=$form->showFilterButtons(); print $searchpicto; print ''; @@ -697,17 +698,17 @@ if (! empty($arrayfields['p.skype']['checked'])) print_liste_field if (! empty($arrayfields['p.twitter']['checked'])) print_liste_field_titre($arrayfields['p.twitter']['label'], $_SERVER["PHP_SELF"], "p.twitter", $begin, $param, '', $sortfield, $sortorder); if (! empty($arrayfields['p.facebook']['checked'])) print_liste_field_titre($arrayfields['p.facebook']['label'], $_SERVER["PHP_SELF"], "p.facebook", $begin, $param, '', $sortfield, $sortorder); if (! empty($arrayfields['p.thirdparty']['checked'])) print_liste_field_titre($arrayfields['p.thirdparty']['label'], $_SERVER["PHP_SELF"], "s.nom", $begin, $param, '', $sortfield, $sortorder); -if (! empty($arrayfields['p.priv']['checked'])) print_liste_field_titre($arrayfields['p.priv']['label'], $_SERVER["PHP_SELF"], "p.priv", $begin, $param, 'align="center"', $sortfield, $sortorder); +if (! empty($arrayfields['p.priv']['checked'])) print_liste_field_titre($arrayfields['p.priv']['label'], $_SERVER["PHP_SELF"], "p.priv", $begin, $param, '', $sortfield, $sortorder, 'center '); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields $parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; -if (! empty($arrayfields['p.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); -if (! empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); -if (! empty($arrayfields['p.statut']['checked'])) print_liste_field_titre($arrayfields['p.statut']['label'], $_SERVER["PHP_SELF"], "p.statut", "", $param, 'align="center"', $sortfield, $sortorder); -if (! empty($arrayfields['p.import_key']['checked'])) print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, 'align="center"', $sortfield, $sortorder); +if (! empty($arrayfields['p.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +if (! empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +if (! empty($arrayfields['p.statut']['checked'])) print_liste_field_titre($arrayfields['p.statut']['label'], $_SERVER["PHP_SELF"], "p.statut", "", $param, '', $sortfield, $sortorder, 'center '); +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, 'center '); print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); print "\n"; @@ -787,7 +788,7 @@ while ($i < min($num, $limit)) // Country if (! empty($arrayfields['country.code_iso']['checked'])) { - print ''; + print ''; $tmparray=getCountry($obj->fk_pays, 'all'); print $tmparray['label']; print ''; @@ -867,7 +868,7 @@ while ($i < min($num, $limit)) // Private/Public if (! empty($arrayfields['p.priv']['checked'])) { - print ''.$contactstatic->LibPubPriv($obj->priv).''; + print ''.$contactstatic->LibPubPriv($obj->priv).''; if (! $i) $totalarray['nbfield']++; } @@ -880,7 +881,7 @@ while ($i < min($num, $limit)) // Date creation if (! empty($arrayfields['p.datec']['checked'])) { - print ''; + print ''; print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; @@ -888,7 +889,7 @@ while ($i < min($num, $limit)) // Date modification if (! empty($arrayfields['p.tms']['checked'])) { - print ''; + print ''; print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; if (! $i) $totalarray['nbfield']++; @@ -896,7 +897,7 @@ while ($i < min($num, $limit)) // Status if (! empty($arrayfields['p.statut']['checked'])) { - print ''.$contactstatic->getLibStatut(3).''; + print ''.$contactstatic->getLibStatut(3).''; if (! $i) $totalarray['nbfield']++; } if (! empty($arrayfields['p.import_key']['checked'])) @@ -908,7 +909,7 @@ while ($i < min($num, $limit)) } // Action column - print ''; + print ''; 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;