diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 0da7a2b0ea4..13b231f15d6 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -365,9 +365,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->adherent->creer) { - $newcardbutton=''.$langs->trans('NewMember').''; - $newcardbutton.= ''; - $newcardbutton.= ''; + $newcardbutton.= dolGetButtonTitle($langs->trans('NewMember'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/card.php?action=create'); } print '
'; diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 2e46262398f..574f061b25d 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -247,9 +247,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->adherent->cotisation->creer) { - $newcardbutton=''.$langs->trans('NewSubscription').''; - $newcardbutton.= ''; - $newcardbutton.= ''; + $newcardbutton.= dolGetButtonTitle($langs->trans('NewSubscription'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/list.php?status=-1,1'); } print ''; diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index c18791f8329..2dbafb20e47 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -227,9 +227,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->banque->configurer) { - $newcardbutton.=''.$langs->trans("NewFinancialAccount").''; - $newcardbutton.= ''; - $newcardbutton.= ''; + $newcardbutton.= dolGetButtonTitle($langs->trans('NewFinancialAccount'), '', 'fa fa-plus-circle', 'card.php?action=create'); } diff --git a/htdocs/compta/localtax/list.php b/htdocs/compta/localtax/list.php index 184c9600926..4943081b0c6 100644 --- a/htdocs/compta/localtax/list.php +++ b/htdocs/compta/localtax/list.php @@ -45,9 +45,7 @@ $localtax_static = new Localtax($db); $newcardbutton=''; if ($user->rights->tax->charges->creer) { - $newcardbutton=''.$langs->trans('NewLocalTaxPayment', ($ltt+1)).''; - $newcardbutton.= ''; - $newcardbutton.= ''; + $newcardbutton.= dolGetButtonTitle($langs->trans('NewLocalTaxPayment', ($ltt+1)), '', 'fa fa-plus-circle',DOL_URL_ROOT.'/compta/localtax/card.php?action=create&localTaxType='.$ltt); } print load_fiche_titre($langs->transcountry($ltt==2?"LT2Payments":"LT1Payments", $mysoc->country_code), $newcardbutton); diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index 061008f42a8..e370f2e7d6d 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -150,10 +150,8 @@ if ($result) $newcardbutton=''; if ($user->rights->tax->charges->creer) { - $newcardbutton=''.$langs->trans('NewVATPayment').''; - $newcardbutton.= ''; - $newcardbutton.= ''; - } + $newcardbutton.= dolGetButtonTitle($langs->trans('NewVATPayment', ($ltt+1)), '', 'fa fa-plus-circle',DOL_URL_ROOT.'/compta/tva/card.php?action=create'); + } print ''; if ($optioncss != '') print ''; diff --git a/htdocs/contact/agenda.php b/htdocs/contact/agenda.php index 5b9e84f2d16..6a2593b57a6 100644 --- a/htdocs/contact/agenda.php +++ b/htdocs/contact/agenda.php @@ -261,9 +261,7 @@ else { if (! empty($user->rights->agenda->myactions->create) || ! empty($user->rights->agenda->allactions->create)) { - $newcardbutton.=''.$langs->trans("AddAction").''; - $newcardbutton.= ''; - $newcardbutton.= ''; + $newcardbutton.= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle',DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out); } } diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index b60852f205b..43e28456c62 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -280,10 +280,8 @@ if ($resql) $newcardbutton=''; if ($user->rights->expedition->creer) { - $newcardbutton=''.$langs->trans('NewSending').''; - $newcardbutton.= ''; - $newcardbutton.= ''; - } + $newcardbutton.= dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle',DOL_URL_ROOT.'/expedition/card.php?action=create2'); + } $i = 0; print ''."\n"; diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 465b054569b..aadfa5b55f9 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -455,9 +455,7 @@ if ($resql) $newcardbutton=''; if ($user->rights->expensereport->creer) { - $newcardbutton=''.$langs->trans('NewTrip').''; - $newcardbutton.= ''; - $newcardbutton.= ''; + $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); diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index a9a2963c78d..b9969336f96 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -632,10 +632,8 @@ if ($resql) $newcardbutton=''; if($user->rights->fournisseur->commande->creer) { - $newcardbutton=''.$langs->trans('NewOrder').''; - $newcardbutton.= ''; - $newcardbutton.= ''; - } + $newcardbutton.= dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/fourn/commande/card.php?action=create'); + } // Lignes des champs de filtre print ''; diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 5497d66e698..c432a929d5d 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -340,10 +340,8 @@ else $newcardbutton=''; if ($user->rights->holiday->write) { - $newcardbutton=''.$langs->trans('MenuAddCP').''; - $newcardbutton.= ''; - $newcardbutton.= ''; - } + $newcardbutton.= dolGetButtonTitle($langs->trans('MenuAddCP'), '', 'fa fa-plus-circle',DOL_URL_ROOT.'/holiday/card.php?action=request'); + } print_barre_liste($langs->trans("ListeCP"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_hrm.png', 0, $newcardbutton, '', $limit); diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 56d8b0bc504..e96c263497b 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -439,10 +439,8 @@ if ($resql) { $label='NewProduct'; if($type == Product::TYPE_SERVICE) $label='NewService'; - $newcardbutton=''.$langs->trans($label).''; - $newcardbutton.= ''; - $newcardbutton.= ''; - } + $newcardbutton.= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle',DOL_URL_ROOT.'/product/card.php?action=create&type='.$type); + } print ''; if ($optioncss != '') print ''; diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 1a7fb9317e1..61ad41335f8 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -450,9 +450,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->projet->creer) { - $newcardbutton = ''.$langs->trans('NewProject').''; - $newcardbutton.= ''; - $newcardbutton.= ''; + $newcardbutton.= dolGetButtonTitle($langs->trans('NewProject'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/card.php?action=create'); } print ''; diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 63c2a004982..4017d84c54e 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -388,10 +388,8 @@ if ($resql) $newcardbutton=''; if($user->rights->supplier_proposal->creer) { - $newcardbutton=''.$langs->trans('NewAskPrice').''; - $newcardbutton.= ''; - $newcardbutton.= ''; - } + $newcardbutton.= dolGetButtonTitle($langs->trans('NewAskPrice'), '', 'fa fa-plus-circle',DOL_URL_ROOT.'/supplier_proposal/card.php?action=create'); + } // Lignes des champs de filtre print ''; diff --git a/htdocs/variants/list.php b/htdocs/variants/list.php index c25796f4b67..75d9c3df44e 100644 --- a/htdocs/variants/list.php +++ b/htdocs/variants/list.php @@ -59,9 +59,7 @@ llxHeader('', $title); $newcardbutton=''; if ($user->rights->produit->creer) { - $newcardbutton=''.$langs->trans('Create').''; - $newcardbutton.= ''; - $newcardbutton.= ''; + $newcardbutton.= dolGetButtonTitle($langs->trans('Create'), '', 'fa fa-plus-circle',DOL_URL_ROOT.'/variants/create.php'); } print load_fiche_titre($title, $newcardbutton, 'title_products');