diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 317a650b81f..41ee03cf9a4 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -3252,7 +3252,9 @@ class Adherent extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } if (property_exists($this, 'type')) { $return .= '
'.$this->type.''; } diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 5bf3e4cc51d..b2b1f369575 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -532,8 +532,9 @@ class Subscription extends CommonObject $return .= ''; $return .= $this->getNomUrl(-1); $return .= ''; - $return .= ''; - + if ($selected >= 0) { + $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 798da88add6..b011e3ecb18 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -1624,7 +1624,9 @@ class BOM extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : '').''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } if (property_exists($this, 'fields') && !empty($this->fields['bomtype']['arrayofkeyval'])) { $return .= '
'.$langs->trans("Type").' : '; if ($this->bomtype == 0) { diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 9de10af17ab..12bed14e4c3 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -4027,7 +4027,9 @@ class Propal extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $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 834f3428f0b..f35c70890b5 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1870,8 +1870,9 @@ class Account extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - $return .= ''; - + if ($selected >= 0) { + $return .= ''; + } if (property_exists($this, 'type_lib')) { $return .= '
'.substr($this->type_lib[$this->type], 0, 24).'...'; } diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 9a42dd11773..14093ed2067 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -815,7 +815,9 @@ class PaymentVarious extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $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 7f18558307f..88a22b88fba 100644 --- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php +++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php @@ -497,7 +497,9 @@ class CashControl extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1, 1) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $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 56653ed08c6..c4f2ae9ae11 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -5952,7 +5952,9 @@ class Facture extends CommonInvoice $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } if (!empty($arraydata['thirdparty'])) { $return .= '
'.$arraydata['thirdparty'].''; } diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 04e3d5a5e35..086481dbacf 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -650,7 +650,9 @@ class Localtax extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $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 102444ad524..e8723f271c7 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -1010,8 +1010,9 @@ class RemiseCheque extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - $return .= ''; - + if ($selected >= 0) { + $return .= ''; + } if (property_exists($this, 'date_bordereau')) { $return .= '
'.$langs->trans("DateCreation").' : '.dol_print_date($this->db->jdate($this->date_bordereau), 'day').''; } diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 98c125fed05..e993e69d1d7 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -2587,8 +2587,9 @@ class BonPrelevement extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; - $return .= ''; - + if ($selected >= 0) { + $return .= ''; + } if (property_exists($this, 'date_echeance')) { $return .= '
'.$langs->trans("Date").' : '.dol_print_date($this->db->jdate($this->date_echeance), 'day').''; } diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index a4678223d0e..62707e329d2 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -783,7 +783,9 @@ class ChargeSociales extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(0) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $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 cf290915cc7..7a78c565e92 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -925,7 +925,9 @@ class Tva extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } if (property_exists($this, 'amount')) { $return .= ' | '.$langs->trans("Amount").' : '.price($this->amount).''; } diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index f1a931e657f..6b946511c21 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -2180,8 +2180,9 @@ class Contact extends CommonObject $return .= ''; $return .= '
'; $return .= '
'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).'
'; - $return .= ''; - + if ($selected >= 0) { + $return .= ''; + } if (property_exists($this, 'thirdparty') && is_object($this->thirdparty)) { $return .= '
'.$this->thirdparty->getNomUrl(1).'
'; } diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 1346e253d92..79f774e94b7 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2891,7 +2891,9 @@ class Contrat extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } if (!empty($arraydata['thirdparty'])) { $tmpthirdparty = $arraydata['thirdparty']; $return .= '
'.$tmpthirdparty->getNomUrl(1).'
'; diff --git a/htdocs/core/class/commonorder.class.php b/htdocs/core/class/commonorder.class.php index a2aef59a564..2d993ce43b6 100644 --- a/htdocs/core/class/commonorder.class.php +++ b/htdocs/core/class/commonorder.class.php @@ -53,8 +53,9 @@ abstract class CommonOrder extends CommonObject $return .= '
'; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - $return .= ''; - + if ($selected >= 0) { + $return .= ''; + } if (property_exists($this, 'thirdparty') && is_object($this->thirdparty)) { $return .= '
'.$this->thirdparty->getNomUrl(1).'
'; } diff --git a/htdocs/core/class/timespent.class.php b/htdocs/core/class/timespent.class.php index 9646327be06..aca6c3237f1 100644 --- a/htdocs/core/class/timespent.class.php +++ b/htdocs/core/class/timespent.class.php @@ -797,7 +797,7 @@ class TimeSpent extends CommonObject { global $conf, $langs; - //$selected = (empty($arraydata['selected']) ? 0 : $arraydata['selected']); + $selected = (empty($arraydata['selected']) ? 0 : $arraydata['selected']); $return = '
'; $return .= '
'; @@ -806,8 +806,9 @@ class TimeSpent extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - //$return .= ''; - + if ($selected >= 0) { + $return .= ''; + } if (property_exists($this, 'label')) { $return .= '
'.$this->label.'
'; } diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 5f6a699915d..3ffe5ead67a 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -1156,7 +1156,9 @@ class Don extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $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 9deddb5f896..bb89bdb0788 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -2782,7 +2782,9 @@ class ExpenseReport extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $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 342709d44be..c0f2eb79355 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -733,7 +733,9 @@ class PaymentExpenseReport extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $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 1c3533a0ea5..f150aa5b6d8 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -1566,7 +1566,9 @@ class Fichinter extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } if (!empty($arraydata['thirdparty'])) { $tmpthirdparty = $arraydata['thirdparty']; $return .= '
'.$tmpthirdparty->getNomUrl(1).''; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 6f746efebfa..421c2ba4b44 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3638,7 +3638,9 @@ class CommandeFournisseur extends CommonOrder $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $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 d4c66fb2be3..21e7801382d 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -3329,7 +3329,9 @@ class FactureFournisseur extends CommonInvoice $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $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 ca1aeabc6f2..d9b14a6f0f5 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -2465,7 +2465,9 @@ class Holiday extends CommonObject $return .= ''; $return .= '
'; $return .= ''.$arraydata['user']->getNomUrl(-1).''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } if (property_exists($this, 'fk_type')) { $return .= '
'; //$return .= ''.$langs->trans("Type").' : '; diff --git a/htdocs/hrm/class/job.class.php b/htdocs/hrm/class/job.class.php index 6ba4a536855..129daac3c8b 100644 --- a/htdocs/hrm/class/job.class.php +++ b/htdocs/hrm/class/job.class.php @@ -1080,7 +1080,9 @@ class Job extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(0) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } /*if (property_exists($this, 'deplacement')) { $return .= '
'.$langs->trans("Type").''; $return .= ' : '.$this->fields['deplacement']['arrayofkeyval'][$this->deplacement].''; diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php index 4123cf9bb65..4568aac5017 100644 --- a/htdocs/hrm/class/skill.class.php +++ b/htdocs/hrm/class/skill.class.php @@ -1140,7 +1140,9 @@ class Skill extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } if (property_exists($this, 'skill_type')) { $return .= '
'.$langs->trans("Type").''; $return .= ' : '.$this->fields['skill_type']['arrayofkeyval'][$this->skill_type].''; diff --git a/htdocs/knowledgemanagement/class/knowledgerecord.class.php b/htdocs/knowledgemanagement/class/knowledgerecord.class.php index 5cb9a257d5e..8d12fa7fd50 100644 --- a/htdocs/knowledgemanagement/class/knowledgerecord.class.php +++ b/htdocs/knowledgemanagement/class/knowledgerecord.class.php @@ -1136,7 +1136,9 @@ class KnowledgeRecord extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } if (property_exists($this, 'lang') && !empty($this->lang)) { //$return .= '
'.$langs->trans("Language").' : lang).'">'.$langs->trans("Language_".$this->lang, '', '', '', '', 12).''; $return .= '
'.picto_from_langcode($this->lang, 'class="paddingrightonly saturatemedium opacitylow paddingrightonly"'); diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 45593dd624e..92af439b823 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -722,7 +722,9 @@ class Loan extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } if (property_exists($this, 'capital')) { $return .= ' | '.$langs->trans("Amount").' : '.price($this->capital).''; } diff --git a/htdocs/loan/list.php b/htdocs/loan/list.php index ac524a79a4c..7ade6bb92af 100644 --- a/htdocs/loan/list.php +++ b/htdocs/loan/list.php @@ -31,7 +31,17 @@ require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; // Load translation files required by the page $langs->loadLangs(array("banks", "bills", "compta", "loan")); -$massaction = GETPOST('massaction', 'alpha'); +// Get parameters +$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ... +$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) +$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation +$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') +$mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); @@ -46,10 +56,18 @@ $pageprev = $page - 1; $pagenext = $page + 1; // Initialize technical objects -$hookmanager->initHooks(array('loanlist')); $object = new Loan($db); $extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->loan->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array($contextpage)); +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); +//$extrafields->fetch_name_optionals_label($object->table_element_line); + +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); + +// Default sort order (if not yet defined by previous GETPOST) if (!$sortfield) { $sortfield = "l.rowid"; } @@ -57,14 +75,32 @@ if (!$sortorder) { $sortorder = "DESC"; } +// Definition of array of fields for columns +$arrayfields = array(); +foreach ($object->fields as $key => $val) { + // If $val['visible']==0, then we never show the field + if (!empty($val['visible'])) { + $visible = (int) dol_eval($val['visible'], 1); + $arrayfields['t.'.$key] = array( + 'label'=>$val['label'], + 'checked'=>(($visible < 0) ? 0 : 1), + 'enabled'=>(abs($visible) != 3 && dol_eval($val['enabled'], 1)), + 'position'=>$val['position'], + 'help'=> isset($val['help']) ? $val['help'] : '' + ); + } +} +// Extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; + +$object->fields = dol_sort_array($object->fields, 'position'); +//$arrayfields['anotherfield'] = array('type'=>'integer', 'label'=>'AnotherField', 'checked'=>1, 'enabled'=>1, 'position'=>90, 'csslist'=>'right'); +$arrayfields = dol_sort_array($arrayfields, 'position'); + $search_ref = GETPOST('search_ref', 'int'); $search_label = GETPOST('search_label', 'alpha'); $search_amount = GETPOST('search_amount', 'alpha'); -$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'loanlist'; // To manage different context of search -$optioncss = GETPOST('optioncss', 'alpha'); -$mode = GETPOST('mode', 'alpha'); // mode view result - $permissiontoadd = $user->hasRight('loan', 'write'); // Security check @@ -113,9 +149,6 @@ $help_url="EN:Module_Loan|FR:Module_Emprunt"; $help_url = ''; $title = $langs->trans('Loans'); -llxHeader('', $title, $help_url); - -$arrayofselected = is_array($toselect) ? $toselect : array(); // Build and execute select // -------------------------------------------------------------------- @@ -160,7 +193,6 @@ if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) { } $db->free($resql); } -$arrayfields = array(); // Complete request and execute it with limit $sql .= $db->order($sortfield, $sortorder); @@ -189,259 +221,279 @@ if ($num == 1 && getDolGlobalInt('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $sear // Output page // -------------------------------------------------------------------- -if ($resql) { - $i = 0; - $param = ''; - if (!empty($mode)) { - $param .= '&mode='.urlencode($mode); - } - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { - $param .= '&contextpage='.urlencode($contextpage); - } - if ($limit > 0 && $limit != $conf->liste_limit) { - $param .= '&limit='.((int) $limit); - } - if ($search_ref) { - $param .= "&search_ref=".urlencode($search_ref); - } - if ($search_label) { - $param .= "&search_label=".urlencode($search_label); - } - if ($search_amount) { - $param .= "&search_amount=".urlencode($search_amount); - } - if ($optioncss != '') { - $param .= '&optioncss='.urlencode($optioncss); - } +llxHeader('', $title, $help_url); - $url = DOL_URL_ROOT.'/loan/card.php?action=create'; - if (!empty($socid)) { - $url .= '&socid='.$socid; - } - $newcardbutton = ''; - $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); - $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); - $newcardbutton .= dolGetButtonTitleSeparator(); - $newcardbutton .= dolGetButtonTitle($langs->trans('NewLoan'), '', 'fa fa-plus-circle', $url, '', $permissiontoadd); +$arrayofselected = is_array($toselect) ? $toselect : array(); - $massactionbutton = $form->selectMassAction('', $arrayofmassactions); +$param = ''; +if (!empty($mode)) { + $param .= '&mode='.urlencode($mode); +} +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.((int) $limit); +} +if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); +} +if ($search_ref) { + $param .= "&search_ref=".urlencode($search_ref); +} +if ($search_label) { + $param .= "&search_label=".urlencode($search_label); +} +if ($search_amount) { + $param .= "&search_amount=".urlencode($search_amount); +} +// Add $param from extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; +// Add $param from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook +$param .= $hookmanager->resPrint; - print '
'."\n"; - if ($optioncss != '') { - print ''; - } - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; +// List of mass actions available +$arrayofmassactions = array(); +if (!empty($permissiontodelete)) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} +$massactionbutton = $form->selectMassAction('', $arrayofmassactions); - $newcardbutton = ''; - $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); - $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); - $newcardbutton .= dolGetButtonTitleSeparator(); - $newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/loan/card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); - print_barre_liste($langs->trans("Loans"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'money-bill-alt', 0, $newcardbutton, '', $limit, 0, 0, 1); +$url = DOL_URL_ROOT.'/loan/card.php?action=create'; +if (!empty($socid)) { + $url .= '&socid='.$socid; +} +$newcardbutton = ''; +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitleSeparator(); +$newcardbutton .= dolGetButtonTitle($langs->trans('NewLoan'), '', 'fa fa-plus-circle', $url, '', $permissiontoadd); +$massactionbutton = $form->selectMassAction('', $arrayofmassactions); + +print ''."\n"; +if ($optioncss != '') { + print ''; +} +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + +$newcardbutton = ''; +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitleSeparator(); +$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/loan/card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); + +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'money-bill-alt', 0, $newcardbutton, '', $limit, 0, 0, 1); + +$moreforfilter = ''; + +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook +if (empty($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} + +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 - if (empty($reshook)) { - $moreforfilter .= $hookmanager->resPrint; - } else { - $moreforfilter = $hookmanager->resPrint; - } - - 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 = ($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"; - - // Fields title search - // -------------------------------------------------------------------- - print ''; - // Action column - if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { - print ''; - } - - // Filter: Ref - print ''; - - // Filter: Label - print ''; - - // Filter: Amount - print ''; - - // No filter: Date start - print ''; - - // No filter: Date end - print ''; - - // No filter: Status - print ''; - - // Action column - if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { - print ''; - } - print ''."\n"; - - $totalarray = array(); - $totalarray['nbfield'] = 0; - - // Fields title label - // -------------------------------------------------------------------- - print ''; - // Action column - if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { - print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch '); - $totalarray['nbfield']++; - } - print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "l.rowid", "", $param, "", $sortfield, $sortorder); - $totalarray['nbfield']++; - print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "l.label", "", $param, '', $sortfield, $sortorder, 'left '); - $totalarray['nbfield']++; - print_liste_field_titre("LoanCapital", $_SERVER["PHP_SELF"], "l.capital", "", $param, '', $sortfield, $sortorder, 'right '); - $totalarray['nbfield']++; - print_liste_field_titre("DateStart", $_SERVER["PHP_SELF"], "l.datestart", "", $param, '', $sortfield, $sortorder, 'center '); - $totalarray['nbfield']++; - print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "l.dateend", "", $param, '', $sortfield, $sortorder, 'center '); - $totalarray['nbfield']++; - print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "l.paid", "", $param, '', $sortfield, $sortorder, 'right '); - $totalarray['nbfield']++; - if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { - print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch '); - $totalarray['nbfield']++; - } - print "\n"; - - - // 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 - } - - $object->id = $obj->rowid; - $object->ref = $obj->rowid; - $object->label = $obj->label; - $object->paid = $obj->paid; - - - if ($mode == 'kanban') { - if ($i == 0) { - print ''; - } - } else { - print ''; - - // Action column - if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { - print ''; - } - - // Ref - print ''; - - // Label - print ''; - - // Capital - print ''; - - // Date start - print ''; - - // Date end - print ''; - - print ''; - - // Action column - if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { - print ''; - } - - print ''."\n"; - } - $i++; - } - - // If no record found - if ($num == 0) { - $colspan = 7; - //foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } - print ''; - } - - $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); - $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - - print '
'; - $searchpicto = $form->showFilterButtons('left'); - print $searchpicto; - print '  '; - $searchpicto = $form->showFilterButtons(); - print $searchpicto; - print '
'; - print '
'; - } - // Output Kanban - $object->datestart= $obj->datestart; - $object->dateend = $obj->dateend; - $object->capital = $obj->capital; - $object->totalpaid = $obj->paid; - - // Output Kanban - $selected = -1; - 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' => $selected)); - if ($i == ($imaxinloop - 1)) { - print '
'; - print '
'.$object->getNomUrl(1).''.dol_trunc($obj->label, 42).''.price($obj->capital).''.dol_print_date($db->jdate($obj->datestart), 'day').''.dol_print_date($db->jdate($obj->dateend), 'day').''; - print $object->LibStatut($obj->paid, 5, $obj->alreadypaid); - print '
'.$langs->trans("NoRecordFound").'
'."\n"; - print '
'."\n"; - - print ''."\n"; - - $db->free($resql); -} else { - dol_print_error($db); + print '
'; } +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$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 '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table +print ''."\n"; + +// Fields title search +// -------------------------------------------------------------------- +print ''; +// Action column +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} + +// Filter: Ref +print ''; + +// Filter: Label +print ''; + +// Filter: Amount +print ''; + +// No filter: Date start +print ''; + +// No filter: Date end +print ''; + +// No filter: Status +print ''; + +// Action column +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} +print ''."\n"; + +$totalarray = array(); +$totalarray['nbfield'] = 0; + +// Fields title label +// -------------------------------------------------------------------- +print ''; +// Action column +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch '); + $totalarray['nbfield']++; +} +print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "l.rowid", "", $param, "", $sortfield, $sortorder); +$totalarray['nbfield']++; +print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "l.label", "", $param, '', $sortfield, $sortorder, 'left '); +$totalarray['nbfield']++; +print_liste_field_titre("LoanCapital", $_SERVER["PHP_SELF"], "l.capital", "", $param, '', $sortfield, $sortorder, 'right '); +$totalarray['nbfield']++; +print_liste_field_titre("DateStart", $_SERVER["PHP_SELF"], "l.datestart", "", $param, '', $sortfield, $sortorder, 'center '); +$totalarray['nbfield']++; +print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "l.dateend", "", $param, '', $sortfield, $sortorder, 'center '); +$totalarray['nbfield']++; +print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "l.paid", "", $param, '', $sortfield, $sortorder, 'right '); +$totalarray['nbfield']++; +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch '); + $totalarray['nbfield']++; +} +print "\n"; + + +// 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 + } + + $object->id = $obj->rowid; + $object->ref = $obj->rowid; + $object->label = $obj->label; + $object->paid = $obj->paid; + + + if ($mode == 'kanban') { + if ($i == 0) { + print ''; + } + } else { + // Show line of result + $j = 0; + print ''; + + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } + + // Ref + print ''; + + // Label + print ''; + + // Capital + print ''; + + // Date start + print ''; + + // Date end + print ''; + + print ''; + + // Action column + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } + + print ''."\n"; + } + $i++; +} + +// If no record found +if ($num == 0) { + $colspan = 7; + //foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + print ''; +} + +$db->free($resql); + +$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); +$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; + +print '
'; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print '  '; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print '
'; + print '
'; + } + // Output Kanban + $object->datestart= $obj->datestart; + $object->dateend = $obj->dateend; + $object->capital = $obj->capital; + $object->totalpaid = $obj->paid; + + // Output Kanban + $selected = -1; + 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' => $selected)); + if ($i == ($imaxinloop - 1)) { + print '
'; + print '
'.$object->getNomUrl(1).''.dol_trunc($obj->label, 42).''.price($obj->capital).''.dol_print_date($db->jdate($obj->datestart), 'day').''.dol_print_date($db->jdate($obj->dateend), 'day').''; + print $object->LibStatut($obj->paid, 5, $obj->alreadypaid); + print '
'.$langs->trans("NoRecordFound").'
'."\n"; +print '
'."\n"; + +print ''."\n"; + // End of page llxFooter(); $db->close(); diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 25d0a7190f6..c7dc94e27fd 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -1715,7 +1715,9 @@ class Mo extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } if (!empty($arraydata['bom'])) { $return .= '
'.$arraydata['bom']->getNomUrl(1).''; } diff --git a/htdocs/partnership/class/partnership.class.php b/htdocs/partnership/class/partnership.class.php index b8e176e3b73..080184b46f8 100644 --- a/htdocs/partnership/class/partnership.class.php +++ b/htdocs/partnership/class/partnership.class.php @@ -1298,7 +1298,9 @@ class Partnership extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $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 c8c95866e25..a548c8705d8 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -6468,7 +6468,9 @@ class Product extends CommonObject $return .= '
'; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $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 d8a882b1963..a8730651621 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -682,7 +682,9 @@ class Inventory extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } if (property_exists($this, 'label')) { $return .= '
'.$this->label.'
'; } diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 296a63f06ed..076dae11a00 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -2426,7 +2426,9 @@ class Project extends CommonObject $return .= img_warning($langs->trans('Late')); } $return .= ''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } // Date /* if (property_exists($this, 'date_start') && $this->date_start) { diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 1981ca0931b..53690fe9834 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -2401,7 +2401,9 @@ class Task extends CommonObjectLine $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } if (!empty($arraydata['projectlink'])) { //$tmpproject = $arraydata['project']; //$return .= '
'.$tmpproject->getNomProject().''; diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php index 891a7fd3075..6df4df808fc 100644 --- a/htdocs/recruitment/class/recruitmentcandidature.class.php +++ b/htdocs/recruitment/class/recruitmentcandidature.class.php @@ -1069,7 +1069,9 @@ class RecruitmentCandidature extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $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 450c6f45896..d81ba26973e 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -1127,7 +1127,9 @@ class RecruitmentJobPosition extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $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 50cb208bdcb..ab2454e003e 100644 --- a/htdocs/salaries/class/paymentsalary.class.php +++ b/htdocs/salaries/class/paymentsalary.class.php @@ -910,7 +910,9 @@ class PaymentSalary extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $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 e323420fb4e..a521107310d 100644 --- a/htdocs/salaries/class/salary.class.php +++ b/htdocs/salaries/class/salary.class.php @@ -765,7 +765,9 @@ class Salary extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $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 3de38c63a9d..cca0c5abdb5 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -5298,11 +5298,12 @@ class Societe extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } if (property_exists($this, 'code_client')) { $return .= '
'.$this->code_client.''; } - if (method_exists($this, 'getLibStatut')) { $return .= '
'.$this->getLibStatut(3).'
'; } diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 8db3fe8d3c8..48648c6b0e3 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -2765,7 +2765,9 @@ class SupplierProposal extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } if (property_exists($this, 'socid')) { $return .= ' | '.$this->socid.''; } diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index b15b03ca5be..02988d1b744 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -3112,7 +3112,9 @@ class Ticket extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $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 7a69b261f38..fd7336ed9ac 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -3136,7 +3136,9 @@ class User extends CommonObject $return .= img_picto($langs->trans("AdministratorDesc"), 'star', 'class="valignmiddle paddingright paddingleft"'); } $return .= ''; - $return .= ''; + if ($selected >= 0) { + $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 58f96977b2a..c06cda641ad 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -1027,7 +1027,9 @@ class UserGroup extends CommonObject $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; - $return .= ''; + if ($selected >= 0) { + $return .= ''; + } if (property_exists($this, 'members')) { $return .= '
'.(empty($this->nb_users) ? 0 : $this->nb_users).' '.$langs->trans('Users').''; }