mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge menu entry for tags/categories as submenu of element.
This commit is contained in:
parent
0938ac4afa
commit
dfe9c05d2f
|
|
@ -82,6 +82,8 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
|||
print '<form method="post" action="index.php?type='.$type.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
|
||||
|
||||
print '<table class="noborder nohover" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("Search").'</td>';
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/bankcateg.class.php';
|
|||
$langs->loadLangs(array('banks', 'categories'));
|
||||
|
||||
$action=GETPOST('action','aZ09');
|
||||
$optioncss = GETPOST('optioncss','aZ'); // Option for the css output (always '' except when 'print')
|
||||
|
||||
if (!$user->rights->banque->configurer)
|
||||
accessforbidden();
|
||||
|
|
@ -80,16 +81,36 @@ if ($categid) {
|
|||
llxHeader();
|
||||
|
||||
|
||||
print load_fiche_titre($langs->trans("RubriquesTransactions"), '', 'title_bank.png');
|
||||
print load_fiche_titre($langs->trans("RubriquesTransactions"));
|
||||
|
||||
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'].'">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
/*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 '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
*/
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Ref").'</td><td colspan="2">'.$langs->trans("Label").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Line to add category
|
||||
if ($action != 'edit')
|
||||
{
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td><td><input name="label" type="text" size="45"></td>';
|
||||
print '<td align="center"><input type="submit" name="add" class="button" value="'.$langs->trans("Add").'"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
$sql = "SELECT rowid, label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank_categ";
|
||||
$sql.= " WHERE entity = ".$conf->entity;
|
||||
|
|
@ -129,20 +150,10 @@ if ($result)
|
|||
$db->free($result);
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
/*
|
||||
* Line to add category
|
||||
*/
|
||||
if ($action != 'edit')
|
||||
{
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td><td><input name="label" type="text" size="45"></td>';
|
||||
print '<td align="center"><input type="submit" name="add" class="button" value="'.$langs->trans("Add").'"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '</table></form>';
|
||||
print '</form>';
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
|
|
|
|||
|
|
@ -684,6 +684,25 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||
$newmenu->add("/societe/card.php?leftmenu=suppliers&action=create&type=f",$langs->trans("MenuNewSupplier"), 2, $user->rights->societe->creer && ($user->rights->fournisseur->lire || $user->rights->supplier_proposal->lire));
|
||||
}
|
||||
|
||||
// Categories
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$langs->load("categories");
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))
|
||||
{
|
||||
// Categories prospects/customers
|
||||
$menutoshow=$langs->trans("CustomersProspectsCategoriesShort");
|
||||
if (! empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) $menutoshow=$langs->trans("CustomersCategoriesShort");
|
||||
if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $menutoshow=$langs->trans("ProspectsCategoriesShort");
|
||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=2", $menutoshow, 1, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||
}
|
||||
// Categories suppliers
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
$newmenu->add("/categories/index.php?leftmenu=catfournish&type=1", $langs->trans("SuppliersCategoriesShort"), 1, $user->rights->categorie->lire);
|
||||
}
|
||||
}
|
||||
|
||||
// Contacts
|
||||
$newmenu->add("/societe/index.php?leftmenu=thirdparties", (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")), 0, $user->rights->societe->contact->lire, '', $mainmenu, 'contacts');
|
||||
$newmenu->add("/contact/card.php?leftmenu=contacts&action=create", (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress")), 1, $user->rights->societe->contact->creer);
|
||||
|
|
@ -698,25 +717,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$langs->load("categories");
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))
|
||||
{
|
||||
// Categories prospects/customers
|
||||
$menutoshow=$langs->trans("CustomersProspectsCategoriesShort");
|
||||
if (! empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) $menutoshow=$langs->trans("CustomersCategoriesShort");
|
||||
if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $menutoshow=$langs->trans("ProspectsCategoriesShort");
|
||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=2", $menutoshow, 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||
$newmenu->add("/categories/card.php?action=create&type=2", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
}
|
||||
// Categories Contact
|
||||
$newmenu->add("/categories/index.php?leftmenu=catcontact&type=4", $langs->trans("ContactCategoriesShort"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||
$newmenu->add("/categories/card.php?action=create&type=4", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
// Categories suppliers
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
$newmenu->add("/categories/index.php?leftmenu=catfournish&type=1", $langs->trans("SuppliersCategoriesShort"), 0, $user->rights->categorie->lire);
|
||||
$newmenu->add("/categories/card.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
}
|
||||
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire);
|
||||
$newmenu->add("/categories/index.php?leftmenu=catcontact&type=4", $langs->trans("ContactCategoriesShort"), 1, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1211,10 +1213,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||
|
||||
if (! empty($conf->categorie->enabled)) {
|
||||
$langs->load("categories");
|
||||
$newmenu->add("/categories/index.php?type=5",$langs->trans("Rubriques"),0,$user->rights->categorie->creer, '', $mainmenu, 'tags');
|
||||
$newmenu->add("/categories/card.php?action=create&type=5",$langs->trans("NewCategory"),1,$user->rights->categorie->creer);
|
||||
$newmenu->add("/compta/bank/categ.php",$langs->trans("RubriquesTransactions"),0,$user->rights->categorie->creer, '', $mainmenu, 'tags');
|
||||
$newmenu->add("/compta/bank/categ.php",$langs->trans("NewCategory"),1,$user->rights->categorie->creer, '', $mainmenu, 'tags');
|
||||
$newmenu->add("/categories/index.php?type=5",$langs->trans("Rubriques"),1,$user->rights->categorie->creer, '', $mainmenu, 'tags');
|
||||
$newmenu->add("/compta/bank/categ.php",$langs->trans("RubriquesTransactions"),1,$user->rights->categorie->creer, '', $mainmenu, 'tags');
|
||||
}
|
||||
|
||||
// Prelevements
|
||||
|
|
@ -1274,6 +1274,14 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||
{
|
||||
$newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->rights->produit->lire && $user->rights->propale->lire);
|
||||
}
|
||||
|
||||
// Categories
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$langs->load("categories");
|
||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire);
|
||||
}
|
||||
}
|
||||
|
||||
// Services
|
||||
|
|
@ -1286,15 +1294,13 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||
{
|
||||
$newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=1", $langs->trans("Statistics"), 1, $user->rights->service->lire && $user->rights->propale->lire);
|
||||
}
|
||||
}
|
||||
|
||||
// Categories
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$langs->load("categories");
|
||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||
$newmenu->add("/categories/card.php?action=create&type=0", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire);
|
||||
// Categories
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$langs->load("categories");
|
||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire);
|
||||
}
|
||||
}
|
||||
|
||||
// Warehouse
|
||||
|
|
@ -1410,9 +1416,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$langs->load("categories");
|
||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=6", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||
$newmenu->add("/categories/card.php?action=create&type=6", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire);
|
||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=6", $langs->trans("Categories"), 1, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1544,23 +1548,21 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||
$newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=outofdate",$langs->trans("MenuMembersNotUpToDate"),2,$user->rights->adherent->lire);
|
||||
$newmenu->add("/adherents/list.php?leftmenu=members&statut=0",$langs->trans("MenuMembersResiliated"),2,$user->rights->adherent->lire);
|
||||
$newmenu->add("/adherents/stats/index.php?leftmenu=members",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire);
|
||||
if (! empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && ($usemenuhider || empty($leftmenu) || $leftmenu=='none' || $leftmenu=="members" || $leftmenu=="export")) $newmenu->add("/adherents/htpasswd.php?leftmenu=export",$langs->trans("Filehtpasswd"),1,$user->rights->adherent->export);
|
||||
|
||||
$newmenu->add("/adherents/cartes/carte.php?leftmenu=export",$langs->trans("MembersCards"),1,$user->rights->adherent->export);
|
||||
if (! empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && ($usemenuhider || empty($leftmenu) || $leftmenu=='none' || $leftmenu=="members" || $leftmenu=="export")) $newmenu->add("/adherents/htpasswd.php?leftmenu=export",$langs->trans("Filehtpasswd"),1,$user->rights->adherent->export);
|
||||
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$langs->load("categories");
|
||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=3", $langs->trans("Categories"), 1, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||
}
|
||||
|
||||
$newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members",$langs->trans("Subscriptions"),0,$user->rights->adherent->cotisation->lire);
|
||||
$newmenu->add("/adherents/list.php?leftmenu=members&statut=-1,1&mainmenu=members",$langs->trans("NewSubscription"),1,$user->rights->adherent->cotisation->creer);
|
||||
$newmenu->add("/adherents/subscription/list.php?leftmenu=members",$langs->trans("List"),1,$user->rights->adherent->cotisation->lire);
|
||||
$newmenu->add("/adherents/stats/index.php?leftmenu=members",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire);
|
||||
|
||||
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$langs->load("categories");
|
||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=3", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||
$newmenu->add("/categories/card.php?action=create&type=3", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire);
|
||||
}
|
||||
|
||||
//$newmenu->add("/adherents/index.php?leftmenu=export&mainmenu=members",$langs->trans("Tools"),0,$user->rights->adherent->export, '', $mainmenu, 'export');
|
||||
//if (! empty($conf->export->enabled) && ($usemenuhider || empty($leftmenu) || $leftmenu=="export")) $newmenu->add("/exports/index.php?leftmenu=export",$langs->trans("Datas"),1,$user->rights->adherent->export);
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ MembersCategoryShort=Members tag/category
|
|||
SuppliersCategoriesShort=Suppliers tags/categories
|
||||
CustomersCategoriesShort=Customers tags/categories
|
||||
ProspectsCategoriesShort=Prospects tags/categories
|
||||
CustomersProspectsCategoriesShort=Cust./Prosp. categories
|
||||
CustomersProspectsCategoriesShort=Cust./Prosp. tags/categories
|
||||
ProductsCategoriesShort=Products tags/categories
|
||||
MembersCategoriesShort=Members tags/categories
|
||||
ContactCategoriesShort=Contacts tags/categories
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user