diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 8468e071f35..f066edb8fb2 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -480,11 +480,9 @@ if ($resql) if (in_array($massaction, array('presend', 'predelete', 'closed'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); - $newcardbutton = ''; - $url = DOL_URL_ROOT.'/comm/propal/card.php?action=create'; if (!empty($socid)) $url .= '&socid='.$socid; - $newcardbutton .= dolGetButtonTitle($langs->trans('NewPropal'), '', 'fa fa-plus-circle', $url, '', $user->rights->propal->creer); + $newcardbutton = dolGetButtonTitle($langs->trans('NewPropal'), '', 'fa fa-plus-circle', $url, '', $user->rights->propal->creer); // Fields title search print '
'; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 91f5b9d8602..c65ffe18e12 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -483,11 +483,9 @@ if ($resql) if (in_array($massaction, array('presend', 'predelete', 'createbills'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); - $newcardbutton = ''; - $url = DOL_URL_ROOT.'/commande/card.php?action=create'; if (!empty($socid)) $url .= '&socid='.$socid; - $newcardbutton .= dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', $contextpage == 'orderlist' && $user->rights->commande->creer); + $newcardbutton = dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', $contextpage == 'orderlist' && $user->rights->commande->creer); // Lines of title fields print ''; diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index 3b99fc599a5..d4b8bb512cd 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -251,11 +251,9 @@ if ($result) if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); - $newcardbutton = ''; - $url = DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create'; if (!empty($socid)) $url .= '&socid='.$socid; - $newcardbutton .= dolGetButtonTitle($langs->trans('MenuNewVariousPayment'), '', 'fa fa-plus-circle', $url, '' $user->rights->banque->modifier); + $newcardbutton = dolGetButtonTitle($langs->trans('MenuNewVariousPayment'), '', 'fa fa-plus-circle', $url, '', $user->rights->banque->modifier); print ''; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index d3198dcc9b2..f7cb7dc8cca 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -674,11 +674,9 @@ if ($resql) if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); - $newcardbutton = ''; - $url = DOL_URL_ROOT.'/compta/facture/card.php?action=create'; if (!empty($socid)) $url .= '&socid='.$socid; - $newcardbutton .= dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', $url, '', $user->rights->facture->creer && $contextpage != 'poslist'); + $newcardbutton = dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', $url, '', $user->rights->facture->creer && $contextpage != 'poslist'); $i = 0; print ''."\n"; diff --git a/htdocs/compta/localtax/list.php b/htdocs/compta/localtax/list.php index 7de2fcc8c0b..2015e16da93 100644 --- a/htdocs/compta/localtax/list.php +++ b/htdocs/compta/localtax/list.php @@ -42,11 +42,9 @@ llxHeader(); $localtax_static = new Localtax($db); -$newcardbutton = ''; - $url = DOL_URL_ROOT.'/compta/localtax/card.php?action=create&localTaxType='.$ltt; if (!empty($socid)) $url .= '&socid='.$socid; -$newcardbutton .= dolGetButtonTitle($langs->trans('NewLocalTaxPayment', ($ltt + 1)), '', 'fa fa-plus-circle', $url, '', $user->rights->tax->charges->creer); +$newcardbutton = dolGetButtonTitle($langs->trans('NewLocalTaxPayment', ($ltt + 1)), '', 'fa fa-plus-circle', $url, '', $user->rights->tax->charges->creer); print load_fiche_titre($langs->transcountry($ltt == 2 ? "LT2Payments" : "LT1Payments", $mysoc->country_code), $newcardbutton, 'title_accountancy'); diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index 405b99cd2e0..3bb45c4e312 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -124,11 +124,9 @@ if ($resql) if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage; if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; - $newcardbutton = ''; - $url = DOL_URL_ROOT.'/compta/paiement/cheque/card.php?action=new'; if (!empty($socid)) $url .= '&socid='.$socid; - $newcardbutton .= dolGetButtonTitle($langs->trans('NewCheckDeposit'), '', 'fa fa-plus-circle', $url, '', $user->rights->banque->cheque); + $newcardbutton = dolGetButtonTitle($langs->trans('NewCheckDeposit'), '', 'fa fa-plus-circle', $url, '', $user->rights->banque->cheque); print ''; if ($optioncss != '') print ''; diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index d05b4d823ef..8c9b9efb5a6 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -146,11 +146,9 @@ if ($result) if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; if ($typeid) $param .= '&typeid='.$typeid; - $newcardbutton = ''; - $url = DOL_URL_ROOT.'/compta/tva/card.php?action=create'; if (!empty($socid)) $url .= '&socid='.$socid; - $newcardbutton .= dolGetButtonTitle($langs->trans('NewVATPayment', ($ltt + 1)), '', 'fa fa-plus-circle', $url, '', $user->rights->tax->charges->creer); + $newcardbutton = dolGetButtonTitle($langs->trans('NewVATPayment', ($ltt + 1)), '', 'fa fa-plus-circle', $url, '', $user->rights->tax->charges->creer); print ''; if ($optioncss != '') print ''; diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 91e6faecb59..945e6a7d936 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -369,11 +369,9 @@ if ($user->rights->contrat->supprimer) $arrayofmassactions['predelete'] = 'selectMassAction('', $arrayofmassactions); -$newcardbutton = ''; - $url = DOL_URL_ROOT.'/contrat/card.php?action=create'; if (!empty($socid)) $url .= '&socid='.$socid; -$newcardbutton .= dolGetButtonTitle($langs->trans('NewContractSubscription'), '', 'fa fa-plus-circle', $url, '', $user->rights->contrat->creer); +$newcardbutton = dolGetButtonTitle($langs->trans('NewContractSubscription'), '', 'fa fa-plus-circle', $url, '', $user->rights->contrat->creer); print ''; if ($optioncss != '') print ''; diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index af1b138d7b7..7744487c1b7 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -359,13 +359,11 @@ if ($resql) if (in_array($massaction, array('presend'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); - $newcardbutton = ''; - // Currently: a sending can't create from sending list // $url = DOL_URL_ROOT.'/expedition/card.php?action=create'; // if (!empty($socid)) $url .= '&socid='.$socid; - // $newcardbutton .= dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', $url, '', $user->rights->expedition->creer); - $newcardbutton .= dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/expedition/card.php?action=create2', '' , $user->rights->expedition->creer); + // $newcardbutton = dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', $url, '', $user->rights->expedition->creer); + $newcardbutton = dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/expedition/card.php?action=create2', '' , $user->rights->expedition->creer); $i = 0; print ''."\n"; diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 29b0aa1a202..fbe9ea2a84a 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -461,11 +461,9 @@ if ($resql) } else { $title = $langs->trans("ListTripsAndExpenses"); - $newcardbutton = ''; - $url = DOL_URL_ROOT.'/expensereport/card.php?action=create'; if (!empty($socid)) $url .= '&socid='.$socid; - $newcardbutton .= dolGetButtonTitle($langs->trans('NewTrip'), '', 'fa fa-plus-circle', $url, '', $user->rights->expensereport->creer); + $newcardbutton = dolGetButtonTitle($langs->trans('NewTrip'), '', 'fa fa-plus-circle', $url, '', $user->rights->expensereport->creer); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'trip', 0, $newcardbutton, '', $limit, 0, 0, 1); } diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index fcad99c975e..b01183fe94a 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -322,7 +322,7 @@ if ($resql) $url = DOL_URL_ROOT.'/fichinter/card.php?action=create'; if (!empty($socid)) $url .= '&socid='.$socid; - $morehtmlcenter .= dolGetButtonTitle($langs->trans('NewIntervention'), '', 'fa fa-plus-circle', $url, '', $user->rights->ficheinter->creer); + $newcardbutton = dolGetButtonTitle($langs->trans('NewIntervention'), '', 'fa fa-plus-circle', $url, '', $user->rights->ficheinter->creer); // Lines of title fields print ''."\n"; diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index ca1d25dd9d7..9663f2de3db 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -649,11 +649,9 @@ if ($resql) if (in_array($massaction, array('presend', 'predelete', 'createbills'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); - $newcardbutton = ''; - $url = DOL_URL_ROOT.'/fourn/commande/card.php?action=create'; if (!empty($socid)) $url .= '&socid='.$socid; - $newcardbutton .= dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', $user->rights->fournisseur->commande->creer); + $newcardbutton = dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', $user->rights->fournisseur->commande->creer); // Fields title search print ''; diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index ea7c807e107..9af06728a4b 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -508,11 +508,9 @@ if ($resql) if (in_array($massaction, array('presend', 'predelete', 'createbills'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); - $newcardbutton = ''; - $url = DOL_URL_ROOT.'/fourn/facture/card.php?action=create'; if (!empty($socid)) $url .= '&socid='.$socid; - $newcardbutton .= dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', $url, '', $user->rights->fournisseur->facture->creer); + $newcardbutton = dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', $url, '', $user->rights->fournisseur->facture->creer); $i = 0; print ''."\n"; diff --git a/htdocs/loan/list.php b/htdocs/loan/list.php index 21a131eb525..fa624873e2f 100644 --- a/htdocs/loan/list.php +++ b/htdocs/loan/list.php @@ -150,11 +150,9 @@ if ($resql) if ($search_amount) $param .= "&search_amount=".urlencode($search_amount); if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); - $newcardbutton = ''; - $url = DOL_URL_ROOT.'/loan/card.php?action=create'; if (!empty($socid)) $url .= '&socid='.$socid; - $newcardbutton .= dolGetButtonTitle($langs->trans('NewLoan'), '', 'fa fa-plus-circle', $url, '', $user->rights->loan->write); + $newcardbutton = dolGetButtonTitle($langs->trans('NewLoan'), '', 'fa fa-plus-circle', $url, '', $user->rights->loan->write); print ''."\n"; if ($optioncss != '') print ''; diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 7667d2abf20..d6065f32476 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -448,11 +448,9 @@ if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = $massactionbutton = $form->selectMassAction('', $arrayofmassactions); -$newcardbutton = ''; - $url = DOL_URL_ROOT.'/projet/card.php?action=create'; if (!empty($socid)) $url .= '&socid='.$socid; -$newcardbutton .= dolGetButtonTitle($langs->trans('NewProject'), '', 'fa fa-plus-circle', $url, '', $user->rights->projet->creer); +$newcardbutton = dolGetButtonTitle($langs->trans('NewProject'), '', 'fa fa-plus-circle', $url, '', $user->rights->projet->creer); print ''; if ($optioncss != '') print ''; diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index e43b412f6c1..11a5aa10bbc 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -153,11 +153,9 @@ if ($result) if ($typeid) $param .= '&typeid='.$typeid; if ($optioncss != '') $param .= '&optioncss='.$optioncss; - $newcardbutton = ''; - $url = DOL_URL_ROOT.'/salaries/card.php?action=create'; if (!empty($socid)) $url .= '&socid='.$socid; - $newcardbutton .= dolGetButtonTitle($langs->trans('NewSalaryPayment'), '', 'fa fa-plus-circle', $url, '', $user->rights->salaries->write); + $newcardbutton = dolGetButtonTitle($langs->trans('NewSalaryPayment'), '', 'fa fa-plus-circle', $url, '', $user->rights->salaries->write); print ''; if ($optioncss != '') print ''; diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 3f8fef2b87d..5730c46674f 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -598,7 +598,6 @@ if ($user->rights->societe->supprimer) $arrayofmassactions['predelete'] = 'selectMassAction('', $arrayofmassactions); -$newcardbutton = ''; $typefilter = ''; $label = 'MenuNewThirdParty'; @@ -612,7 +611,7 @@ if (!empty($type)) $url = DOL_URL_ROOT.'/societe/card.php?action=create'.$typefilter; if (!empty($socid)) $url .= '&socid='.$socid; -$newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url, '', $user->rights->societe->creer && $contextpage != 'poslist'); +$newcardbutton = dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url, '', $user->rights->societe->creer && $contextpage != 'poslist'); print ''; if ($optioncss != '') print ''; diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index e8e2f79d85a..33f04d427f2 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -414,11 +414,9 @@ if ($resql) if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); - $newcardbutton = ''; - $url = DOL_URL_ROOT.'/supplier_proposal/card.php?action=create'; if (!empty($socid)) $url .= '&socid='.$socid; - $newcardbutton .= dolGetButtonTitle($langs->trans('NewAskPrice'), '', 'fa fa-plus-circle', $url, '', $user->rights->supplier_proposal->creer); + $newcardbutton = dolGetButtonTitle($langs->trans('NewAskPrice'), '', 'fa fa-plus-circle', $url, '', $user->rights->supplier_proposal->creer); // Fields title search print ''; diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index 1bdcaed0e01..b99ee599305 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -568,11 +568,9 @@ print ''; if ($socid) print ''; if ($projectid) print ''; -$newcardbutton = ''; - $url = DOL_URL_ROOT.'/ticket/card.php?action=create'.($socid ? '&socid='.$socid : '').($projectid ? '&origin=projet_project&originid='.$projectid : ''); if (!empty($socid)) $url .= '&socid='.$socid; -$newcardbutton .= dolGetButtonTitle($langs->trans('NewTicket'), '', 'fa fa-plus-circle', $url, '', $user->rights->ticket->write); +$newcardbutton = dolGetButtonTitle($langs->trans('NewTicket'), '', 'fa fa-plus-circle', $url, '', $user->rights->ticket->write); $picto = 'ticket'; if ($socid > 0) $picto = ''; diff --git a/htdocs/user/list.php b/htdocs/user/list.php index ac2719ff1c8..91181bb2c4f 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -301,10 +301,9 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; $text = $langs->trans("ListOfUsers"); -$newcardbutton = ''; $url = DOL_URL_ROOT.'/user/card.php?action=create'.($mode == 'employee' ? '&employee=1' : '').'&leftmenu='; if (!empty($socid)) $url .= '&socid='.$socid; -$newcardbutton .= dolGetButtonTitle($langs->trans('NewUser'), '', 'fa fa-plus-circle', $url, '', $canadduser); +$newcardbutton = dolGetButtonTitle($langs->trans('NewUser'), '', 'fa fa-plus-circle', $url, '', $canadduser); print ''."\n"; if ($optioncss != '') print '';