mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
NEW: generalize button to create object from list, for most of the lists
This commit is contained in:
@@ -395,6 +395,12 @@ if ($resql)
|
||||
if (in_array($massaction, array('presend','predelete','closed'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->propal->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/comm/propal/card.php?action=create">'.$langs->trans('NewPropal').'</a>';
|
||||
}
|
||||
|
||||
// Lignes des champs de filtre
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
@@ -406,7 +412,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
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, 'title_commercial.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$topicmail="SendPropalRef";
|
||||
$modelmail="proposal_send";
|
||||
|
||||
@@ -420,6 +420,12 @@ if ($resql)
|
||||
if (in_array($massaction, array('presend','predelete','createbills'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton='';
|
||||
if ($contextpage == 'orderlist' && $user->rights->commande->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/commande/card.php?action=create">'.$langs->trans('NewOrder').'</a>';
|
||||
}
|
||||
|
||||
// Lines of title fields
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
@@ -432,7 +438,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
|
||||
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, 'title_commercial.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$topicmail="SendOrderRef";
|
||||
$modelmail="order_send";
|
||||
|
||||
@@ -153,6 +153,8 @@ if ($result)
|
||||
|
||||
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
||||
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create">'.$langs->trans('MenuNewVariousPayment').'</a>';
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
@@ -163,7 +165,7 @@ if ($result)
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
print_barre_liste($langs->trans("VariousPayments"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit);
|
||||
print_barre_liste($langs->trans("VariousPayments"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num, $totalnboflines, 'title_accountancy.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
|
||||
@@ -590,6 +590,12 @@ if ($resql)
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton='';
|
||||
if($user->rights->facture->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create">'.$langs->trans('NewBill').'</a>';
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
print '<form method="POST" name="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
|
||||
@@ -603,7 +609,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print_barre_liste($langs->trans('BillsCustomers').' '.($socid?' '.$soc->name:''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_accountancy.png', 0, '', '', $limit);
|
||||
print_barre_liste($langs->trans('BillsCustomers').' '.($socid?' '.$soc->name:''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_accountancy.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$topicmail="SendBillRef";
|
||||
$modelmail="facture_send";
|
||||
|
||||
@@ -131,6 +131,12 @@ if ($resql)
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->banque->cheque)
|
||||
{
|
||||
$newcardbutton = '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/paiement/cheque/card.php?action=new">'.$langs->trans('NewCheckDeposit').'</a>';
|
||||
}
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@@ -140,7 +146,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
print_barre_liste($langs->trans("MenuChequeDeposits"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_bank.png', '', '', $limit);
|
||||
print_barre_liste($langs->trans("MenuChequeDeposits"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_bank.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$moreforfilter='';
|
||||
|
||||
|
||||
@@ -101,6 +101,8 @@ if ($result)
|
||||
|
||||
$selectedfields='';
|
||||
|
||||
$newcardbutton = '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/prelevement/create.php">'.$langs->trans('NewStandingOrder').'</a>';
|
||||
|
||||
// Lines of title fields
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
@@ -112,7 +114,7 @@ if ($result)
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print_barre_liste($langs->trans("WithdrawalsReceipts"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic', 0, '', '', $limit);
|
||||
print_barre_liste($langs->trans("WithdrawalsReceipts"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$moreforfilter='';
|
||||
|
||||
|
||||
@@ -150,6 +150,8 @@ if ($result)
|
||||
if ($typeid) $param.='&typeid='.$typeid;
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/compta/salaries/card.php?action=create">'.$langs->trans('NewSalaryPayment').'</a>';
|
||||
|
||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@@ -159,7 +161,7 @@ if ($result)
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
print_barre_liste($langs->trans("SalariesPayments"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit);
|
||||
print_barre_liste($langs->trans("SalariesPayments"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num, $totalnboflines, 'title_accountancy.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
|
||||
@@ -146,6 +146,12 @@ if ($resql)
|
||||
if ($year) $param.='&year='.$year;
|
||||
if ($typeid) $param.='&typeid='.$typeid;
|
||||
|
||||
$newcardbutton='';
|
||||
if($user->rights->tax->charges->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/compta/sociales/card.php?action=create">'.$langs->trans('MenuNewSocialContribution').'</a>';
|
||||
}
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@@ -158,11 +164,11 @@ if ($resql)
|
||||
if ($year)
|
||||
{
|
||||
$center=($year?"<a href='index.php?year=".($year-1)."'>".img_previous()."</a> ".$langs->trans("Year")." $year <a href='index.php?year=".($year+1)."'>".img_next()."</a>":"");
|
||||
print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit);
|
||||
print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy.png', 0, $newcardbutton, '', $limit);
|
||||
}
|
||||
else
|
||||
{
|
||||
print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit);
|
||||
print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, $newcardbutton, '', $limit);
|
||||
}
|
||||
|
||||
if (empty($mysoc->country_id) && empty($mysoc->country_code))
|
||||
|
||||
@@ -148,6 +148,11 @@ if ($result)
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($typeid) $param.='&typeid='.$typeid;
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->tax->charges->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/compta/tva/card.php?action=create">'.$langs->trans('NewVATPayment').'</a>';
|
||||
}
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
@@ -157,7 +162,7 @@ if ($result)
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
print_barre_liste($langs->trans("VATPayments"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$totalnboflines, 'title_accountancy', 0, '', '', $limit);
|
||||
print_barre_liste($langs->trans("VATPayments"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$totalnboflines, 'title_accountancy', 0, $newcardbutton, '', $limit);
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
@@ -411,6 +411,12 @@ if ($user->rights->societe->supprimer) $arrayofmassactions['predelete']=$langs->
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/contact/card.php?action=create">'.$langs->trans('NewContactAddress').'</a>';
|
||||
}
|
||||
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'" name="formfilter">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@@ -420,7 +426,7 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="view" value="'.dol_escape_htmltag($view).'">';
|
||||
|
||||
print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies.png', 0, '', '', $limit);
|
||||
print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$topicmail="Information";
|
||||
$modelmail="contact";
|
||||
|
||||
@@ -370,6 +370,12 @@ if ($user->rights->contrat->supprimer) $arrayofmassactions['predelete']=$langs->
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->contrat->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/contrat/card.php?action=create">'.$langs->trans('NewContractSubscription').'</a>';
|
||||
}
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@@ -379,7 +385,7 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'title_commercial.png', 0, '', '', $limit);
|
||||
print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'title_commercial.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$topicmail="SendContractRef";
|
||||
$modelmail="contract";
|
||||
|
||||
@@ -131,7 +131,9 @@ if ($resql)
|
||||
//if ($page > 0) $param.= '&page='.$page;
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
|
||||
print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num,$nbtotalofrecords);
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/don/card.php?action=create">'.$langs->trans('NewDonation').'</a>';
|
||||
|
||||
print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num,$nbtotalofrecords, 'title_generic.png', 0, $newcardbutton);
|
||||
|
||||
print '<form method="get" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
|
||||
@@ -265,6 +265,12 @@ if ($resql)
|
||||
|
||||
//$massactionbutton=$form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge")));
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->expedition->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/expedition/card.php?action=create2">'.$langs->trans('NewSending').'</a>';
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
@@ -275,7 +281,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
|
||||
print_barre_liste($langs->trans('ListOfSendings'), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num, $nbtotalofrecords, '', 0, '', '', $limit);
|
||||
print_barre_liste($langs->trans('ListOfSendings'), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num, $nbtotalofrecords, '', 0, $newcardbutton, '', $limit);
|
||||
|
||||
if ($sall)
|
||||
{
|
||||
|
||||
@@ -466,7 +466,14 @@ if ($resql)
|
||||
else
|
||||
{
|
||||
$title = $langs->trans("ListTripsAndExpenses");
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, '', '', $limit);
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->expensereport->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/expensereport/card.php?action=create">'.$langs->trans('NewTrip').'</a>';
|
||||
}
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit);
|
||||
}
|
||||
|
||||
$topicmail="SendExpenseReport";
|
||||
|
||||
@@ -272,6 +272,12 @@ if ($resql)
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->ficheinter->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/fichinter/card.php?action=create">'.$langs->trans('NewIntervention').'</a>';
|
||||
}
|
||||
|
||||
// Lines of title fields
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
@@ -283,7 +289,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
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, 'title_commercial.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$topicmail="Information";
|
||||
$modelmail="intervention";
|
||||
|
||||
@@ -646,6 +646,12 @@ if ($resql)
|
||||
if ($user->rights->fournisseur->commande->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete");
|
||||
if (in_array($massaction, array('presend','predelete','createbills'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton='';
|
||||
if($user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/card.php?action=create">'.$langs->trans('NewOrder').'</a>';
|
||||
}
|
||||
|
||||
// Lignes des champs de filtre
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
@@ -658,8 +664,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
|
||||
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, 'title_commercial.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$topicmail="SendOrderRef";
|
||||
$modelmail="order_supplier_send";
|
||||
|
||||
@@ -474,6 +474,12 @@ if ($resql)
|
||||
if (in_array($massaction, array('presend','predelete','createbills'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create">'.$langs->trans('NewBill').'</a>';
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
print '<form method="POST" name="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
@@ -486,7 +492,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||
|
||||
print_barre_liste($langs->trans("BillsSuppliers").($socid?' '.$soc->name:''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||
print_barre_liste($langs->trans("BillsSuppliers").($socid?' '.$soc->name:''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$topicmail="SendBillRef";
|
||||
$modelmail="supplier_invoice_send";
|
||||
|
||||
@@ -377,7 +377,10 @@ else
|
||||
$nbtotalofrecords = count($holiday->holiday);
|
||||
//print $num;
|
||||
//print count($holiday->holiday);
|
||||
print_barre_liste($langs->trans("ListeCP"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_hrm.png', 0, '', '', $limit);
|
||||
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/holiday/card.php?action=request">'.$langs->trans('MenuAddCP').'</a>';
|
||||
|
||||
print_barre_liste($langs->trans("ListeCP"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_hrm.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$topicmail="Information";
|
||||
$modelmail="leaverequest";
|
||||
|
||||
@@ -103,6 +103,7 @@ LT2PaymentsES=IRPF Payments
|
||||
VATPayment=Sales tax payment
|
||||
VATPayments=Sales tax payments
|
||||
VATRefund=Sales tax refund
|
||||
NewVATPayment=New sales tax payment
|
||||
Refund=Refund
|
||||
SocialContributionsPayments=Social/fiscal taxes payments
|
||||
ShowVatPayment=Show VAT payment
|
||||
|
||||
@@ -111,6 +111,12 @@ if ($resql)
|
||||
if ($search_amount) $param.="&search_amount=".urlencode($search_amount_ht);
|
||||
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->loan->write)
|
||||
{
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/loan/card.php?action=create">'.$langs->trans('NewLoan').'</a>';
|
||||
}
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@@ -120,7 +126,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
|
||||
print_barre_liste($langs->trans("Loans"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, '', '', $limit);
|
||||
print_barre_liste($langs->trans("Loans"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
|
||||
@@ -412,6 +412,16 @@ else
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton='';
|
||||
$rightskey='produit';
|
||||
if($type == Product::TYPE_SERVICE) $rightskey='service';
|
||||
if($user->rights->{$rightskey}->creer)
|
||||
{
|
||||
$label='NewProduct';
|
||||
if($type == Product::TYPE_SERVICE) $label='NewService';
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/product/card.php?action=create&type='.$type.'">'.$langs->trans($label).'</a>';
|
||||
}
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post" name="formulaire">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@@ -423,7 +433,7 @@ else
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
if (empty($arrayfields['p.fk_product_type']['checked'])) print '<input type="hidden" name="search_type" value="'.dol_escape_htmltag($search_type).'">';
|
||||
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_products.png', 0, '', '', $limit);
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_products.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$topicmail="Information";
|
||||
$modelmail="product";
|
||||
|
||||
@@ -130,6 +130,12 @@ if ($result)
|
||||
if ($search_status) $param.="&search_status=".urlencode($search_status);
|
||||
if ($sall) $param.="&sall=".urlencode($sall);
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->stock->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create">'.$langs->trans('MenuNewWarehouse').'</a>';
|
||||
}
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post" name="formulaire">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
@@ -137,7 +143,7 @@ if ($result)
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
print_barre_liste($langs->trans("ListOfWarehouses"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_generic.png', 0, '', '', $limit);
|
||||
print_barre_liste($langs->trans("ListOfWarehouses"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_generic.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
if ($sall)
|
||||
{
|
||||
|
||||
@@ -441,6 +441,12 @@ if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=arr
|
||||
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->projet->creer)
|
||||
{
|
||||
$newcardbutton = '<a class="butAction" href="'.DOL_URL_ROOT.'/projet/card.php?action=create">'.$langs->trans('NewProject').'</a>';
|
||||
}
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@@ -452,7 +458,7 @@ print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_project', 0, '', '', $limit);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_project', 0, $newcardbutton, '', $limit);
|
||||
|
||||
// Show description of content
|
||||
print '<div class="opacitymedium">';
|
||||
|
||||
@@ -391,6 +391,12 @@ if ($user->rights->societe->supprimer) $arrayofmassactions['predelete']=$langs->
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->projet->creer)
|
||||
{
|
||||
$newcardbutton = '<a class="butAction" href="'.DOL_URL_ROOT.'/projet/tasks.php?action=create">'.$langs->trans('NewTask').'</a>';
|
||||
}
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@@ -402,7 +408,7 @@ print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_project', 0, '', '', $limit);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_project', 0, $newcardbutton, '', $limit);
|
||||
|
||||
// Show description of content
|
||||
print '<div class="opacitymedium">';
|
||||
|
||||
@@ -573,6 +573,23 @@ if ($user->rights->societe->supprimer) $arrayofmassactions['predelete']=$langs->
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
$typefilter='';
|
||||
$label='MenuNewThirdParty';
|
||||
|
||||
if(! empty($type))
|
||||
{
|
||||
$typefilter = '&type='.$type;
|
||||
if($type == 'p') $label='MenuNewProspect';
|
||||
if($type == 'c') $label='MenuNewCustomer';
|
||||
if($type == 'f') $label='NewSupplier';
|
||||
}
|
||||
|
||||
$newcardbutton = '<a class="butAction" href="'.DOL_URL_ROOT.'/societe/card.php?action=create'.$typefilter.'">'.$langs->trans($label).'</a>';
|
||||
}
|
||||
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'" name="formfilter">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@@ -581,7 +598,7 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$langs->load("other");
|
||||
$textprofid=array();
|
||||
|
||||
@@ -387,6 +387,12 @@ if ($resql)
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton='';
|
||||
if($user->rights->supplier_proposal->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butAction" href="'.DOL_URL_ROOT.'/supplier_proposal/card.php?action=create">'.$langs->trans('NewAskPrice').'</a>';
|
||||
}
|
||||
|
||||
// Lignes des champs de filtre
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
@@ -397,7 +403,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
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, 'title_commercial.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$topicmail="SendSupplierProposalRef";
|
||||
$modelmail="supplier_proposal_send";
|
||||
|
||||
Reference in New Issue
Block a user