From 19f9592ac4cb9177c48a16c15bc15abc260950ce Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Apr 2023 10:54:09 +0200 Subject: [PATCH 1/6] CSS --- htdocs/fourn/facture/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 054ae69e3ad..1d5eac1e00f 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -3014,7 +3014,7 @@ if ($action == 'create') { // Thirdparty $morehtmlref .= '
'.$object->thirdparty->getNomUrl(1, 'supplier'); if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { - $morehtmlref .= ' ('.$langs->trans("OtherBills").')'; + $morehtmlref .= ' ('.$langs->trans("OtherBills").')'; } // Project if (isModEnabled('project')) { @@ -3023,7 +3023,7 @@ if ($action == 'create') { if ($permissiontoadd) { $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $object->socid : -1), $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { From f877a978b135f9b59bd2179b6635e99168ab0275 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Apr 2023 10:58:02 +0200 Subject: [PATCH 2/6] CSS --- htdocs/fourn/facture/card.php | 2 +- htdocs/fourn/facture/contact.php | 2 +- htdocs/fourn/facture/document.php | 2 +- htdocs/fourn/facture/info.php | 2 +- htdocs/fourn/facture/note.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 1d5eac1e00f..bce62c2c701 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -3014,7 +3014,7 @@ if ($action == 'create') { // Thirdparty $morehtmlref .= '
'.$object->thirdparty->getNomUrl(1, 'supplier'); if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { - $morehtmlref .= ' ('.$langs->trans("OtherBills").')'; + $morehtmlref .= ' '; } // Project if (isModEnabled('project')) { diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index 9cbf579c144..1c7cada039f 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -138,7 +138,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref .= '
'.$object->thirdparty->getNomUrl(1); if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { - $morehtmlref .= ' ('.$langs->trans("OtherBills").')'; + $morehtmlref .= ' '; } // Project if (isModEnabled('project')) { diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index cff4a30f442..1fad726c8ec 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -114,7 +114,7 @@ if ($object->id > 0) { // Thirdparty $morehtmlref .= '
'.$object->thirdparty->getNomUrl(1); if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { - $morehtmlref .= ' ('.$langs->trans("OtherBills").')'; + $morehtmlref .= ' '; } // Project if (isModEnabled('project')) { diff --git a/htdocs/fourn/facture/info.php b/htdocs/fourn/facture/info.php index 9369a290c9c..a37a5b3469f 100644 --- a/htdocs/fourn/facture/info.php +++ b/htdocs/fourn/facture/info.php @@ -80,7 +80,7 @@ $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_ // Thirdparty $morehtmlref .= '
'.$object->thirdparty->getNomUrl(1); if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { - $morehtmlref .= ' ('.$langs->trans("OtherBills").')'; + $morehtmlref .= ' '; } // Project if (isModEnabled('project')) { diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index c8178e39d74..550ffc345e7 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -110,7 +110,7 @@ if ($object->id > 0) { // Thirdparty $morehtmlref .= '
'.$object->thirdparty->getNomUrl(1); if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { - $morehtmlref .= ' ('.$langs->trans("OtherBills").')'; + $morehtmlref .= ' '; } // Project if (isModEnabled('project')) { From 30e1ac2aa0c80ada48f1712c19d0453b8ebfe5e8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Apr 2023 11:49:28 +0200 Subject: [PATCH 3/6] Debug v18 --- htdocs/contrat/class/contrat.class.php | 11 ++++++----- htdocs/contrat/list.php | 17 ++++++++++------- htdocs/langs/en_US/main.lang | 4 ++-- htdocs/langs/en_US/sendings.lang | 2 +- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index e05aeb678ee..9a8339e862f 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1931,10 +1931,10 @@ class Contrat extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoi label of a given contrat status + * Return the label of a given contrat status * * @param int $status Id status - * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto, 7=Same than 6 with fixed length + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label (status of services), 5=Short label + Picto, 6=Long label + Picto (status of services), 7=Same than 6 with fixed length (status of services) * @return string Label */ public function LibStatut($status, $mode) @@ -2859,14 +2859,15 @@ class Contrat extends CommonObject $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; - if (property_exists($this, 'societe')) { - $return .= '
'.$this->societe.''; + if (!empty($arraydata['thirdparty'])) { + $tmpthirdparty = $arraydata['thirdparty']; + $return .= '
'.$tmpthirdparty->getNomUrl(1).'
'; } if (property_exists($this, 'date_contrat')) { $return .= '
'.$langs->trans("DateContract").' : '.dol_print_date($this->date_contrat, 'day').''; } if (method_exists($this, 'getLibStatut')) { - $return .= '
'.$this->getLibStatut(3).'
'; + $return .= '
'.$this->getLibStatut(7).'
'; } $return .= '
'; $return .= ''; diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 50e26a55a68..15b4776c2b9 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -964,10 +964,12 @@ while ($i < $imaxinloop) { $contracttmp->ref_customer = $obj->ref_customer; $contracttmp->ref_supplier = $obj->ref_supplier; - if ($obj->socid > 0) { - $result = $socstatic->fetch($obj->socid); - } - /*$socstatic->id = $obj->socid; + $contracttmp->nbofserviceswait = $obj->nb_initial; + $contracttmp->nbofservicesopened = $obj->nb_running; + $contracttmp->nbofservicesexpired = $obj->nb_expired; + $contracttmp->nbofservicesclosed = $obj->nb_closed; + + $socstatic->id = $obj->socid; $socstatic->name = $obj->name; $socstatic->name_alias = $obj->name_alias; $socstatic->email = $obj->email; @@ -975,7 +977,8 @@ while ($i < $imaxinloop) { $socstatic->logo = $obj->logo; $socstatic->country_id = $obj->country_id; $socstatic->country_code = ''; - $socstatic->country = '';*/ + $socstatic->country = ''; + if ($obj->country_id > 0) { if (!isset($cacheCountryIDCode[$obj->country_id]['code'])) { $tmparray = getCountry($obj->country_id, 'all'); @@ -991,9 +994,9 @@ while ($i < $imaxinloop) { print '
'; } // Output Kanban - $contracttmp->societe = $socstatic->getNomUrl(); + $arraydata['thirdparty'] = $socstatic; $contracttmp->date_contrat = $obj->date_contrat; - print $contracttmp->getKanbanView(''); + print $contracttmp->getKanbanView('', $arraydata); if ($i == ($imaxinloop - 1)) { print '
'; print ''; diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 09627d5a3b0..0e10bb06f2a 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -905,8 +905,8 @@ ConfirmMassClone=Bulk clone confirmation ConfirmMassCloneQuestion=Select project to clone to ConfirmMassCloneToOneProject=Clone to project %s RelatedObjects=Related Objects -ClassifyBilled=Classify billed -ClassifyUnbilled=Classify unbilled +ClassifyBilled=Classify Billed +ClassifyUnbilled=Classify Unbilled Progress=Progress ProgressShort=Progr. FrontOffice=Front office diff --git a/htdocs/langs/en_US/sendings.lang b/htdocs/langs/en_US/sendings.lang index 8f10b1e9404..7850d7a3fd6 100644 --- a/htdocs/langs/en_US/sendings.lang +++ b/htdocs/langs/en_US/sendings.lang @@ -48,7 +48,7 @@ DateDeliveryPlanned=Planned date of delivery RefDeliveryReceipt=Ref delivery receipt StatusReceipt=Status delivery receipt DateReceived=Date delivery received -ClassifyReception=Classify reception +ClassifyReception=Classify Received SendShippingByEMail=Send shipment by email SendShippingRef=Submission of shipment %s ActionsOnShipping=Events on shipment From be8f9f33df80b71787b753bf96c332a37282b98a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Apr 2023 12:00:28 +0200 Subject: [PATCH 4/6] Look and feel v18 --- htdocs/fichinter/class/fichinter.class.php | 5 +- htdocs/fichinter/list.php | 96 +++++++++++++++------- 2 files changed, 70 insertions(+), 31 deletions(-) diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 2456c71e985..130ac03c758 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -1501,8 +1501,9 @@ class Fichinter extends CommonObject $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; $return .= ''; - if (property_exists($this, 'socid')) { - $return .= '
'.$this->socid.''; + if (!empty($arraydata['thirdparty'])) { + $tmpthirdparty = $arraydata['thirdparty']; + $return .= '
'.$tmpthirdparty->getNomUrl(1).''; } if (property_exists($this, 'duration')) { $return .= '
'.$langs->trans("Duration").' : '.convertSecondToTime($this->duration, 'allhourmin').''; diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index 86554408a23..e06b138ab76 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -93,7 +93,7 @@ if (!$sortfield) { // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $object = new Fichinter($db); -$hookmanager->initHooks(array('interventionlist')); +$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes $extrafields = new ExtraFields($db); @@ -148,6 +148,7 @@ if ($user->socid) { $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); $permissiontoread = $user->rights->ficheinter->lire; +$permissiontoadd = $user->rights->ficheinter->creer; $permissiontodelete = $user->rights->ficheinter->supprimer; @@ -213,8 +214,8 @@ if (isModEnabled('contrat')) { $now = dol_now(); -$help_url = ''; $title = $langs->trans("Interventions"); +$help_url = ''; $morejs = array(); $morecss = array(); @@ -250,7 +251,7 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) { } // Add fields from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sqlfields = $sql; // $sql fields to remove for count total @@ -271,7 +272,7 @@ if (empty($conf->global->FICHINTER_DISABLE_DETAILS) && $atleastonefieldinlines) // Add table from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; if (empty($user->rights->societe->client->voir) && empty($socid)) { @@ -318,7 +319,7 @@ if ($search_all) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; // Add GroupBy from hooks $parameters = array('search_all' => $search_all, 'fieldstosearchall' => $fieldstosearchall); @@ -339,7 +340,7 @@ if (empty($conf->global->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; } @@ -373,7 +374,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $ // Output page // -------------------------------------------------------------------- -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll $arrayofselected = is_array($toselect) ? $toselect : array(); @@ -394,7 +395,7 @@ if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); } if ($limit > 0 && $limit != $conf->liste_limit) { - $param .= '&limit='.urlencode($limit); + $param .= '&limit='.((int) $limit); } if ($search_all) { $param .= "&search_all=".urlencode($search_all); @@ -427,7 +428,7 @@ if ($optioncss != '') { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // Add $param from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $param .= $hookmanager->resPrint; // List of mass actions available @@ -454,7 +455,10 @@ print ''; print ''; print ''; +print ''; print ''; +print ''; +print ''; $newcardbutton = ''; $url = DOL_URL_ROOT.'/fichinter/card.php?action=create'; @@ -464,6 +468,7 @@ if (!empty($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('NewIntervention'), '', 'fa fa-plus-circle', $url, '', $user->rights->ficheinter->creer); print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); @@ -475,16 +480,19 @@ $trackid = 'int'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; if ($search_all) { + $setupstring = ''; foreach ($fieldstosearchall as $key => $val) { $fieldstosearchall[$key] = $langs->trans($val); + $setupstring .= $key."=".$val.";"; } - print '
'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
'; + print ''."\n"; + print '
'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
'."\n"; } $moreforfilter = ''; $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +$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 { @@ -494,22 +502,25 @@ if (empty($reshook)) { 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 +$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"; // Fields title search // -------------------------------------------------------------------- print ''; // Action column if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { - print ''; @@ -549,7 +560,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; // Fields from hook $parameters = array('arrayfields'=>$arrayfields); -$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (!empty($arrayfields['f.datec']['checked'])) { // Date creation @@ -598,7 +609,7 @@ if (!empty($arrayfields['fd.duree']['checked'])) { } // Action column if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { - print ''; @@ -614,72 +625,88 @@ print ''; // 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['f.ref']['checked'])) { print_liste_field_titre($arrayfields['f.ref']['label'], $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields['f.ref_client']['checked'])) { print_liste_field_titre($arrayfields['f.ref_client']['label'], $_SERVER["PHP_SELF"], "f.ref_client", "", $param, '', $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields['s.nom']['checked'])) { print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields['pr.ref']['checked'])) { print_liste_field_titre($arrayfields['pr.ref']['label'], $_SERVER["PHP_SELF"], "pr.ref", "", $param, '', $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields['c.ref']['checked'])) { print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, '', $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields['f.description']['checked'])) { print_liste_field_titre($arrayfields['f.description']['label'], $_SERVER["PHP_SELF"], "f.description", "", $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); -$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook +$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['f.datec']['checked'])) { print_liste_field_titre($arrayfields['f.datec']['label'], $_SERVER["PHP_SELF"], "f.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + $totalarray['nbfield']++; } if (!empty($arrayfields['f.tms']['checked'])) { print_liste_field_titre($arrayfields['f.tms']['label'], $_SERVER["PHP_SELF"], "f.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + $totalarray['nbfield']++; } if (!empty($arrayfields['f.note_public']['checked'])) { print_liste_field_titre($arrayfields['f.note_public']['label'], $_SERVER["PHP_SELF"], "f.note_public", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + $totalarray['nbfield']++; } if (!empty($arrayfields['f.note_private']['checked'])) { print_liste_field_titre($arrayfields['f.note_private']['label'], $_SERVER["PHP_SELF"], "f.note_private", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + $totalarray['nbfield']++; } if (!empty($arrayfields['f.fk_statut']['checked'])) { print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "f.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); + $totalarray['nbfield']++; } if (!empty($arrayfields['fd.description']['checked'])) { print_liste_field_titre($arrayfields['fd.description']['label'], $_SERVER["PHP_SELF"], ''); + $totalarray['nbfield']++; } if (!empty($arrayfields['fd.date']['checked'])) { print_liste_field_titre($arrayfields['fd.date']['label'], $_SERVER["PHP_SELF"], "fd.date", "", $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['fd.duree']['checked'])) { print_liste_field_titre($arrayfields['fd.duree']['label'], $_SERVER["PHP_SELF"], "fd.duree", "", $param, '', $sortfield, $sortorder, 'right '); + $totalarray['nbfield']++; } // Action column if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); + $totalarray['nbfield']++; } print "\n"; // Loop on record // -------------------------------------------------------------------- -$total = 0; $i = 0; $savnbfield = $totalarray['nbfield']; $totalarray = array(); $totalarray['nbfield'] = 0; $totalarray['val'] = array(); $totalarray['val']['fd.duree'] = 0; +$total = 0; $imaxinloop = ($limit ? min($num, $limit) : $num); while ($i < $imaxinloop) { $obj = $db->fetch_object($resql); @@ -706,21 +733,29 @@ while ($i < $imaxinloop) { //mode kanban if ($mode == 'kanban') { if ($i == 0) { - print ''; } } else { - print ''; + // Show here line of result + $j = 0; + print ''; // Action column if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print ''; + if (!$i) { + $totalarray['nbfield']++; + } } if (!empty($arrayfields['f.ref']['checked'])) { print "'; - } - if (!$i) { - $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } print ''."\n"; @@ -958,8 +996,8 @@ if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $n $urlsource .= str_replace('&', '&', $param); $filedir = $diroutputmassaction; - $genallowed = $user->rights->ficheinter->lire; - $delallowed = $user->rights->ficheinter->creer; + $genallowed = $permissiontoread; + $delallowed = $permissiontoadd; print $formfile->showdocuments('massfilesarea_interventions', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); } From 08f30bc0352cc6915f9d34f6213990e05f04c6af Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Apr 2023 12:31:00 +0200 Subject: [PATCH 5/6] css --- htdocs/main.inc.php | 8 +++++++- htdocs/theme/eldy/global.inc.php | 2 +- htdocs/theme/md/style.css.php | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index b21608a55a9..817c7cae698 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2472,8 +2472,14 @@ function top_menu_user($hideloginname = 0, $urllogout = '') console.log("Click on .butAction.dropdown-toggle"); var parentholder = jQuery(".butAction.dropdown-toggle").closest(".dropdown"); var offset = parentholder.offset(); + var widthdocument = $(document).width(); var left = offset.left; - var right = $(document).width() - offset.left - parentholder.width(); + var right = widthdocument - offset.left - parentholder.width(); + var widthpopup = parentholder.children(".dropdown-content").width(); + console.log("left="+left+" right="+right+" width="+widthpopup+" widthdocument="+widthdocument); + if (widthpopup + right >= widthdocument) { + right = 10; + } parentholder.toggleClass("open"); parentholder.children(".dropdown-content").css({"right": right+"px", "left": "auto"}); }); diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 310d2899a37..6c88f652ea8 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -6546,7 +6546,7 @@ span#select2-boxbookmark-container { font-weight: normal; } .select2-container-multi-dolibarr .select2-choices-dolibarr li { - float: left; + float: ; list-style: none; } .select2-container-multi-dolibarr .select2-choices-dolibarr { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 25843c8c407..9a952827ffb 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -6453,7 +6453,7 @@ span#select2-boxbookmark-container, span#select2-boxcombo-container { font-weight: normal; } .select2-container-multi-dolibarr .select2-choices-dolibarr li { - float: left; + float: ; list-style: none; } .select2-container-multi-dolibarr .select2-choices-dolibarr { From 5b4f5785898c7f94df551b86353869604f897592 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Apr 2023 13:27:00 +0200 Subject: [PATCH 6/6] Trans --- htdocs/langs/en_US/other.lang | 2 +- htdocs/langs/en_US/projects.lang | 2 +- htdocs/langs/en_US/website.lang | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index d4fb27b508e..bce50fba686 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -54,7 +54,7 @@ Notify_WITHDRAW_TRANSMIT=Transmission withdrawal Notify_WITHDRAW_CREDIT=Credit withdrawal Notify_WITHDRAW_EMIT=Perform withdrawal Notify_COMPANY_CREATE=Third party created -Notify_COMPANY_SENTBYMAIL=Mails sent from third party card +Notify_COMPANY_SENTBYMAIL=Mails sent from the page of third party Notify_BILL_VALIDATE=Customer invoice validated Notify_BILL_UNVALIDATE=Customer invoice unvalidated Notify_BILL_PAYED=Customer invoice paid diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 6a7a0a6fbe1..d2ceab30337 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -202,7 +202,7 @@ InputPerMonth=Input per month InputDetail=Input detail TimeAlreadyRecorded=This is time spent already recorded for this task/day and user %s ProjectsWithThisUserAsContact=Projects with this user as contact -ProjectsWithThisContact=Projects with this contact +ProjectsWithThisContact=Projects with this third-party contact TasksWithThisUserAsContact=Tasks assigned to this user ResourceNotAssignedToProject=Not assigned to project ResourceNotAssignedToTheTask=Not assigned to the task diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index 7b2cc90f7ac..a827023eb8a 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -83,7 +83,7 @@ BlogPost=Blog post WebsiteAccount=Website account WebsiteAccounts=Website accounts AddWebsiteAccount=Create web site account -BackToListForThirdParty=Back to list for the third-party +BackToListForThirdParty=Back to list for the third parties DisableSiteFirst=Disable website first MyContainerTitle=My web site title AnotherContainer=This is how to include content of another page/container (you may have an error here if you enable dynamic code because the embedded subcontainer may not exists)
'; + print ''; $searchpicto = $form->showFilterButtons('left'); print $searchpicto; print ''; + print ''; $searchpicto = $form->showFilterButtons(); print $searchpicto; print '
'; + print '
'; print '
'; } // Output Kanban - $objectstatic->duration = $obj->duree; - $objectstatic->socid = $companystatic->getNomUrl(1, '', 44); + 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 $objectstatic->getKanbanView(''); + $objectstatic->duration = $obj->duree; + $arraydata['thirdparty'] = $companystatic; + print $objectstatic->getKanbanView('', $arraydata); if ($i == ($imaxinloop - 1)) { print '
'; print '
'; @@ -732,6 +767,9 @@ while ($i < $imaxinloop) { print ''; } print '"; @@ -906,9 +944,9 @@ while ($i < $imaxinloop) { print ''; } print '