diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index f3074d94172..3dcc0c7bf48 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -3318,7 +3318,7 @@ class Adherent extends CommonObject } $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'type')) { $return .= '
'.$this->type.''; diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index cdb7f5a3086..aaef5aa96a7 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -1004,7 +1004,7 @@ class AdherentType extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; //$return .= ''; diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 90f211d7a33..d6409c802cb 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -527,7 +527,7 @@ class Subscription extends CommonObject $return .= ''; $return .= '
'; - $return .= ''.(property_exists($this, 'fk_adherent')? $this->fk_adherent: $this->ref ).''; + $return .= ''.(property_exists($this, 'fk_adherent')? $this->fk_adherent: $this->ref ).''; $return .= ''; if (property_exists($this, 'dateh') || property_exists($this, 'datef')) { $return .= '
'.dol_print_date($this->dateh, 'day').' - '.dol_print_date($this->datef, 'day').''; diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index b54eb38ebd4..932ed215007 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -1588,7 +1588,7 @@ class BOM extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : '').''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : '').''; $return .= ''; if (property_exists($this, 'fields') && !empty($this->fields['bomtype']['arrayofkeyval'])) { $return .= '
'.$langs->trans("Type").' : '; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index f49fa4974c6..a7963191627 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -4002,7 +4002,7 @@ class Propal extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'fk_project')) { $return .= ' | '.$this->fk_project.''; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 4f33b72da17..7a39b845dd3 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1851,7 +1851,7 @@ class Account extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'type_lib')) { diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 7029bddb6d1..8e7ccc4183f 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -806,7 +806,7 @@ class PaymentVarious extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (property_exists($this, 'fk_bank')) { $return .= ' | '.$this->fk_bank.''; diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php index 373bd6560cf..8c4a194737a 100644 --- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php +++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php @@ -490,7 +490,7 @@ class CashControl extends CommonObject //var_dump($this->fields['rowid']);exit; $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1, 1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1, 1) : $this->ref).''; $return .= ''; if (property_exists($this, 'posmodule')) { $return .= '
'.substr($langs->trans("Module/Application"), 0, 12).' : '.$this->posmodule.''; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 492fd51e618..1821d43cce8 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -5972,7 +5972,7 @@ class Facture extends CommonInvoice //$return .= ''; // Can be image $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (property_exists($this, 'socid')) { $return .= '
'.$this->socid.''; diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 7adb74fbc4e..04e3d5a5e35 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -649,7 +649,7 @@ class Localtax extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'label')) { $return .= ' | '.$this->label.''; diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 3732c37ab2f..3f0d1931b10 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -1052,7 +1052,7 @@ class RemiseCheque extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'date_bordereau')) { diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index b1c0d4e0775..4784f72d455 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -2546,7 +2546,7 @@ class BonPrelevement extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (property_exists($this, 'date_echeance')) { diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 34586a5468e..d74d90c40be 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -769,7 +769,7 @@ class ChargeSociales extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(0) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(0) : $this->ref).''; $return .= ''; if (property_exists($this, 'label')) { $return .= '  
'.$this->label.'
'; diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index c25f126c68a..a5488ab5e43 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -924,7 +924,7 @@ class Tva extends CommonObject //$return .= ''; // Can be image $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (property_exists($this, 'amount')) { $return .= ' | '.$langs->trans("Amount").' : '.price($this->amount).''; diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 27a28b3f1dc..58b04f0b894 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2856,7 +2856,7 @@ class Contrat extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (!empty($arraydata['thirdparty'])) { $tmpthirdparty = $arraydata['thirdparty']; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 9be7f0b71c9..d6aff7a1237 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7412,8 +7412,6 @@ abstract class CommonObject $form = new Form($this->db); } - $objectid = $this->id; // Not used ??? - $label = empty($val['label']) ? '' : $val['label']; $type = empty($val['type']) ? '' : $val['type']; $size = empty($val['css']) ? '' : $val['css']; @@ -7445,7 +7443,11 @@ abstract class CommonObject } if (preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg)) { $type = 'link'; - $param['options'] = array($reg[1].':'.$reg[2]=>$reg[1].':'.$reg[2]); + $stringforoptions = $reg[1].':'.$reg[2]; + if ($reg[1] == 'User') { + $stringforoptions .= ':-1'; + } + $param['options'] = array($stringforoptions => $stringforoptions); } elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { $param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N'); $type = 'sellist'; @@ -7744,7 +7746,7 @@ abstract class CommonObject // only if something to display (perf) if ($value) { - $param_list = array_keys($param['options']); // $param_list='ObjectName:classPath' + $param_list = array_keys($param['options']); // Example: $param_list='ObjectName:classPath:-1::customer' $InfoFieldList = explode(":", $param_list[0]); $classname = $InfoFieldList[0]; @@ -8592,9 +8594,10 @@ abstract class CommonObject * @param int|string $overwritetitle Do not add title tag on image * @param int $usesharelink Use the public shared link of image (if not available, the 'nophoto' image will be shown instead) * @param string $cache A string if we want to use a cached version of image + * @param string $addphotorefcss Add CSS to img of photos * @return string Html code to show photo. Number of photos shown is saved in this->nbphoto */ - public function show_photos($modulepart, $sdir, $size = 0, $nbmax = 0, $nbbyrow = 5, $showfilename = 0, $showaction = 0, $maxHeight = 120, $maxWidth = 160, $nolink = 0, $overwritetitle = 0, $usesharelink = 0, $cache = '') + public function show_photos($modulepart, $sdir, $size = 0, $nbmax = 0, $nbbyrow = 5, $showfilename = 0, $showaction = 0, $maxHeight = 120, $maxWidth = 160, $nolink = 0, $overwritetitle = 0, $usesharelink = 0, $cache = '', $addphotorefcss = 'photoref') { // phpcs:enable global $conf, $user, $langs; @@ -8706,28 +8709,26 @@ abstract class CommonObject } } - $addphotorefcss = 1; - if ($usesharelink) { if ($val['share']) { if (empty($maxHeight) || ($photo_vignette && $imgarray['height'] > $maxHeight)) { $return .= ''; - $return .= ''; + $return .= ''; } else { $return .= ''; - $return .= ''; + $return .= ''; } } else { $return .= ''; - $return .= ''; + $return .= ''; } } else { if (empty($maxHeight) || ($photo_vignette && $imgarray['height'] > $maxHeight)) { $return .= ''; - $return .= ''; + $return .= ''; } else { $return .= ''; - $return .= ''; + $return .= ''; } } diff --git a/htdocs/core/class/commonorder.class.php b/htdocs/core/class/commonorder.class.php index e624beae75b..b585d939822 100644 --- a/htdocs/core/class/commonorder.class.php +++ b/htdocs/core/class/commonorder.class.php @@ -52,7 +52,7 @@ abstract class CommonOrder extends CommonObject $return .= img_picto('', 'order'); $return .= '
'; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'thirdparty') && is_object($this->thirdparty)) { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f492e676003..d66529a2a9c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -9136,17 +9136,19 @@ class Form print '
use_javascript_ajax) ? '' : ' style="display:none"') . '>'; if (!empty($conf->global->MAIN_LINK_BY_REF_IN_LINKTO)) { - print '
'; + print '
'."\n"; + print ''."\n"; + print ''; print ''; print ''; print ''; print ''; print ''; print ''; - print ''; - print ''; + //print ''; + print ''; print ''; print '
' . $langs->trans("Ref") . ' '; - print ' '; - print '' . $langs->trans("Ref") . ' '; + print ' '; + print '
'; print '
'; @@ -9160,6 +9162,7 @@ class Form $i = 0; print '
'; + print ''."\n"; print '
'; print ''; print ''; @@ -9195,11 +9198,13 @@ class Form } print ''; print '
'; - print ''; + if ($num) { + print ''; + } if (empty($conf->use_javascript_ajax)) { - print '
'; + print '
'; } else { - print '
'; + print '
'; } print ''; $this->db->free($resqllist); diff --git a/htdocs/core/class/timespent.class.php b/htdocs/core/class/timespent.class.php index 840cb49d359..2c98c9747ec 100755 --- a/htdocs/core/class/timespent.class.php +++ b/htdocs/core/class/timespent.class.php @@ -865,7 +865,7 @@ class TimeSpent extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; //$return .= ''; if (property_exists($this, 'label')) { diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 15261d7bbc8..f2417aa4859 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -1179,7 +1179,7 @@ class Don extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (property_exists($this, 'date')) { $return .= ' | '.$langs->trans("Date").' : '.dol_print_date($this->date).''; diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 3bd1644c49d..020117009a3 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -2783,7 +2783,7 @@ class ExpenseReport extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (property_exists($this, 'fk_user_author') && !empty($this->id)) { $return .= '
'.$this->fk_user_author.''; diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index b065bbb5f16..342709d44be 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -732,7 +732,7 @@ class PaymentExpenseReport extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (property_exists($this, 'datep')) { $return .= '
'.$langs->trans("Date").' : '.dol_print_date($this->db->jdate($this->datep), 'dayhour').''; diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index c01ad5f2eec..a7e319f1f18 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -1498,7 +1498,7 @@ class Fichinter extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (!empty($arraydata['thirdparty'])) { $tmpthirdparty = $arraydata['thirdparty']; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index b9288258626..132c4d036b4 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3661,7 +3661,7 @@ class CommandeFournisseur extends CommonOrder $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'socid') || property_exists($this, 'total_tva')) { $return .='
'.$this->socid.''; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index ae9ee280d04..8563dd96d7c 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -3306,7 +3306,7 @@ class FactureFournisseur extends CommonInvoice $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (!empty($arraydata['thirdparty'])) { $return .= '
'.$arraydata['thirdparty'].''; diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 507d784092a..9a0a56bf27b 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -2490,7 +2490,7 @@ class Holiday extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.$arraydata['user']->getNomUrl(-1).''; + $return .= ''.$arraydata['user']->getNomUrl(-1).''; $return .= ''; if (property_exists($this, 'fk_type')) { $return .= '
'.$langs->trans("Type").' : '; diff --git a/htdocs/hrm/class/evaluation.class.php b/htdocs/hrm/class/evaluation.class.php index 803963a27e2..60330da4564 100644 --- a/htdocs/hrm/class/evaluation.class.php +++ b/htdocs/hrm/class/evaluation.class.php @@ -1075,7 +1075,7 @@ class Evaluation extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (property_exists($this, 'fk_user') && !(empty($this->fk_user))) { $return .= '
'.$langs->trans("Employee").' : '; diff --git a/htdocs/hrm/class/job.class.php b/htdocs/hrm/class/job.class.php index bbcdcf4c1df..fee0f95834b 100644 --- a/htdocs/hrm/class/job.class.php +++ b/htdocs/hrm/class/job.class.php @@ -1074,7 +1074,7 @@ class Job extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(0) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(0) : $this->ref).''; $return .= ''; /*if (property_exists($this, 'deplacement')) { $return .= '
'.$langs->trans("Type").''; diff --git a/htdocs/hrm/class/position.class.php b/htdocs/hrm/class/position.class.php index d2e98a7f28b..226c0b5440b 100644 --- a/htdocs/hrm/class/position.class.php +++ b/htdocs/hrm/class/position.class.php @@ -1138,7 +1138,7 @@ class Position extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (property_exists($this, 'fk_user') && !(empty($this->fk_user))) { $return .= '
'.$langs->trans("Employee").' : '; diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php index 42be9146978..39a33822e9e 100644 --- a/htdocs/hrm/class/skill.class.php +++ b/htdocs/hrm/class/skill.class.php @@ -1133,7 +1133,7 @@ class Skill extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'skill_type')) { $return .= '
'.$langs->trans("Type").''; diff --git a/htdocs/knowledgemanagement/class/knowledgerecord.class.php b/htdocs/knowledgemanagement/class/knowledgerecord.class.php index 7ae4ba4ce1b..e26f9c7d96a 100644 --- a/htdocs/knowledgemanagement/class/knowledgerecord.class.php +++ b/htdocs/knowledgemanagement/class/knowledgerecord.class.php @@ -1135,7 +1135,7 @@ class KnowledgeRecord extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (property_exists($this, 'lang') && !empty($this->lang)) { //$return .= '
'.$langs->trans("Language").' : lang).'">'.$langs->trans("Language_".$this->lang, '', '', '', '', 12).''; diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index cd70c383c59..72230a8a1f8 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -743,7 +743,7 @@ class Loan extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (property_exists($this, 'capital')) { $return .= ' | '.$langs->trans("Amount").' : '.price($this->capital).''; diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 911b5eb127f..b5b2f3d7d5b 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -916,7 +916,7 @@ class MyObject extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'label')) { $return .= '
'.$this->label.'
'; diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index 667914f47f4..86eaabcf670 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -360,7 +360,7 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) { $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); } } -// Add where from hooks +// Add groupby from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 368ffa31192..589dc19db47 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -1701,7 +1701,7 @@ class Mo extends CommonObject //$return .= ''; // Can be image $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'fk_bom')) { $return .= '
'.$this->fk_bom.''; diff --git a/htdocs/partnership/class/partnership.class.php b/htdocs/partnership/class/partnership.class.php index 8165e863c05..c4952830e7e 100644 --- a/htdocs/partnership/class/partnership.class.php +++ b/htdocs/partnership/class/partnership.class.php @@ -1343,7 +1343,7 @@ class Partnership extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'label')) { $return .= '
'.$this->label.'
'; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index cea0841588b..6ad5e29b74f 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -6390,7 +6390,7 @@ class Product extends CommonObject $return .= '
'; $label = ''; if ($this->is_photo_available($conf->product->multidir_output[$this->entity])) { - $label .= $this->show_photos('product', $conf->product->multidir_output[$this->entity]); + $label .= $this->show_photos('product', $conf->product->multidir_output[$this->entity], 1, 1, 0, 0, 0, 120, 160, 0, 0, 0, '', 'photoref photokanban'); $return .= $label; } else { if ($this->type == Product::TYPE_PRODUCT) { @@ -6402,7 +6402,7 @@ class Product extends CommonObject } $return .= '
'; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'label')) { $return .= '
'.$this->label.''; diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index 275b5272d9c..97ae607e70b 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -667,7 +667,7 @@ class Inventory extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'label')) { $return .= '
'.$this->label.'
'; diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 1cb3385b2ed..644a4a80912 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -112,13 +112,15 @@ if (isModEnabled('variants') && !empty($conf->global->PRODUIT_ATTRIBUTES_HIDECHI $diroutputmassaction = $conf->product->dir_output.'/temp/massgeneration/'.$user->id; +// Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { + // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; -} // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -310,7 +312,8 @@ if ($search_type == '0') { */ if (GETPOST('cancel', 'alpha')) { - $action = 'list'; $massaction = ''; + $action = 'list'; + $massaction = ''; } if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; @@ -405,6 +408,10 @@ if (empty($reshook)) { * View */ +$product_static = new Product($db); +$static_ws = new Workstation($db); +$product_fourn = new ProductFournisseur($db); + $title = $langs->trans("ProductsAndServices"); if ($search_type != '' && $search_type != '-1') { @@ -415,6 +422,8 @@ if ($search_type != '' && $search_type != '-1') { } } +// Build and execute select +// -------------------------------------------------------------------- $sql = 'SELECT p.rowid, p.ref, p.label, p.fk_product_type, p.barcode, p.price, p.tva_tx, p.price_ttc, p.price_base_type, p.entity,'; $sql .= ' p.fk_product_type, p.duration, p.finished, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock,'; $sql .= ' p.tobatch, '; @@ -445,6 +454,7 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) { $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; +$sql = preg_replace('/,\s*$/', '', $sql); $sqlfields = $sql; // $sql fields to remove for count total @@ -620,9 +630,9 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) { $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key : ''); } } -// Add fields from hooks +// Add groupby from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; //if (GETPOST("toolowstock")) $sql.= " HAVING SUM(s.reel) < p.seuil_stock_alerte"; // Not used yet @@ -640,7 +650,7 @@ if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) { dol_print_error($db); } - if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 + if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller than the paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -662,8 +672,6 @@ if (!$resql) { $num = $db->num_rows($resql); -$arrayofselected = is_array($toselect) ? $toselect : array(); - // Direct jump if only one record found if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) { $obj = $db->fetch_object($resql); @@ -672,6 +680,10 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $ exit; } + +// Output page +// -------------------------------------------------------------------- + $helpurl = ''; if ($search_type != '') { if ($search_type == 0) { @@ -689,6 +701,8 @@ foreach ($searchCategoryProductList as $searchCategoryProduct) { //llxHeader('', $title, $helpurl, '', 0, 0, array(), array(), $paramsCat, 'classforhorizontalscrolloftabs'); llxHeader('', $title, $helpurl, '', 0, 0, array(), array(), $paramsCat, ''); +$arrayofselected = is_array($toselect) ? $toselect : array(); + // Displays product removal confirmation if (GETPOST('delprod')) { setEventMessages($langs->trans("ProductDeleted", GETPOST('delprod')), null, 'mesgs'); @@ -696,7 +710,7 @@ if (GETPOST('delprod')) { $param = ''; if (!empty($mode)) { - $param = "&mode=".urlencode($mode); + $param .= '&mode='.urlencode($mode); } if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); @@ -704,6 +718,9 @@ if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { if ($limit > 0 && $limit != $conf->liste_limit) { $param .= '&limit='.((int) $limit); } +if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); +} if ($sall) { $param .= "&sall=".urlencode($sall); } @@ -758,9 +775,6 @@ if ($type != '') { if ($search_type != '') { $param .= '&search_type='.urlencode($search_type); } -if ($optioncss != '') { - $param .= '&optioncss='.urlencode($optioncss); -} if ($search_accountancy_code_sell) { $param = "&search_accountancy_code_sell=".urlencode($search_accountancy_code_sell); } @@ -836,7 +850,7 @@ if ($type == Product::TYPE_SERVICE) { $newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type='.$type, '', $perm, $params); -print '
'; +print ''; if ($optioncss != '') { print ''; } @@ -847,6 +861,7 @@ print ''; print ''; //print ''; print ''; +print ''; print ''; if (empty($arrayfields['p.fk_product_type']['checked'])) { @@ -907,25 +922,27 @@ if (empty($reshook)) { $moreforfilter = $hookmanager->resPrint; } -if ($moreforfilter) { +if (!empty($moreforfilter)) { print '
'; print $moreforfilter; + $parameters = array(); + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; print '
'; } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; - -$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields -if ($massactionbutton) { - $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); -} +$selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields +$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); print '
'; -print ''."\n"; +print '
'."\n"; -// Lines with input filters +// Fields title search +// -------------------------------------------------------------------- print ''; -if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { +// Action column +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print ''; } -if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { +// Action column +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print ''; } -print ''; +print ''."\n"; +$totalarray = array(); +$totalarray['nbfield'] = 0; + +// Fields title label +// -------------------------------------------------------------------- print ''; -if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { +// Action column +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.rowid']['checked'])) { print_liste_field_titre($arrayfields['p.rowid']['label'], $_SERVER["PHP_SELF"], "p.rowid", "", $param, "", $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.ref']['checked'])) { print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], "p.ref", "", $param, "", $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields['pfp.ref_fourn']['checked'])) { print_liste_field_titre($arrayfields['pfp.ref_fourn']['label'], $_SERVER["PHP_SELF"], "pfp.ref_fourn", "", $param, "", $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields['thumbnail']['checked'])) { print_liste_field_titre($arrayfields['thumbnail']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.label']['checked'])) { print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"], "p.label", "", $param, "", $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.fk_product_type']['checked'])) { print_liste_field_titre($arrayfields['p.fk_product_type']['label'], $_SERVER["PHP_SELF"], "p.fk_product_type", "", $param, "", $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.barcode']['checked'])) { print_liste_field_titre($arrayfields['p.barcode']['label'], $_SERVER["PHP_SELF"], "p.barcode", "", $param, "", $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.duration']['checked'])) { print_liste_field_titre($arrayfields['p.duration']['label'], $_SERVER["PHP_SELF"], "p.duration", "", $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.finished']['checked'])) { print_liste_field_titre($arrayfields['p.finished']['label'], $_SERVER["PHP_SELF"], "p.finished", "", $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.weight']['checked'])) { print_liste_field_titre($arrayfields['p.weight']['label'], $_SERVER['PHP_SELF'], 'p.weight', '', $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.weight_units']['checked'])) { print_liste_field_titre($arrayfields['p.weight_units']['label'], $_SERVER['PHP_SELF'], 'p.weight_units', '', $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.length']['checked'])) { print_liste_field_titre($arrayfields['p.length']['label'], $_SERVER['PHP_SELF'], 'p.length', '', $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.length_units']['checked'])) { print_liste_field_titre($arrayfields['p.length_units']['label'], $_SERVER['PHP_SELF'], 'p.length_units', '', $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.width']['checked'])) { print_liste_field_titre($arrayfields['p.width']['label'], $_SERVER['PHP_SELF'], 'p.width', '', $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.width_units']['checked'])) { print_liste_field_titre($arrayfields['p.width_units']['label'], $_SERVER['PHP_SELF'], 'p.width_units', '', $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.height']['checked'])) { print_liste_field_titre($arrayfields['p.height']['label'], $_SERVER['PHP_SELF'], 'p.height', '', $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.height_units']['checked'])) { print_liste_field_titre($arrayfields['p.height_units']['label'], $_SERVER['PHP_SELF'], 'p.height_units', '', $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.surface']['checked'])) { print_liste_field_titre($arrayfields['p.surface']['label'], $_SERVER['PHP_SELF'], "p.surface", '', $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.surface_units']['checked'])) { print_liste_field_titre($arrayfields['p.surface_units']['label'], $_SERVER['PHP_SELF'], 'p.surface_units', '', $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.volume']['checked'])) { print_liste_field_titre($arrayfields['p.volume']['label'], $_SERVER['PHP_SELF'], 'p.volume', '', $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.volume_units']['checked'])) { print_liste_field_titre($arrayfields['p.volume_units']['label'], $_SERVER['PHP_SELF'], 'p.volume_units', '', $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['cu.label']['checked'])) { print_liste_field_titre($arrayfields['cu.label']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.fk_default_workstation']['checked'])) { print_liste_field_titre($arrayfields['p.fk_default_workstation']['label'], $_SERVER['PHP_SELF'], 'ws.ref', '', $param, '', $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.sellprice']['checked'])) { print_liste_field_titre($arrayfields['p.sellprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); + $totalarray['nbfield']++; } // Multiprices @@ -1283,99 +1332,125 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES)) { foreach ($arraypricelevel as $key => $value) { if (!empty($arrayfields['p.sellprice'.$key]['checked'])) { print_liste_field_titre($arrayfields['p.sellprice'.$key]['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); + $totalarray['nbfield']++; } } } if (!empty($arrayfields['p.minbuyprice']['checked'])) { print_liste_field_titre($arrayfields['p.minbuyprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.numbuyprice']['checked'])) { print_liste_field_titre($arrayfields['p.numbuyprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.tva_tx']['checked'])) { print_liste_field_titre($arrayfields['p.tva_tx']['label'], $_SERVER["PHP_SELF"], 'p.tva_tx', "", $param, '', $sortfield, $sortorder, 'right '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.pmp']['checked'])) { print_liste_field_titre($arrayfields['p.pmp']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.cost_price']['checked'])) { print_liste_field_titre($arrayfields['p.cost_price']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.seuil_stock_alerte']['checked'])) { print_liste_field_titre($arrayfields['p.seuil_stock_alerte']['label'], $_SERVER["PHP_SELF"], "p.seuil_stock_alerte", "", $param, '', $sortfield, $sortorder, 'right '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.desiredstock']['checked'])) { print_liste_field_titre($arrayfields['p.desiredstock']['label'], $_SERVER["PHP_SELF"], "p.desiredstock", "", $param, '', $sortfield, $sortorder, 'right '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.stock']['checked'])) { print_liste_field_titre($arrayfields['p.stock']['label'], $_SERVER["PHP_SELF"], "p.stock", "", $param, '', $sortfield, $sortorder, 'right '); + $totalarray['nbfield']++; } if (!empty($arrayfields['stock_virtual']['checked'])) { print_liste_field_titre($arrayfields['stock_virtual']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ', 'VirtualStockDesc'); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.tobatch']['checked'])) { print_liste_field_titre($arrayfields['p.tobatch']['label'], $_SERVER["PHP_SELF"], "p.tobatch", "", $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.fk_country']['checked'])) { print_liste_field_titre($arrayfields['p.fk_country']['label'], $_SERVER["PHP_SELF"], "p.fk_country", "", $param, '', $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.fk_state']['checked'])) { print_liste_field_titre($arrayfields['p.fk_state']['label'], $_SERVER["PHP_SELF"], "p.fk_state", "", $param, '', $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['checked'])) { print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_sell", "", $param, '', $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['checked'])) { print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_sell_intra", "", $param, '', $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['checked'])) { print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_sell_export", "", $param, '', $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['checked'])) { print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_buy", "", $param, '', $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['checked'])) { print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_buy_intra", "", $param, '', $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['checked'])) { print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_buy_export", "", $param, '', $sortfield, $sortorder); + $totalarray['nbfield']++; } // 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); +$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // 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, '', $sortfield, $sortorder, 'center nowrap '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.tms']['checked'])) { print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.tosell']['checked'])) { print_liste_field_titre($arrayfields['p.tosell']['label'], $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['p.tobuy']['checked'])) { print_liste_field_titre($arrayfields['p.tobuy']['label'], $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } -if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { +// Action column +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); + $totalarray['nbfield']++; } -print "\n"; +print ''."\n"; - -$product_static = new Product($db); -$static_ws = new Workstation($db); -$product_fourn = new ProductFournisseur($db); - +// Loop on record +// -------------------------------------------------------------------- $i = 0; +$savnbfield = $totalarray['nbfield']; $totalarray = array(); $totalarray['nbfield'] = 0; $imaxinloop = ($limit ? min($num, $limit) : $num); while ($i < $imaxinloop) { $obj = $db->fetch_object($resql); + if (empty($obj)) { + break; // Should not happen + } // Multilangs if (getDolGlobalInt('MAIN_MULTILANGS')) { // If multilang is enabled @@ -1446,36 +1521,47 @@ while ($i < $imaxinloop) { } } + $product_static->price = $obj->price; + + $object = $product_static; $usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('product', 'product_advance', 'read_prices'):$user->hasRight('product', 'lire'); if ($product_static->isService()) { $usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('service', 'service_advance', 'read_prices'):$user->hasRight('service', 'lire'); } + if ($mode == 'kanban') { if ($i == 0) { - print ''; } } else { - print ''; + // Show line of result + $j = 0; + print ''; // Action column - if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print ''; if (!$i) { @@ -2053,14 +2139,14 @@ while ($i < $imaxinloop) { } // Action column - if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print ''; if (!$i) { @@ -2068,14 +2154,12 @@ while ($i < $imaxinloop) { } } - print "\n"; + print ''."\n"; } $i++; } -$db->free($resql); - // If no record found if ($num == 0) { $colspan = 1; @@ -2087,9 +2171,12 @@ if ($num == 0) { print ''; } -print "
'; $searchpicto = $form->showFilterButtons('left'); print $searchpicto; @@ -1192,90 +1209,122 @@ if (!empty($arrayfields['p.tobuy']['checked'])) { print $form->selectarray('search_tobuy', array('0'=>$langs->trans('ProductStatusNotOnBuyShort'), '1'=>$langs->trans('ProductStatusOnBuyShort')), $search_tobuy, 1, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage'); print ''; $searchpicto = $form->showFilterButtons(); print $searchpicto; print '
'; + print '
'; print '
'; } - $product_static->price = $obj->price; // Output Kanban - print $product_static->getKanbanView('', array('selected' => in_array($product_static->id, $arrayofselected))); + 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; + if (in_array($object->id, $arrayofselected)) { + $selected = 1; + } + } + print $object->getKanbanView('', array('selected' => in_array($object->id, $arrayofselected))); if ($i == ($imaxinloop - 1)) { 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; - if (in_array($obj->rowid, $arrayofselected)) { + if (in_array($object->id, $arrayofselected)) { $selected = 1; } - print ''; + 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; - if (in_array($obj->rowid, $arrayofselected)) { + if (in_array($object->id, $arrayofselected)) { $selected = 1; } - print ''; + print ''; } print '
'.$langs->trans("NoRecordFound").'
"; -print "
"; -print '
'; +$db->free($resql); + +print ''."\n"; +print '
'."\n"; + +print ''."\n"; // End of page llxFooter(); diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index 61d422b83d1..5c9ec6849d3 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -984,7 +984,7 @@ class Entrepot extends CommonObject $return .= img_picto('', $this->picto); $return .= '
'; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'lieu') && (!empty($this->lieu))) { $return .= '
'.$this->lieu.''; diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 02194beebb5..eb0911b3f57 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -292,9 +292,9 @@ class Project extends CommonObject 'fk_user_close' =>array('type'=>'integer', 'label'=>'UserClosing', 'enabled'=>1, 'visible'=>0, 'position'=>110), 'opp_amount' =>array('type'=>'double(24,8)', 'label'=>'OpportunityAmountShort', 'enabled'=>1, 'visible'=>'getDolGlobalString("PROJECT_USE_OPPORTUNITIES")', 'position'=>115), 'budget_amount' =>array('type'=>'double(24,8)', 'label'=>'Budget', 'enabled'=>1, 'visible'=>-1, 'position'=>119), - 'usage_bill_time' =>array('type'=>'integer', 'label'=>'UsageBillTimeShort', 'enabled'=>1, 'visible'=>-1, 'position'=>130), - 'usage_opportunity' =>array('type'=>'integer', 'label'=>'UsageOpportunity', 'enabled'=>1, 'visible'=>-1, 'position'=>135), - 'usage_task' =>array('type'=>'integer', 'label'=>'UsageTasks', 'enabled'=>1, 'visible'=>-1, 'position'=>140), + 'usage_opportunity' =>array('type'=>'integer', 'label'=>'UsageOpportunity', 'enabled'=>1, 'visible'=>-1, 'position'=>130), + 'usage_task' =>array('type'=>'integer', 'label'=>'UsageTasks', 'enabled'=>1, 'visible'=>-1, 'position'=>135), + 'usage_bill_time' =>array('type'=>'integer', 'label'=>'UsageBillTimeShort', 'enabled'=>1, 'visible'=>-1, 'position'=>140), 'usage_organize_event' =>array('type'=>'integer', 'label'=>'UsageOrganizeEvent', 'enabled'=>1, 'visible'=>-1, 'position'=>145), // Properties for event organization 'date_start_event' =>array('type'=>'date', 'label'=>'DateStartEvent', 'enabled'=>"isModEnabled('eventorganization')", 'visible'=>1, 'position'=>200), @@ -2401,7 +2401,7 @@ class Project extends CommonObject //$return .= ''; // Can be image $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref); + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref); if ($this->hasDelay()) { $return .= img_warning($langs->trans('Late')); } diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 84383e63b14..82bbe79edf9 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -2368,7 +2368,7 @@ class Task extends CommonObjectLine //$return .= ''; // Can be image $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (!empty($arraydata['projectlink'])) { //$tmpproject = $arraydata['project']; diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index a4a39f0c2f4..4d751918432 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -1153,44 +1153,44 @@ if (!empty($arrayfields['p.budget_amount']['checked'])) { print ''; } if (!empty($arrayfields['p.usage_opportunity']['checked'])) { - print ''; - print $form->selectyesno('search_usage_opportunity', $search_usage_opportunity, 1, false, 1); + print ''; + print $form->selectyesno('search_usage_opportunity', $search_usage_opportunity, 1, false, 1, 1); print ''; print ''; } if (!empty($arrayfields['p.usage_task']['checked'])) { - print ''; - print $form->selectyesno('search_usage_task', $search_usage_task, 1, false, 1); + print ''; + print $form->selectyesno('search_usage_task', $search_usage_task, 1, false, 1, 1); print ''; } if (!empty($arrayfields['p.usage_bill_time']['checked'])) { - print ''; - print $form->selectyesno('search_usage_bill_time', $search_usage_bill_time, 1, false, 1); + print ''; + print $form->selectyesno('search_usage_bill_time', $search_usage_bill_time, 1, false, 1, 1); print ''; } if (!empty($arrayfields['p.usage_organize_event']['checked'])) { - print ''; - print $form->selectyesno('search_usage_event_organization', $search_usage_event_organization, 1, false, 1); + print ''; + print $form->selectyesno('search_usage_event_organization', $search_usage_event_organization, 1, false, 1, 1); print ''; } if (!empty($arrayfields['p.accept_conference_suggestions']['checked'])) { - print ''; - print $form->selectyesno('search_accept_conference_suggestions', $search_accept_conference_suggestions, 1, false, 1); + print ''; + print $form->selectyesno('search_accept_conference_suggestions', $search_accept_conference_suggestions, 1, false, 1, 1); print ''; } if (!empty($arrayfields['p.accept_booth_suggestions']['checked'])) { - print ''; - print $form->selectyesno('search_accept_booth_suggestions', $search_accept_booth_suggestions, 1, false, 1); + print ''; + print $form->selectyesno('search_accept_booth_suggestions', $search_accept_booth_suggestions, 1, false, 1, 1); print ''; } if (!empty($arrayfields['p.price_registration']['checked'])) { print ''; - print ''; + print ''; print ''; } if (!empty($arrayfields['p.price_booth']['checked'])) { print ''; - print ''; + print ''; print ''; } if (!empty($arrayfields['u.login']['checked'])) { @@ -1313,27 +1313,27 @@ if (!empty($arrayfields['p.budget_amount']['checked'])) { $totalarray['nbfield']++; } 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, ''); $totalarray['nbfield']++; } 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, ''); $totalarray['nbfield']++; } 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, ''); $totalarray['nbfield']++; } 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, ''); $totalarray['nbfield']++; } 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, ''); $totalarray['nbfield']++; } 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, ''); $totalarray['nbfield']++; } if (!empty($arrayfields['p.price_registration']['checked'])) { @@ -1720,7 +1720,7 @@ while ($i < $imaxinloop) { } // Usage opportunity if (!empty($arrayfields['p.usage_opportunity']['checked'])) { - print ''; + print ''; if ($obj->usage_opportunity) { print yn($obj->usage_opportunity); } @@ -1731,7 +1731,7 @@ while ($i < $imaxinloop) { } // Usage task if (!empty($arrayfields['p.usage_task']['checked'])) { - print ''; + print ''; if ($obj->usage_task) { print yn($obj->usage_task); } @@ -1742,7 +1742,7 @@ while ($i < $imaxinloop) { } // Bill time if (!empty($arrayfields['p.usage_bill_time']['checked'])) { - print ''; + print ''; if ($obj->usage_bill_time) { print yn($obj->usage_bill_time); } @@ -1753,7 +1753,7 @@ while ($i < $imaxinloop) { } // Event Organization if (!empty($arrayfields['p.usage_organize_event']['checked'])) { - print ''; + print ''; if ($obj->usage_organize_event) { print yn($obj->usage_organize_event); } @@ -1764,7 +1764,7 @@ while ($i < $imaxinloop) { } // Allow unknown people to suggest conferences if (!empty($arrayfields['p.accept_conference_suggestions']['checked'])) { - print ''; + print ''; if ($obj->accept_conference_suggestions) { print yn($obj->accept_conference_suggestions); } @@ -1775,7 +1775,7 @@ while ($i < $imaxinloop) { } // Allow unknown people to suggest booth if (!empty($arrayfields['p.accept_booth_suggestions']['checked'])) { - print ''; + print ''; if ($obj->accept_booth_suggestions) { print yn($obj->accept_booth_suggestions); } diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php index 9d75781056a..71fbe249031 100644 --- a/htdocs/recruitment/class/recruitmentcandidature.class.php +++ b/htdocs/recruitment/class/recruitmentcandidature.class.php @@ -1046,7 +1046,7 @@ class RecruitmentCandidature extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (property_exists($this, 'fk_recruitmentjobposition')) { $return .= '
'.$langs->trans('Job').' : '.$this->fk_recruitmentjobposition.''; diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php index 065d56d8857..f4301837ef2 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -1126,7 +1126,7 @@ class RecruitmentJobPosition extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (property_exists($this, 'date_planned')) { $return .= '
'.$langs->trans("Date").' : '.dol_print_date($this->db->jdate($this->date_planned), 'day').''; diff --git a/htdocs/salaries/class/paymentsalary.class.php b/htdocs/salaries/class/paymentsalary.class.php index 4294dd47478..5c5ff3255c5 100644 --- a/htdocs/salaries/class/paymentsalary.class.php +++ b/htdocs/salaries/class/paymentsalary.class.php @@ -782,7 +782,7 @@ class PaymentSalary extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (property_exists($this, 'fk_bank')) { $return .= ' | '.$this->fk_bank.''; diff --git a/htdocs/salaries/class/salary.class.php b/htdocs/salaries/class/salary.class.php index 6446e86655f..1d778e8a661 100644 --- a/htdocs/salaries/class/salary.class.php +++ b/htdocs/salaries/class/salary.class.php @@ -743,7 +743,7 @@ class Salary extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (!empty($arraydata['user']) && is_object($arraydata['user'])) { $return .= '
'.$arraydata['user']->getNomUrl(1, '', 0, 0, 16, 0, '', 'maxwidth100').''; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index a9f9cdea193..287114d0f1e 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -5256,7 +5256,7 @@ class Societe extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'code_client')) { $return .= '
'.$this->code_client.''; diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 7c9de7608ec..ffe6423fc22 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -2784,7 +2784,7 @@ class SupplierProposal extends CommonObject //$return .= ''; // Can be image $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'socid')) { $return .= ' | '.$this->socid.''; diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index 113588d897a..8882bf8e220 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -95,8 +95,8 @@ if (!defined('ISLOADEDBYSTEELSHEET')) { padding-top: 5px; padding-bottom: 5px; } -.info-box-sm .info-box-icon { - height: 96px; /* must match height of info-box-sm .info-box-content */ +.info-box-sm .info-box-icon, .info-box-sm .info-box-img { + height: 96px !important; /* must match height of info-box-sm .info-box-content */ width: 78px; font-size: 25px; line-height: 92px; diff --git a/htdocs/theme/md/btn.inc.php b/htdocs/theme/md/btn.inc.php index fdd9668c7d3..3e8195e0372 100644 --- a/htdocs/theme/md/btn.inc.php +++ b/htdocs/theme/md/btn.inc.php @@ -297,8 +297,8 @@ div.pagination li:first-child a.btnTitle { .btnTitle, a.btnTitle { display: inline-block; - padding: 6px 12px; - font-size: 14px + padding: 4px 12px; + font-size: 14px; font-weight: 400; line-height: 1.4; text-align: center; diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php index c685d13146a..87953857343 100644 --- a/htdocs/theme/md/info-box.inc.php +++ b/htdocs/theme/md/info-box.inc.php @@ -208,15 +208,31 @@ a.info-box-text-a i.fa.fa-exclamation-triangle { } -.info-box-sm .info-box-icon { - height: 96px; +.info-box-module .info-box-icon { + padding-top: 4px; + padding-bottom: 4px; +} +.info-box-sm .info-box-icon, .info-box-sm .info-box-img { + height: 96px !important; /* must match height of info-box-sm .info-box-content */ width: 80px; font-size: 25px; line-height: 92px; } -.info-box-module .info-box-icon { - padding-top: 4px; - padding-bottom: 4px; +.info-box-order { + border-top-left-radius: 2px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 2px; + display: block; + overflow: hidden; + float: left; + height: 115px; + width: 88px; + text-align: center; + font-size: 2.3em; + line-height: 115px; + margin-right: 10px; + background: var(--colorbacktitle1) !important; } .opened-dash-board-wrap .info-box .info-box-icon { font-size: 2em; @@ -286,6 +302,32 @@ a.info-box-text-a i.fa.fa-exclamation-triangle { bottom: 0; } +/* customize section img box on list of products */ +.info-box-img { + height: 105px !important; + width: 88px; + border-top-left-radius: 2px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 2px; + display: block; + overflow: hidden; + float: left; + text-align: center; + font-size: 2.8em; + line-height: 90px; + margin-right: 5px; + background: var(--colorbacktitle1) !important; +} +.info-box-img > img { + width: 90%; + position: relative; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + + global->MAIN_DISABLE_GLOBAL_BOXSTATS) && !empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD)) { ?> .info-box-icon-text{ opacity: 1; @@ -535,7 +577,9 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) { .info-box-module .info-box-content { height: 6.3em; } - +.fright { + float:right; +} @media only screen and (max-width: 1740px) { .info-box-module { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index a6f2d19172f..1cda692ecc8 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -525,7 +525,7 @@ input, input.flat, textarea, textarea.flat, form.flat select, select, select.fla input { line-height: 17px; - padding: 4px; + padding: 5px; padding-left: 5px; } select { @@ -3939,13 +3939,14 @@ div.colorback table.liste, table.noborder:not(.paymenttable):not(.margintable):not(.tableforcontact), table.formdoc, div.noborder:not(.paymenttable):not(.margintable):not(.tableforcontact) { - border-left: 1px solid var(--colortopbordertitle1); - border-right: 1px solid var(--colortopbordertitle1); - -} -table.liste, table.noborder.paymenttable, table.noborder.margintable, table.noborder.tableforcontact, table.formdoc, div.noborder.paymenttable, div.noborder.margintable, div.noborder.tableforcontact { + /* border-left: 1px solid var(--colortopbordertitle1); + border-right: 1px solid var(--colortopbordertitle1); */ + border-left: 1px solid #ccc; + border-right: 1px solid #ccc; + border-left: 1px solid #f0f0f0; border-right: 1px solid #f0f0f0; + } table.liste, table.noborder, table.formdoc, div.noborder { width: calc(100% - 2px); /* -2 to fix a bug. Without, a scroll appears due to overflow-x: auto; of div-table-responsive */ @@ -3961,7 +3962,7 @@ table.liste, table.noborder, table.formdoc, div.noborder { border-bottom-color: #BBB; border-bottom-style: solid; - margin: 0px 0px 20px 0px; + margin: 0px 0px 15px 0px; -webkit-border-radius: 0.1em; border-radius: 0.1em; @@ -4538,8 +4539,10 @@ div .tdtop:not(.tagtdnote) { /* Prepare to remove class pair - impair */ -.noborder > tbody > tr:nth-child(even):not(.liste_titre):not(.nooddeven), .liste > tbody > tr:nth-child(even):not(.liste_titre):not(.nooddeven), -div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright) > .border > tbody > tr:nth-of-type(even):not(.liste_titre):not(.nooddeven), .liste > tbody > tr:nth-of-type(even):not(.liste_titre):not(.nooddeven), +.noborder > tbody > tr:nth-child(even):not(.liste_titre):not(.nooddeven), +.liste > tbody > tr:nth-child(even):not(.liste_titre):not(.nooddeven), +div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright) > .border > tbody > table:not(.tableforfieldedit) > tr:nth-of-type(even):not(.liste_titre):not(.nooddeven), +.liste > tbody > tr:nth-of-type(even):not(.liste_titre):not(.nooddeven), div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright) .oddeven.tagtr:nth-of-type(even):not(.liste_titre):not(.nooddeven) { background: linear-gradient(to bottom, var(--colorbacklineimpair2) 0%, var(--colorbacklineimpair2) 100%); @@ -4547,14 +4550,17 @@ div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright) .oddeven.tagtr:nt background: -moz-linear-gradient(bottom, var(--colorbacklineimpair2) 0%, var(--colorbacklineimpair2) 100%); background: -webkit-linear-gradient(bottom, var(--colorbacklineimpair2) 0%, var(--colorbacklineimpair2) 100%); } -.noborder > tbody > tr:nth-child(even):not(:last-of-type) td:not(.liste_titre), .liste > tbody > tr:nth-child(even):not(:last-of-type) td:not(.liste_titre), +.noborder > tbody > tr:nth-child(even):not(:last-of-type) td:not(.liste_titre), +.liste > tbody > tr:nth-child(even):not(:last-of-type) td:not(.liste_titre), .noborder .tagtr:nth-child(even):not(:last-of-type) .oddeven.tagtd:not(.liste_titre) { border-bottom: 1px solid #ddd; } -.noborder > tbody > tr:nth-child(odd):not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(.liste_titre):not(.nooddeven), -div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright) > .border > tbody > tr:nth-of-type(odd):not(.liste_titre):not(.nooddeven), .liste > tbody > tr:nth-of-type(odd):not(.liste_titre):not(.nooddeven), +.noborder > tbody > tr:nth-child(odd):not(.liste_titre):not(.nooddeven), +.liste > tbody > tr:nth-child(odd):not(.liste_titre):not(.nooddeven), +div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright) > .border > tbody > table:not(.tableforfieldedit) > tr:nth-of-type(odd):not(.liste_titre):not(.nooddeven), +.liste > tbody > tr:nth-of-type(odd):not(.liste_titre):not(.nooddeven), div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright) .oddeven.tagtr:nth-of-type(odd):not(.liste_titre):not(.nooddeven) { background: linear-gradient(to bottom, var(--colorbacklinepair1) 0%, var(--colorbacklinepair2) 100%); @@ -4562,7 +4568,8 @@ div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright) .oddeven.tagtr:nt background: -moz-linear-gradient(bottom, var(--colorbacklinepair1) 0%, var(--colorbacklinepair2) 100%); background: -webkit-linear-gradient(bottom, var(--colorbacklinepair1) 0%, var(--colorbacklinepair2) 100%); } -.noborder > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre), +.noborder > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre), +.liste > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre), .noborder .tagtr:nth-child(odd):not(:last-child) .oddeven.tagtd:not(.liste_titre) { border-bottom: 1px solid #ddd; @@ -6493,11 +6500,11 @@ select.multiselectononeline { { /* CSS to have the dropdown boxes larger that the input search area */ .select2-container.select2-container--open:not(.graphtype) .select2-dropdown.ui-dialog { - min-width: 220px !important; + min-width: 240px !important; } .select2-container.select2-container--open:not(.graphtype) .select2-dropdown--below:not(.onrightofpage), .select2-container.select2-container--open:not(.graphtype) .select2-dropdown--above:not(.onrightofpage) { - min-width: 220px !important; + min-width: 240px !important; } .onrightofpage span.select2-dropdown.ui-dialog.select2-dropdown--below, .onrightofpage span.select2-dropdown.ui-dialog.select2-dropdown--above { diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 92baa55ea89..158f3e30e2f 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -3030,7 +3030,7 @@ class Ticket extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; $return .= ''; if (!empty($arraydata['user_assignment'])) { $return .= '
'.$arraydata['user_assignment'].''; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 2901efda215..af624e6b149 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -3103,7 +3103,7 @@ class User extends CommonObject //$return .= ''; // Can be image $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'label')) { $return .= '
'.$this->label.''; diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index b077650846e..a55778c1d51 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -990,7 +990,7 @@ class UserGroup extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; if (property_exists($this, 'members')) { $return .= '
'.(empty($this->nb_users) ? 0 : $this->nb_users).' '.$langs->trans('Users').'';