diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index 0bede00d86d..0d20ae9027d 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -50,7 +50,7 @@ $hookmanager->initHooks(array('accountancyindex')); llxHeader('', $langs->trans("AccountancyArea")); -print load_fiche_titre($langs->trans("AccountancyArea"), '', 'title_accountancy'); +print load_fiche_titre($langs->trans("AccountancyArea"), '', 'accountancy'); //dol_fiche_head(); $step = 0; diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 3e26ae1ce3a..2fd2cf22940 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -52,7 +52,7 @@ $staticmember=new Adherent($db); $statictype=new AdherentType($db); $subscriptionstatic=new Subscription($db); -print load_fiche_titre($langs->trans("MembersArea")); +print load_fiche_titre($langs->trans("MembersArea"), '', 'members'); $Adherents=array(); $AdherentsAValider=array(); diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index e85b5143257..90ce0ba932d 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -419,7 +419,7 @@ print ''; print ''; print ''; -print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit); +print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit); $topicmail="Information"; $modelmail="member"; @@ -956,7 +956,7 @@ print "\n"; print ""; print ''; -if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, '', '', $limit, 1); +if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, '', '', $limit, 1); // End of page llxFooter(); diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 48d1ffde363..268ebbce58c 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -262,7 +262,7 @@ print ''; print ''; print ''; -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit); +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit); $topicmail="Information"; $modelmail="subscription"; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 352a4dc6130..fd8e6e46643 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -248,7 +248,7 @@ if (! $rowid && $action != 'create' && $action != 'edit') print ''; print ''; - print_barre_liste($langs->trans("MembersTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit); + print_barre_liste($langs->trans("MembersTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit); $moreforfilter = ''; diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index a6336d11d8e..c7d5e5b8912 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -45,7 +45,6 @@ llxHeader('', $langs->trans("Setup"), $wikihelp); print load_fiche_titre($langs->trans("SetupArea"), '', 'tools'); - if (! empty($conf->global->MAIN_MOTD_SETUPPAGE)) { $conf->global->MAIN_MOTD_SETUPPAGE=preg_replace('//i', '
', $conf->global->MAIN_MOTD_SETUPPAGE); diff --git a/htdocs/asset/type.php b/htdocs/asset/type.php index 1357d397709..1c27e8909a7 100644 --- a/htdocs/asset/type.php +++ b/htdocs/asset/type.php @@ -237,7 +237,7 @@ if (! $rowid && $action != 'create' && $action != 'edit') print ''; print ''; - print_barre_liste($langs->trans("AssetsTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit); + print_barre_liste($langs->trans("AssetsTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit); $moreforfilter = ''; diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 844443244cd..cc79a08f0cd 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -85,7 +85,7 @@ $newcardbutton=''; $newcardbutton.= dolGetButtonTitle($langs->trans('NewBookmark'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bookmarks/card.php?action=create', '', !empty($user->rights->bookmark->creer)); -print_barre_liste($langs->trans("ListOfBookmarks"), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', -1, '', 'title_generic.png', 0, $newcardbutton); +print_barre_liste($langs->trans("ListOfBookmarks"), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', -1, '', 'generic', 0, $newcardbutton); $sql = "SELECT b.rowid, b.dateb, b.fk_user, b.url, b.target, b.title, b.favicon, b.position,"; $sql.= " u.login, u.lastname, u.firstname"; diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index d4020f4df92..4204224faa5 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -109,6 +109,7 @@ if ($dateselect > 0) } $tmp=empty($conf->global->MAIN_DEFAULT_WORKING_HOURS)?'9-18':$conf->global->MAIN_DEFAULT_WORKING_HOURS; +$tmp=str_replace(' ', '', $tmp); // FIX 7533 $tmparray=explode('-', $tmp); $begin_h = GETPOST('begin_h', 'int')!=''?GETPOST('begin_h', 'int'):($tmparray[0] != '' ? $tmparray[0] : 9); $end_h = GETPOST('end_h', 'int')?GETPOST('end_h', 'int'):($tmparray[1] != '' ? $tmparray[1] : 18); @@ -117,6 +118,7 @@ if ($end_h < 1 || $end_h > 24) $end_h = 18; if ($end_h <= $begin_h) $end_h = $begin_h + 1; $tmp=empty($conf->global->MAIN_DEFAULT_WORKING_DAYS)?'1-5':$conf->global->MAIN_DEFAULT_WORKING_DAYS; +$tmp=str_replace(' ', '', $tmp); // FIX 7533 $tmparray=explode('-', $tmp); $begin_d = GETPOST('begin_d', 'int')?GETPOST('begin_d', 'int'):($tmparray[0] != '' ? $tmparray[0] : 1); $end_d = GETPOST('end_d', 'int')?GETPOST('end_d', 'int'):($tmparray[1] != '' ? $tmparray[1] : 5); diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 285ed03e7c3..8811b2bbcfc 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -86,6 +86,7 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); $hookmanager->initHooks(array('thirdpartycomm','globalcard')); + /* * Actions */ diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 15e4e226587..ef9091a9638 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -79,7 +79,7 @@ if (! empty($conf->fournisseur->enabled)) $supplierorderstatic=new CommandeFourn llxHeader("", $langs->trans("CommercialArea")); -print load_fiche_titre($langs->trans("CommercialArea"), '', 'title_commercial.png'); +print load_fiche_titre($langs->trans("CommercialArea"), '', 'commercial'); print '
'; diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index e8d1d8c7599..fb19de42d5b 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -742,7 +742,7 @@ if ($action == 'create') // Print mail form - print load_fiche_titre($langs->trans("NewMailing"), $availablelink, 'title_generic'); + print load_fiche_titre($langs->trans("NewMailing"), $availablelink, 'generic'); dol_fiche_head(); @@ -1117,7 +1117,7 @@ else $htmltext.=''; // Print mail content - print load_fiche_titre($langs->trans("EMail"), $form->textwithpicto(''.$langs->trans("AvailableVariables").'', $htmltext, 1, 'help', '', 0, 2, 'emailsubstitionhelp'), 'title_generic'); + print load_fiche_titre($langs->trans("EMail"), $form->textwithpicto(''.$langs->trans("AvailableVariables").'', $htmltext, 1, 'help', '', 0, 2, 'emailsubstitionhelp'), 'generic'); dol_fiche_head('', '', '', -1); @@ -1262,7 +1262,7 @@ else $htmltext.=''; // Print mail content - print load_fiche_titre($langs->trans("EMail"), $form->textwithpicto($langs->trans("AvailableVariables"), $htmltext, 1, 'help', '', 0, 2, 'emailsubstitionhelp'), 'title_generic'); + print load_fiche_titre($langs->trans("EMail"), $form->textwithpicto($langs->trans("AvailableVariables"), $htmltext, 1, 'help', '', 0, 2, 'emailsubstitionhelp'), 'generic'); dol_fiche_head(null, '', '', -1); diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index fb3ce1ece70..cb1ff16f74f 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -250,7 +250,7 @@ if ($object->fetch($id) >= 0) // Show email selectors if ($allowaddtarget && $user->rights->mailing->creer) { - print load_fiche_titre($langs->trans("ToAddRecipientsChooseHere"), ($user->admin?info_admin($langs->trans("YouCanAddYourOwnPredefindedListHere"), 1):''), 'title_generic'); + print load_fiche_titre($langs->trans("ToAddRecipientsChooseHere"), ($user->admin?info_admin($langs->trans("YouCanAddYourOwnPredefindedListHere"), 1):''), 'generic'); //print ''; print '
'; @@ -453,7 +453,7 @@ if ($object->fetch($id) >= 0) if ($allowaddtarget) { $cleartext=$langs->trans("ToClearAllRecipientsClickHere").' '.'id.'" class="button reposition">'.$langs->trans("TargetsReset").''; } - print_barre_liste($langs->trans("MailSelectedRecipients"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $cleartext, $num, $nbtotalofrecords, 'title_generic', 0, '', '', $limit); + print_barre_liste($langs->trans("MailSelectedRecipients"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $cleartext, $num, $nbtotalofrecords, 'generic', 0, '', '', $limit); print ''; diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index 0986050a146..7db503b4675 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -173,7 +173,7 @@ if ($result) print ''; print ''; - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', $num, '', 'title_generic.png', 0, $newcardbutton); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', $num, '', 'generic', 0, $newcardbutton); $moreforfilter = ''; diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 609cfc49d43..52b745f089b 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -462,7 +462,7 @@ if ($resql) print ''; print ''; - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, $newcardbutton, '', $limit); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit); $topicmail="SendPropalRef"; $modelmail="proposal_send"; diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index 13b7b5fa2d2..eb397f1fce3 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -80,7 +80,7 @@ if ($mode == 'supplier') llxHeader('', $title); -print load_fiche_titre($title, '', 'title_commercial.png'); +print load_fiche_titre($title, '', 'commercial'); dol_mkdir($dir); diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index c7db3c560af..f65bb0118a7 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1485,7 +1485,7 @@ if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } // Mode creation if ($action == 'create' && $usercancreate) { - print load_fiche_titre($langs->trans('CreateOrder'), '', 'title_commercial.png'); + print load_fiche_titre($langs->trans('CreateOrder'), '', 'commercial'); $soc = new Societe($db); if ($socid > 0) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 59922a02c01..723053eebaa 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -464,7 +464,7 @@ if ($resql) print ''; - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, $newcardbutton, '', $limit); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit); $topicmail="SendOrderRef"; $modelmail="order_send"; diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index 1d2936263b8..00bdd3d7f4f 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -79,7 +79,7 @@ if ($mode == 'supplier') llxHeader('', $title); -print load_fiche_titre($title, '', 'title_commercial.png'); +print load_fiche_titre($title, '', 'commercial'); dol_mkdir($dir); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index e2c0180dc3b..48c6d8664b1 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -87,7 +87,7 @@ $thirdpartystatic = new Societe($db); llxHeader("", $langs->trans("AccountancyTreasuryArea")); -print load_fiche_titre($langs->trans("AccountancyTreasuryArea"), '', 'title_accountancy.png'); +print load_fiche_titre($langs->trans("AccountancyTreasuryArea"), '', 'invoicing'); print '
'; diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index 2b67b73c95b..31df49ddaf3 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -122,7 +122,7 @@ if ($result) print ''; print ''; - print_barre_liste($langs->trans("WithdrawalsReceipts"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic', 0, $newcardbutton, '', $limit); + print_barre_liste($langs->trans("WithdrawalsReceipts"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit); $moreforfilter=''; diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index 6c1ea278430..e338a2a6bd7 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -140,7 +140,7 @@ else $newcardbutton = ''.$langs->trans("Back").''; -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic', 0, $newcardbutton, '', $limit); +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit); print '
'; if ($optioncss != '') print ''; diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index dd53988d2ec..d7fb75462a1 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -131,7 +131,7 @@ if ($result) print"\n\n"; print ''; - print_barre_liste($langs->trans("WithdrawalsLines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic', 0, '', '', $limit); + print_barre_liste($langs->trans("WithdrawalsLines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, '', '', $limit); $moreforfilter=''; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 629fe589e56..a0286e5a0e2 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1112,7 +1112,7 @@ if ($result > 0) // Create if ($action == 'create') { - print load_fiche_titre($langs->trans('AddContract'), '', 'title_commercial.png'); + print load_fiche_titre($langs->trans('AddContract'), '', 'commercial'); $soc = new Societe($db); if ($socid>0) $soc->fetch($socid); diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 85538fe9ea8..d5b817d05c3 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -70,7 +70,7 @@ $now = dol_now(); llxHeader(); -print load_fiche_titre($langs->trans("ContractsArea"), '', 'title_commercial.png'); +print load_fiche_titre($langs->trans("ContractsArea"), '', 'commercial'); //print '
'; diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 5fea2cee66f..cb09745b24f 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -380,7 +380,7 @@ print ''; print ''; print ''; -print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'title_commercial.png', 0, $newcardbutton, '', $limit); +print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'commercial', 0, $newcardbutton, '', $limit); $topicmail="SendContractRef"; $modelmail="contract"; diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index 9371a9ea835..f26b11c6b08 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -336,7 +336,7 @@ if ($mode == "0") $title=$langs->trans("ListOfInactiveServices"); // Must use == if ($mode == "4" && $filter != "expired") $title=$langs->trans("ListOfRunningServices"); if ($mode == "4" && $filter == "expired") $title=$langs->trans("ListOfExpiredServices"); if ($mode == "5") $title=$langs->trans("ListOfClosedServices"); -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, '', '', $limit); +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, '', '', $limit); if ($sall) { diff --git a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php index bba7e6557de..326a9297ce8 100644 --- a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php +++ b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php @@ -69,22 +69,22 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes */ public function loadBox($max = 5) { - global $conf, $user, $langs, $db; - $langs->loadLangs(array("boxes", "sendings")); + global $conf, $user, $langs; + $langs->loadLangs(array("boxes", "sendings", "orders")); $this->max = $max; include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; - $supplierorderstatic=new CommandeFournisseur($db); + $supplierorderstatic=new CommandeFournisseur($this->db); include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; - $thirdpartytmp = new Fournisseur($db); + $thirdpartytmp = new Fournisseur($this->db); $this->info_box_head = array('text' => $langs->trans("BoxTitleSupplierOrdersAwaitingReception", $max)); if ($user->rights->fournisseur->commande->lire) { $sql = "SELECT s.nom as name, s.rowid as socid,"; - $sql.= " s.code_client, s.code_fournisseur,"; + $sql.= " s.code_client, s.code_fournisseur, s.email,"; $sql.= " s.logo,"; $sql.= " c.rowid, c.ref, c.tms, c.date_commande, c.date_livraison, "; $sql.= " c.total_ht,"; @@ -102,19 +102,19 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes if ($user->socid) $sql.= " AND s.rowid = ".$user->socid; if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql.= " ORDER BY c.date_commande DESC, c.ref DESC "; else $sql.= " ORDER BY c.date_livraison ASC, c.fk_statut ASC "; - $sql.= $db->plimit($max, 0); + $sql.= $this->db->plimit($max, 0); - $result = $db->query($sql); + $result = $this->db->query($sql); if ($result) { - $num = $db->num_rows($result); + $num = $this->db->num_rows($result); $line = 0; while ($line < $num) { - $objp = $db->fetch_object($result); - $date=$db->jdate($objp->date_commande); - $date_livraison=$db->jdate($objp->date_livraison); - $datem=$db->jdate($objp->tms); + $objp = $this->db->fetch_object($result); + $date=$this->db->jdate($objp->date_commande); + $date_livraison=$this->db->jdate($objp->date_livraison); + $datem=$this->db->jdate($objp->tms); $supplierorderstatic->date_livraison = $date_livraison; $supplierorderstatic->statut = $objp->fk_statut; @@ -124,6 +124,7 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes $thirdpartytmp->id = $objp->socid; $thirdpartytmp->name = $objp->name; + $thirdpartytmp->email = $objp->email; $thirdpartytmp->fournisseur = 1; $thirdpartytmp->code_fournisseur = $objp->code_fournisseur; $thirdpartytmp->logo = $objp->logo; @@ -165,12 +166,12 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes 'text' => $langs->trans("NoSupplierOrder"), ); - $db->free($result); + $this->db->free($result); } else { $this->info_box_contents[0][] = array( 'td' => '', 'maxlength'=>500, - 'text' => ($db->error().' sql='.$sql), + 'text' => ($this->db->error().' sql='.$sql), ); } } diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 864f2869b82..b9f428d9f43 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -129,7 +129,7 @@ class CMailFile * @param string $css Css option * @param string $trackid Tracking string (contains type and id of related element) * @param string $moreinheader More in header. $moreinheader must contains the "\r\n" (TODO not supported for other MAIL_SEND_MODE different than 'phpmail' and 'smtps' for the moment) - * @param string $sendcontext 'standard', 'emailing', ... (used to define with sending mode and parameters to use) + * @param string $sendcontext 'standard', 'emailing', ... (used to define which sending mode and parameters to use) * @param string $replyto Reply-to email (will be set to same value than From by default if not provided) */ public function __construct($subject, $to, $from, $msg, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array(), $addr_cc = "", $addr_bcc = "", $deliveryreceipt = 0, $msgishtml = 0, $errors_to = '', $css = '', $trackid = '', $moreinheader = '', $sendcontext = 'standard', $replyto = '') diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 95798e7c269..b18bade5fa4 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6588,10 +6588,19 @@ abstract class CommonObject $out .= ''; $html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : ''; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 8b6998bdb22..39ff11f83a2 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1555,7 +1555,7 @@ class ExtraFields { $param_list=array_keys($param['options']); // $param_list='ObjectName:classPath' $showempty=(($required && $default != '')?0:1); - $out=$form->selectForForms($param_list[0], $keyprefix.$key.$keysuffix, $value, $showempty); + $out=$form->selectForForms($param_list[0], $keyprefix.$key.$keysuffix, $value, $showempty, '', '', $morecss); } elseif ($type == 'password') { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index df7753501e4..cd227de0f2c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -7509,7 +7509,7 @@ class Form */ public function showFilterAndCheckAddButtons($addcheckuncheckall = 0, $cssclass = 'checkforaction', $calljsfunction = 0) { - $out.=$this->showFilterButtons(); + $out=$this->showFilterButtons(); if ($addcheckuncheckall) { $out.=$this->showCheckAddButtons($cssclass, $calljsfunction); diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 27d087b2fde..104247bf1c5 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -541,7 +541,12 @@ class Notify '', '', 0, - -1 + -1, + '', + '', + '', + '', + 'notification' ); if ($mailfile->sendfile()) @@ -769,7 +774,12 @@ class Notify '', '', 0, - 1 + 1, + '', + '', + '', + '', + 'notification' ); if ($mailfile->sendfile()) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index a807fc14684..7aca989a0e8 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3017,7 +3017,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'bank', 'close_title', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'note', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize', 'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', '1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected', 'jabber','skype','twitter','facebook','linkedin', - 'chevron-left','chevron-right','chevron-down','chevron-top' + 'chevron-left','chevron-right','chevron-down','chevron-top', + 'home', 'companies', 'products', 'commercial', 'invoicing', 'accountancy', 'project', 'hrm', 'members', 'ticket', 'generic' ) )) { $fa='fa'; @@ -3027,7 +3028,36 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ if ($pictowithoutext == 'setup') { $fakey = 'fa-cog'; - $fasize = '1.4em'; + } + elseif ($pictowithoutext == 'companies') { + $fakey = 'fa-building'; + } + elseif ($pictowithoutext == 'products') { + $fakey = 'fa-box-open'; + } + elseif ($pictowithoutext == 'commercial') { + $fakey = 'fa-user-tie'; + } + elseif ($pictowithoutext == 'invoicing') { + $fakey = 'fa-file-invoice'; + } + elseif ($pictowithoutext == 'accountancy') { + $fakey = 'fa-coins'; + } + elseif ($pictowithoutext == 'project') { + $fakey = 'fa-project-diagram'; + } + elseif ($pictowithoutext == 'hrm') { + $fakey = 'fa-umbrella-beach'; + } + elseif ($pictowithoutext == 'members') { + $fakey = 'fa-user-friends'; + } + elseif ($pictowithoutext == 'ticket') { + $fakey = 'fa-sticky-note'; + } + elseif ($pictowithoutext == 'generic') { + $fakey = 'fa-folder-open'; } elseif ($pictowithoutext == 'switch_off') { $fakey = 'fa-toggle-off'; @@ -4073,7 +4103,7 @@ function print_titre($title) * @return void * @deprecated Use print load_fiche_titre instead */ -function print_fiche_titre($title, $mesg = '', $picto = 'title_generic.png', $pictoisfullpath = 0, $id = '') +function print_fiche_titre($title, $mesg = '', $picto = 'generic', $pictoisfullpath = 0, $id = '') { print load_fiche_titre($title, $mesg, $picto, $pictoisfullpath, $id); } @@ -4091,13 +4121,13 @@ function print_fiche_titre($title, $mesg = '', $picto = 'title_generic.png', $pi * @return string * @see print_barre_liste() */ -function load_fiche_titre($titre, $morehtmlright = '', $picto = 'title_generic.png', $pictoisfullpath = 0, $id = '', $morecssontable = '', $morehtmlcenter = '') +function load_fiche_titre($titre, $morehtmlright = '', $picto = 'generic', $pictoisfullpath = 0, $id = '', $morecssontable = '', $morehtmlcenter = '') { global $conf; $return=''; - if ($picto == 'setup') $picto='title_generic.png'; + if ($picto == 'setup') $picto='generic'; $return.= "\n"; $return.= '
attributes[$this->table_element]['required'][$key])) $out .= ' fieldrequired'; - $out .= '">'; - if (! empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$this->table_element]['help'][$key]); - else $out .= $labeltoshow; + // BUG #11554 : For public page, use red dot for required fields, instead of bold label + $context = isset($params["context"]) ? $params["context"] : "none"; + if ($context=="public") { // Public page : red dot instead of bold ble characters + $out .= '">'; + if (! empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$this->table_element]['help'][$key]); + else $out .= $labeltoshow; + if ($mode != 'view' && ! empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' *'; + } else { + if ($mode != 'view' && ! empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' fieldrequired'; + $out .= '">'; + if (! empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$this->table_element]['help'][$key]); + else $out .= $labeltoshow; + } $out .= '
'; // maring bottom must be same than into print_barre_list @@ -4139,7 +4169,7 @@ function load_fiche_titre($titre, $morehtmlright = '', $picto = 'title_generic.p * @param int $hidenavigation Force to hide all navigation tools * @return void */ -function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '', $sortorder = '', $morehtmlcenter = '', $num = -1, $totalnboflines = '', $picto = 'title_generic.png', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limit = -1, $hideselectlimit = 0, $hidenavigation = 0) +function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '', $sortorder = '', $morehtmlcenter = '', $num = -1, $totalnboflines = '', $picto = 'generic', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limit = -1, $hideselectlimit = 0, $hidenavigation = 0) { global $conf,$langs; @@ -4148,7 +4178,7 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '', $totalnboflines=abs($totalnboflines); if ($picto == 'setup') $picto='title_setup.png'; - if (($conf->browser->name == 'ie') && $picto=='title_generic.png') $picto='title.gif'; + if (($conf->browser->name == 'ie') && $picto=='generic') $picto='title.gif'; if ($limit < 0) $limit = $conf->liste_limit; if ($savlimit != 0 && (($num > $limit) || ($num == -1) || ($limit == 0))) { diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index c1d42bf25b7..21761286131 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -108,7 +108,21 @@ function ticket_prepare_head($object) // History - $head[$h][0] = DOL_URL_ROOT.'/ticket/agenda.php?track_id=' . $object->track_id; + $ticketViewType = "messaging"; + if(empty($_SESSION['ticket-view-type'])){ + $_SESSION['ticket-view-type'] = $ticketViewType; + } + else{ + $ticketViewType = $_SESSION['ticket-view-type']; + } + + if($ticketViewType == "messaging"){ + $head[$h][0] = DOL_URL_ROOT.'/ticket/messaging.php?track_id=' . $object->track_id; + } + else{ + // $ticketViewType == "list" + $head[$h][0] = DOL_URL_ROOT.'/ticket/agenda.php?track_id=' . $object->track_id; + } $head[$h][1] = $langs->trans('Events'); if (! empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read) )) { @@ -187,3 +201,600 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $ print '
'; } + + + +/** + * Show html area with actions for ticket messaging. + * Note: Global parameter $param must be defined. + * + * @param Conf $conf Object conf + * @param Translate $langs Object langs + * @param DoliDB $db Object db + * @param mixed $filterobj Filter on object Adherent|Societe|Project|Product|CommandeFournisseur|Dolresource|Ticket|... to list events linked to an object + * @param Contact $objcon Filter on object contact to filter events on a contact + * @param int $noprint Return string but does not output it + * @param string $actioncode Filter on actioncode + * @param string $donetodo Filter on event 'done' or 'todo' or ''=nofilter (all). + * @param array $filters Filter on other fields + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @return string|void Return html part or void if noprint is 1 + */ +function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $noprint = 0, $actioncode = '', $donetodo = 'done', $filters = array(), $sortfield = 'a.datep,a.id', $sortorder = 'DESC') +{ + global $user, $conf; + global $form; + + global $param, $massactionbutton; + + dol_include_once('/comm/action/class/actioncomm.class.php'); + + // Check parameters + if (! is_object($filterobj) && ! is_object($objcon)) dol_print_error('', 'BadParameter'); + + $out=''; + $histo=array(); + $numaction = 0 ; + $now=dol_now('tzuser'); + + // Open DSI -- Fix order by -- Begin + $sortfield_list = explode(',', $sortfield); + $sortfield_label_list = array('a.id' => 'id', 'a.datep' => 'dp', 'a.percent' => 'percent'); + $sortfield_new_list = array(); + foreach ($sortfield_list as $sortfield_value) { + $sortfield_new_list[] = $sortfield_label_list[trim($sortfield_value)]; + } + $sortfield_new = implode(',', $sortfield_new_list); + + if (! empty($conf->agenda->enabled)) + { + // Recherche histo sur actioncomm + if (is_object($objcon) && $objcon->id > 0) { + $sql = "SELECT DISTINCT a.id, a.label as label,"; + } + else + { + $sql = "SELECT a.id, a.label as label,"; + } + $sql.= " a.datep as dp,"; + $sql.= " a.note as message,"; + $sql.= " a.datep2 as dp2,"; + $sql.= " a.percent as percent, 'action' as type,"; + $sql.= " a.fk_element, a.elementtype,"; + $sql.= " a.fk_contact,"; + $sql.= " c.code as acode, c.libelle as alabel, c.picto as apicto,"; + $sql.= " u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname"; + if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql.= ", sp.lastname, sp.firstname"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql.= ", m.lastname, m.firstname"; + elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql.= ", o.ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql.= ", o.ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql.= ", o.ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') $sql.= ", o.ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') $sql.= ", o.ref"; + $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_action"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action = c.id"; + + $force_filter_contact = false; + if (is_object($objcon) && $objcon->id > 0) { + $force_filter_contact = true; + $sql.= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm_resources as r ON a.id = r.fk_actioncomm"; + $sql.= " AND r.element_type = '" . $db->escape($objcon->table_element) . "' AND r.fk_element = " . $objcon->id; + } + + if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Dolresource') { + $sql.= " INNER JOIN ".MAIN_DB_PREFIX."element_resources as er"; + $sql.= " ON er.resource_type = 'dolresource'"; + $sql.= " AND er.element_id = a.id"; + $sql.= " AND er.resource_id = ".$filterobj->id; + } + elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m"; + elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as o"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql.= ", ".MAIN_DB_PREFIX."product as o"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql.= ", ".MAIN_DB_PREFIX."ticket as o"; + elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') $sql.= ", ".MAIN_DB_PREFIX."bom_bom as o"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') $sql.= ", ".MAIN_DB_PREFIX."contrat as o"; + + $sql.= " WHERE a.entity IN (".getEntity('agenda').")"; + if ($force_filter_contact === false) { + if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur')) && $filterobj->id) $sql.= " AND a.fk_soc = ".$filterobj->id; + elseif (is_object($filterobj) && get_class($filterobj) == 'Project' && $filterobj->id) $sql.= " AND a.fk_project = ".$filterobj->id; + elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') + { + $sql.= " AND a.fk_element = m.rowid AND a.elementtype = 'member'"; + if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id; + } + elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') + { + $sql.= " AND a.fk_element = o.rowid AND a.elementtype = 'order_supplier'"; + if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id; + } + elseif (is_object($filterobj) && get_class($filterobj) == 'Product') + { + $sql.= " AND a.fk_element = o.rowid AND a.elementtype = 'product'"; + if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id; + } + elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') + { + $sql.= " AND a.fk_element = o.rowid AND a.elementtype = 'ticket'"; + if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id; + } + elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') + { + $sql.= " AND a.fk_element = o.rowid AND a.elementtype = 'bom'"; + if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id; + } + elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') + { + $sql.= " AND a.fk_element = o.rowid AND a.elementtype = 'contract'"; + if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id; + } + } + + // Condition on actioncode + if (! empty($actioncode)) + { + if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) + { + if ($actioncode == 'AC_NON_AUTO') $sql.= " AND c.type != 'systemauto'"; + elseif ($actioncode == 'AC_ALL_AUTO') $sql.= " AND c.type = 'systemauto'"; + else + { + if ($actioncode == 'AC_OTH') $sql.= " AND c.type != 'systemauto'"; + elseif ($actioncode == 'AC_OTH_AUTO') $sql.= " AND c.type = 'systemauto'"; + } + } + else + { + if ($actioncode == 'AC_NON_AUTO') $sql.= " AND c.type != 'systemauto'"; + elseif ($actioncode == 'AC_ALL_AUTO') $sql.= " AND c.type = 'systemauto'"; + else $sql.= " AND c.code = '".$db->escape($actioncode)."'"; + } + } + if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; + elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))"; + if (is_array($filters) && $filters['search_agenda_label']) $sql.= natural_search('a.label', $filters['search_agenda_label']); + } + + // Add also event from emailings. TODO This should be replaced by an automatic event ? May be it's too much for very large emailing. + if (! empty($conf->mailing->enabled) && ! empty($objcon->email) + && (empty($actioncode) || $actioncode == 'AC_OTH_AUTO' || $actioncode == 'AC_EMAILING')) + { + $langs->load("mails"); + + $sql2 = "SELECT m.rowid as id, m.titre as label, mc.date_envoi as dp, mc.date_envoi as dp2, '100' as percent, 'mailing' as type"; + $sql2.= ", '' as fk_element, '' as elementtype, '' as contact_id"; + $sql2.= ", 'AC_EMAILING' as acode, '' as alabel, '' as apicto"; + $sql2.= ", u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname"; // User that valid action + if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql2.= ", '' as lastname, '' as firstname"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql2.= ", '' as lastname, '' as firstname"; + elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql2.= ", '' as ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql2.= ", '' as ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql2.= ", '' as ref"; + $sql2.= " FROM ".MAIN_DB_PREFIX."mailing as m, ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."user as u"; + $sql2.= " WHERE mc.email = '".$db->escape($objcon->email)."'"; // Search is done on email. + $sql2.= " AND mc.statut = 1"; + $sql2.= " AND u.rowid = m.fk_user_valid"; + $sql2.= " AND mc.fk_mailing=m.rowid"; + } + + if (!empty($sql) && !empty($sql2)) { + $sql = $sql . " UNION " . $sql2; + } elseif (empty($sql) && !empty($sql2)) { + $sql = $sql2; + } + + //TODO Add limit in nb of results + $sql.= $db->order($sortfield_new, $sortorder); + dol_syslog("company.lib::show_actions_done", LOG_DEBUG); + $resql=$db->query($sql); + if ($resql) + { + $i = 0 ; + $num = $db->num_rows($resql); + + while ($i < $num) + { + $obj = $db->fetch_object($resql); + + if ($obj->type == 'action') { + $contactaction = new ActionComm($db); + $contactaction->id=$obj->id; + $result = $contactaction->fetchResources(); + if ($result<0) { + dol_print_error($db); + setEventMessage("company.lib::show_actions_done Error fetch ressource", 'errors'); + } + + //if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; + //elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))"; + $tododone=''; + if (($obj->percent >= 0 and $obj->percent < 100) || ($obj->percent == -1 && $obj->datep > $now)) $tododone='todo'; + + $histo[$numaction]=array( + 'type'=>$obj->type, + 'tododone'=>$tododone, + 'id'=>$obj->id, + 'datestart'=>$db->jdate($obj->dp), + 'dateend'=>$db->jdate($obj->dp2), + 'note'=>$obj->label, + 'message'=>$obj->message, + 'percent'=>$obj->percent, + + 'userid'=>$obj->user_id, + 'login'=>$obj->user_login, + 'userfirstname'=>$obj->user_firstname, + 'userlastname'=>$obj->user_lastname, + 'userphoto'=>$obj->user_photo, + + 'contact_id'=>$obj->fk_contact, + 'socpeopleassigned' => $contactaction->socpeopleassigned, + 'lastname'=>$obj->lastname, + 'firstname'=>$obj->firstname, + 'fk_element'=>$obj->fk_element, + 'elementtype'=>$obj->elementtype, + // Type of event + 'acode'=>$obj->acode, + 'alabel'=>$obj->alabel, + 'libelle'=>$obj->alabel, // deprecated + 'apicto'=>$obj->apicto + ); + } else { + $histo[$numaction]=array( + 'type'=>$obj->type, + 'tododone'=>'done', + 'id'=>$obj->id, + 'datestart'=>$db->jdate($obj->dp), + 'dateend'=>$db->jdate($obj->dp2), + 'note'=>$obj->label, + 'message'=>$obj->message, + 'percent'=>$obj->percent, + 'acode'=>$obj->acode, + + 'userid'=>$obj->user_id, + 'login'=>$obj->user_login, + 'userfirstname'=>$obj->user_firstname, + 'userlastname'=>$obj->user_lastname, + 'userphoto'=>$obj->user_photo + ); + } + + $numaction++; + $i++; + } + } + else + { + dol_print_error($db); + } + + if (! empty($conf->agenda->enabled) || (! empty($conf->mailing->enabled) && ! empty($objcon->email))) + { + $delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60; + + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; + + $formactions=new FormActions($db); + + $actionstatic=new ActionComm($db); + $userstatic=new User($db); + $contactstatic = new Contact($db); + $userGetNomUrlCache = array(); + + $out.='
'; + $out.=''; + if ($objcon && get_class($objcon) == 'Contact' && + (is_null($filterobj) || get_class($filterobj) == 'Societe')) + { + $out.=''; + } + else + { + $out.=''; + } + if ($filterobj && get_class($filterobj) == 'Societe') $out.=''; + + $out.="\n"; + + $out.='
'; + $out.='
'; + + $out.=''; + $out.=''; + if ($donetodo) + { + $out.=''; + } + $out.=''; + $out.=''; + + $out.=''; + $out.=''; + + + $out.='
'.$langs->trans("Search").' : '.$langs->trans("Type").' '; + $out.=$formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:-1, 0, 0, 1); + $out.=''; + $out.=$langs->trans("Label").' '; + $out.=''; + $out.=''; + $searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1); + $out.=$searchpicto; + $out.='
'; + + $out.=''; + $out.='
'; + + $out.="\n"; + + $out.='\n"; + } + + + if ($noprint) return $out; + else print $out; +} diff --git a/htdocs/core/tools.php b/htdocs/core/tools.php index cd65ace73bf..49b17c20520 100644 --- a/htdocs/core/tools.php +++ b/htdocs/core/tools.php @@ -43,7 +43,7 @@ llxHeader("", $langs->trans("Tools"), ""); $text=$langs->trans("Tools"); -print load_fiche_titre($text); +print load_fiche_titre($text, '', 'generic'); // Show description of content print '
'.$langs->trans("ToolsDesc").'


'; diff --git a/htdocs/core/tpl/extrafields_add.tpl.php b/htdocs/core/tpl/extrafields_add.tpl.php index f4f74d35428..7e146b63fe0 100644 --- a/htdocs/core/tpl/extrafields_add.tpl.php +++ b/htdocs/core/tpl/extrafields_add.tpl.php @@ -41,7 +41,8 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + $params = isset($tpl_context) ? array('context' => $tpl_context) : array(); // BUG #11554 : Add context in params + print $object->showOptionals($extrafields, 'edit', $params); // BUG #11554 : Add context in params } ?> diff --git a/htdocs/core/tpl/extrafields_list_search_input.tpl.php b/htdocs/core/tpl/extrafields_list_search_input.tpl.php index 0b9a048f28a..9ee4bd9ce37 100644 --- a/htdocs/core/tpl/extrafields_list_search_input.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_input.tpl.php @@ -41,7 +41,7 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_ { // for the type as 'checkbox', 'chkbxlst', 'sellist' we should use code instead of id (example: I declare a 'chkbxlst' to have a link with dictionnairy, I have to extend it with the 'code' instead 'rowid') $morecss=''; - if ($typeofextrafield == 'sellist') $morecss='maxwidth200'; + if (in_array($typeofextrafield, array('link', 'sellist'))) $morecss='maxwidth200'; echo $extrafields->showInputField($key, $search_array_options[$search_options_pattern.$tmpkey], '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1); } print ''; diff --git a/htdocs/don/list.php b/htdocs/don/list.php index 1af11afca24..2bd6b676016 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -154,7 +154,7 @@ if ($resql) print ''; print ''; - print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton); + print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton); if ($search_all) { diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index fd53e8af1d1..e70e8d34d78 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -473,7 +473,7 @@ if ($resql) $newcardbutton.= dolGetButtonTitle($langs->trans('NewTrip'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/expensereport/card.php?action=create'); } - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit); } $topicmail="SendExpenseReport"; diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index 63183c73d1d..59d02502dad 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -248,7 +248,7 @@ $today = dol_mktime( * Create mode */ if ($action == 'create') { - print load_fiche_titre($langs->trans("CreateRepeatableIntervention"), '', 'title_commercial.png'); + print load_fiche_titre($langs->trans("CreateRepeatableIntervention"), '', 'commercial'); $object = new Fichinter($db); // Source invoice //$object = new Managementfichinter($db); // Source invoice @@ -439,7 +439,7 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime( else dol_print_error('', "Error, no invoice ".$object->id); } elseif ($action == 'selsocforcreatefrommodel') { - print load_fiche_titre($langs->trans("CreateRepeatableIntervention"), '', 'title_commercial.png'); + print load_fiche_titre($langs->trans("CreateRepeatableIntervention"), '', 'commercial'); dol_fiche_head(''); print '
'; @@ -810,7 +810,7 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime( '', $num, '', - 'title_commercial.png' + 'commercial' ); print $langs->trans("ToCreateAPredefinedInterventional").'

'; diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index e54aa7940d3..da249d1f0cd 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -327,7 +327,7 @@ if ($resql) print ''; print ''; - print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, $newcardbutton, '', $limit); + print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit); $topicmail="Information"; $modelmail="intervention"; diff --git a/htdocs/fichinter/stats/index.php b/htdocs/fichinter/stats/index.php index 096584d8936..ecde4ba5c72 100644 --- a/htdocs/fichinter/stats/index.php +++ b/htdocs/fichinter/stats/index.php @@ -65,7 +65,7 @@ $dir=$conf->ficheinter->dir_temp; llxHeader('', $title); -print load_fiche_titre($title, '', 'title_commercial.png'); +print load_fiche_titre($title, '', 'commercial'); dol_mkdir($dir); diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 7af71f7a344..2583873185d 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -649,7 +649,7 @@ if ($resql) print ''; print ''; print ''; - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, $newcardbutton, '', $limit); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit); $topicmail="SendOrderRef"; $modelmail="order_supplier_send"; diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index ece34cf12b5..a6ef15c6908 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -77,7 +77,7 @@ $childids[]=$user->id; llxHeader('', $langs->trans('HRMArea')); -print load_fiche_titre($langs->trans("HRMArea"), '', 'title_hrm.png'); +print load_fiche_titre($langs->trans("HRMArea"), '', 'hrm'); if (! empty($setupcompanynotcomplete)) diff --git a/htdocs/index.php b/htdocs/index.php index 70acfc62bab..a375c005676 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -80,7 +80,7 @@ llxHeader('', $title); $resultboxes=FormOther::getBoxesArea($user, "0"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb) -print load_fiche_titre($langs->trans("HomeArea"), $resultboxes['selectboxlist'], 'title_home'); +print load_fiche_titre($langs->trans("HomeArea"), $resultboxes['selectboxlist'], 'home'); if (! empty($conf->global->MAIN_MOTD)) { diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang index 96efb3be55f..29bb88a80a4 100644 --- a/htdocs/langs/en_US/mrp.lang +++ b/htdocs/langs/en_US/mrp.lang @@ -4,6 +4,7 @@ LatestBOMModified=Latest %s Bills of materials modified BillOfMaterials=Bill of Material BOMsSetup=Setup of module BOM ListOfBOMs=List of bills of material - BOM +ListOfManufacturingOrders=List of Manufacturing Orders NewBOM=New bill of material ProductBOMHelp=Product to create with this BOM BOMsNumberingModules=BOM numbering templates @@ -16,4 +17,8 @@ ValueOfMeansLoss=Value of 0.95 means an average of 5%% of loss during the produc DeleteBillOfMaterials=Delete Bill Of Materials ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? MenuMRP=Manufacturing Orders -NewMO=New Manufacturing Order \ No newline at end of file +NewMO=New Manufacturing Order +QtyToProduce=Qty to produce +DateStartPlannedMo=Date start planned +DateEndPlannedMo=Date end planned +KeepEmptyForAsap=Empty means 'As Soon As Possible' \ No newline at end of file diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang index 70bd8220af0..6dbc13ec306 100644 --- a/htdocs/langs/en_US/ticket.lang +++ b/htdocs/langs/en_US/ticket.lang @@ -137,6 +137,10 @@ NoUnreadTicketsFound=No unread ticket found TicketViewAllTickets=View all tickets TicketViewNonClosedOnly=View only open tickets TicketStatByStatus=Tickets by status +OrderByDateAsc=Sort by ascending date +OrderByDateDesc=Sort by descending date +MessagingViewType=Show as messaging list +MessageListViewType=Show as table list # # Ticket card diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index 72bc424c53c..21615af7ddc 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -190,7 +190,7 @@ if ($action == 'create') dol_fiche_head(array(), ''); - print ''."\n"; + print '
'."\n"; // Common attributes include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_add.tpl.php'; diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 025f7099577..8685b6982c3 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -245,7 +245,7 @@ print ''; $newcardbutton=''; $newcardbutton.= dolGetButtonTitle($langs->trans('NewSurvey'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/opensurvey/wizard/index.php', '', $user->rights->opensurvey->write); -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit); +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit); // Add code for pre mass action (confirmation or email presend form) $topicmail="SendOpenSurveyRef"; diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 5b74ef07f80..157f613ef03 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -77,7 +77,7 @@ if ((isset($_GET["type"]) && $_GET["type"] == 1) || empty($conf->product->enable llxHeader("", $langs->trans("ProductsAndServices"), $helpurl); $linkback=""; -print load_fiche_titre($transAreaType, $linkback, 'title_products.png'); +print load_fiche_titre($transAreaType, $linkback, 'products'); print '
'; diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index 9426d2041b0..633dc48d36c 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -184,7 +184,7 @@ if ($result) print ''; print ''; - print_barre_liste($langs->trans("ListOfWarehouses"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_generic.png', 0, $newcardbutton, '', $limit); + print_barre_liste($langs->trans("ListOfWarehouses"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'generic', 0, $newcardbutton, '', $limit); if ($sall) { diff --git a/htdocs/product/stock/movement_card.php b/htdocs/product/stock/movement_card.php index 291dcc6e456..36d28392dad 100644 --- a/htdocs/product/stock/movement_card.php +++ b/htdocs/product/stock/movement_card.php @@ -728,7 +728,7 @@ if ($resql) if ($id > 0) print ''; if ($id > 0) print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, '', '', $limit); - else print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic', 0, '', '', $limit); + else print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, '', '', $limit); if ($sall) { diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index 71e4d95f6c7..17b63ed8989 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -706,7 +706,7 @@ if ($resql) if ($id > 0) print ''; if ($id > 0) print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, '', '', $limit); - else print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic', 0, '', '', $limit); + else print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, '', '', $limit); if ($sall) { diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index b9799865e20..92d82ea0d72 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -438,7 +438,7 @@ $head[1][1] = $langs->trans("ReplenishmentOrders"); $head[1][2] = 'replenishorders'; -print load_fiche_titre($langs->trans('Replenishment'), '', 'title_generic.png'); +print load_fiche_titre($langs->trans('Replenishment'), '', 'generic'); dol_fiche_head($head, 'replenish', '', -1, ''); diff --git a/htdocs/product/stock/replenishorders.php b/htdocs/product/stock/replenishorders.php index 59f436cb487..f38b1b6bd8e 100644 --- a/htdocs/product/stock/replenishorders.php +++ b/htdocs/product/stock/replenishorders.php @@ -93,7 +93,7 @@ $texte = $langs->trans('ReplenishmentOrders'); llxHeader('', $texte, $helpurl, ''); -print load_fiche_titre($langs->trans('Replenishment'), '', 'title_generic.png'); +print load_fiche_titre($langs->trans('Replenishment'), '', 'generic'); $head = array(); $head[0][0] = DOL_URL_ROOT.'/product/stock/replenish.php'; diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index f5989fb46c1..ae9c49c6e95 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -53,7 +53,7 @@ if (empty($conf) || ! is_object($conf)) { '; - print load_fiche_titre($langs->trans("StockCorrection"), '', 'title_generic.png'); + print load_fiche_titre($langs->trans("StockCorrection"), '', 'generic'); print ''."\n"; diff --git a/htdocs/product/stock/tpl/stocktransfer.tpl.php b/htdocs/product/stock/tpl/stocktransfer.tpl.php index 787083f0940..4ed59d88002 100644 --- a/htdocs/product/stock/tpl/stocktransfer.tpl.php +++ b/htdocs/product/stock/tpl/stocktransfer.tpl.php @@ -53,7 +53,7 @@ if (empty($conf) || ! is_object($conf)) { } } - print load_fiche_titre($langs->trans("StockTransfer"), '', 'title_generic.png'); + print load_fiche_titre($langs->trans("StockTransfer"), '', 'generic'); print ''."\n"; diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index 87920f2a977..4e788a2b991 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -236,8 +236,8 @@ $linktocreatetask = dolGetButtonTitle($langs->trans('AddTask'), '', 'fa fa-plus- $linktolist = dolGetButtonTitle($langs->trans('GoToListOfTasks'), '', 'fa fa-tasks paddingleft', DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id); -//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'title_generic.png', 0, '', '', 0, 1); -print load_fiche_titre($title, $linktolist.'   '.$linktocreatetask, 'title_generic.png'); +//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1); +print load_fiche_titre($title, $linktolist.'   '.$linktocreatetask, 'generic'); // Get list of tasks in tasksarray and taskarrayfiltered diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index 6b9247530fd..ba15aef57cf 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -88,7 +88,7 @@ $morehtml.=''; $morehtml.=''; $morehtml.=''; -print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'title_project.png', 0, $morehtml); +print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'project', 0, $morehtml); // Show description of content print '
'; diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index dd29a401bf7..bfc775ff94f 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -671,8 +671,8 @@ elseif ($id > 0 || ! empty($ref)) $title=$langs->trans("ListOfTasks"); $linktotasks = dolGetButtonTitle($langs->trans('GoToGanttView'), '', 'fa fa-calendar-minus-o paddingleft', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1'); - //print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'title_generic.png', 0, '', '', 0, 1); - print load_fiche_titre($title, $linktotasks.'   '.$linktocreatetask, 'title_generic.png'); + //print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1); + print load_fiche_titre($title, $linktotasks.'   '.$linktocreatetask, 'generic'); // Get list of tasks in tasksarray and taskarrayfiltered // We need all tasks (even not limited to a user because a task to user can have a parent that is not affected to him). diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index d4c4a6d8473..9e8e71f5b32 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -941,7 +941,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) $title=$langs->trans("ListTaskTimeUserProject"); - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic', 0, $linktocreatetime, '', $limit); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $linktocreatetime, '', $limit); } else { @@ -949,7 +949,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) $title=$langs->trans("ListTaskTimeForTask"); - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic', 0, $linktocreatetime, '', $limit); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $linktocreatetime, '', $limit); } $i = 0; diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 81f46897cc6..151f8486577 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -645,6 +645,7 @@ print '
'."\n"; // Other attributes +$tpl_context = 'public'; //BUG #11554 : define templae context to public include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; // Comments print ''; diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index 4ec52539188..02f9fbc1073 100644 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -226,7 +226,7 @@ if ($action == 'create' || $object->fetch($id) > 0) { if ($action == 'create') { - print load_fiche_titre($title, '', 'title_generic'); + print load_fiche_titre($title, '', 'generic'); dol_fiche_head(''); } else diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index d9547ad441b..8151cebf05f 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -199,7 +199,7 @@ if($ret == -1) { $newcardbutton.= dolGetButtonTitle($langs->trans('MenuResourceAdd'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/resource/card.php?action=create'); } - print_barre_liste($pagetitle, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $ret+1, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit); + print_barre_liste($pagetitle, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $ret+1, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit); } $moreforfilter = ''; diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index ab224245de8..074c71a76b3 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1513,7 +1513,7 @@ else print ''; print ''; diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index 2010edeb217..acfd42a064d 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -55,7 +55,7 @@ $helpurl='EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Terceros'; llxHeader("", $langs->trans("ThirdParties"), $helpurl); $linkback=''; -print load_fiche_titre($transAreaType, $linkback, 'title_companies.png'); +print load_fiche_titre($transAreaType, $linkback, 'companies'); //print '
'.$langs->trans("URLPhoto").'
'.$form->editfieldkey('AllocateCommercial', 'commercial_id', '', $object, 0).''; $userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, '', 0, '', '', 0, 1); - // Note: If user has no right to "see all thirdparties", we for selection of sale representative to him, so after creation he can see the record. + // Note: If user has no right to "see all thirdparties", we force selection of sale representative to him, so after creation he can see the record. $selected = (count(GETPOST('commercial', 'array')) > 0 ? GETPOST('commercial', 'array') : (GETPOST('commercial', 'int') > 0 ? array(GETPOST('commercial', 'int')) : (empty($user->rights->societe->client->voir)?array($user->id):array()))); print $form->multiselectarray('commercial', $userlist, $selected, null, null, null, null, "90%"); print '
'; diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 0c65ae5150f..dd678b51605 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -403,7 +403,7 @@ if ($resql) print ''; print ''; - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, $newcardbutton, '', $limit); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit); $topicmail="SendSupplierProposalRef"; $modelmail="supplier_proposal_send"; diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php index 2e42d42acaa..28355e7ea3a 100644 --- a/htdocs/theme/eldy/btn.inc.php +++ b/htdocs/theme/eldy/btn.inc.php @@ -60,6 +60,19 @@ span.butAction, span.butActionDelete { /* text-align: center; New button are on right of screen */ cursor: pointer; } + +.tableforfieldcreate a.butActionNew>span.fa-plus-circle, a.butActionNew>span.fa-plus-circle:hover, +span.butActionNew>span.fa-plus-circle, span.butActionNew>span.fa-plus-circle:hover, +a.butActionNewRefused>span.fa-plus-circle, a.butActionNewRefused>span.fa-plus-circle:hover, +span.butActionNewRefused>span.fa-plus-circle, span.butActionNewRefused>span.fa-plus-circle:hover, +a.butActionNew>span.fa-list-alt, a.butActionNew>span.fa-list-alt:hover, +span.butActionNew>span.fa-list-alt, span.butActionNew>span.fa-list-alt:hover, +a.butActionNewRefused>span.fa-list-alt, a.butActionNewRefused>span.fa-list-alt:hover, +span.butActionNewRefused>span.fa-list-alt, span.butActionNewRefused>span.fa-list-alt:hover { + font-size: 1em; + padding-left: 0px; +} + a.butActionNew>span.fa-plus-circle, a.butActionNew>span.fa-plus-circle:hover, span.butActionNew>span.fa-plus-circle, span.butActionNew>span.fa-plus-circle:hover, a.butActionNewRefused>span.fa-plus-circle, a.butActionNewRefused>span.fa-plus-circle:hover, @@ -68,7 +81,10 @@ a.butActionNew>span.fa-list-alt, a.butActionNew>span.fa-list-alt:hover, span.butActionNew>span.fa-list-alt, span.butActionNew>span.fa-list-alt:hover, a.butActionNewRefused>span.fa-list-alt, a.butActionNewRefused>span.fa-list-alt:hover, span.butActionNewRefused>span.fa-list-alt, span.butActionNewRefused>span.fa-list-alt:hover { - padding-: 6px; font-size: 1.5em; border: none; box-shadow: none; webkit-box-shadow: none; + padding-: 6px; + font-size: 1.5em; + border: none; + box-shadow: none; webkit-box-shadow: none; } .butAction:hover { @@ -208,7 +224,9 @@ TITLE BUTTON display: block; } - +div.pagination li:first-child a.btnTitle{ + margin-left: 10px; +} diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 561da969cdd..7e1a52bf59b 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -249,8 +249,9 @@ select.flat, form.flat select { select:invalid { color: gray; } -input:disabled { - background:#ddd; +input:disabled, textarea:disabled, select[disabled='disabled'] +{ + background:#eee; } input.liste_titre { @@ -261,9 +262,6 @@ input.removedfile { border: 0px !important; vertical-align: text-bottom; } -textarea:disabled { - background:#ddd; -} input[type=file ] { background-color: transparent; border-top: none; border-left: none; border-right: none; box-shadow: none; } input[type=checkbox] { background-color: transparent; border: none; box-shadow: none; } input[type=radio] { background-color: transparent; border: none; box-shadow: none; } @@ -5861,3 +5859,4 @@ div.tabsElem a.tab { include dol_buildpath($path.'/theme/'.$theme.'/dropdown.inc.php', 0); include dol_buildpath($path.'/theme/'.$theme.'/info-box.inc.php', 0); include dol_buildpath($path.'/theme/'.$theme.'/progress.inc.php', 0); +include dol_buildpath($path.'/theme/'.$theme.'/timeline.inc.php', 0); diff --git a/htdocs/theme/eldy/timeline.inc.php b/htdocs/theme/eldy/timeline.inc.php new file mode 100644 index 00000000000..2cb3461d713 --- /dev/null +++ b/htdocs/theme/eldy/timeline.inc.php @@ -0,0 +1,197 @@ + + * License: Open source - MIT + * Please visit http://opensource.org/licenses/MIT for more information + */ + +if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> +/*