Fix: W3C.
Fix: Permission on a button. Fix: Some menu entry not visible.
This commit is contained in:
parent
77e2d49658
commit
555170e573
@ -250,9 +250,12 @@ if ($id > 0)
|
||||
|
||||
// Country
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
|
||||
$img=picto_from_langcode($object->country_code);
|
||||
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
|
||||
else print ($img?$img.' ':'').$object->country;
|
||||
if (! empty($object->country_code))
|
||||
{
|
||||
$img=picto_from_langcode($object->country_code);
|
||||
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
|
||||
else print ($img?$img.' ':'').$object->country;
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// EMail
|
||||
|
||||
@ -569,7 +569,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
|
||||
$colspan=8;
|
||||
$colspan=9;
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Name"),$_SERVER["PHP_SELF"],"p.lastname","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Poste"),$_SERVER["PHP_SELF"],"p.poste","",$param,'',$sortfield,$sortorder);
|
||||
@ -583,17 +583,16 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
print '<td>'.$langs->trans("Skype").'</td>';
|
||||
}
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut","",$param,'',$sortfield,$sortorder);
|
||||
// Copy to clipboard
|
||||
print "<td> </td>";
|
||||
// Add to agenda
|
||||
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
|
||||
{
|
||||
$colspan++;
|
||||
print '<td> </td>';
|
||||
}
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
$colspan++;
|
||||
print '<td> </td>';
|
||||
}
|
||||
// Edit
|
||||
print '<td> </td>';
|
||||
print "</tr>";
|
||||
|
||||
|
||||
@ -615,18 +614,23 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
$colspan++;
|
||||
print '<td> </td>';
|
||||
}
|
||||
|
||||
// Status
|
||||
print '<td class="liste_titre">';
|
||||
print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status);
|
||||
print '</td>';
|
||||
|
||||
// Copy to clipboard
|
||||
print "<td> </td>";
|
||||
|
||||
// Add to agenda
|
||||
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
|
||||
{
|
||||
$colspan++;
|
||||
print '<td> </td>';
|
||||
}
|
||||
|
||||
|
||||
// Edit
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '</td>';
|
||||
@ -689,9 +693,10 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Status
|
||||
print '<td>'.$contactstatic->getLibStatut(5).'</td>';
|
||||
|
||||
// copy in clipboard
|
||||
// Copy to clipboard
|
||||
$coords = '';
|
||||
if (!empty($object->name))
|
||||
$coords .= addslashes($object->name)."<br />";
|
||||
@ -722,10 +727,12 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
if (!empty($object->country))
|
||||
$coords .= "<br />".addslashes($object->country);
|
||||
}
|
||||
|
||||
print '<td align="center"><a href="#" onclick="return copyToClipboard(\''.$coords.'\');">';
|
||||
print img_picto($langs->trans("Address"), 'object_address.png');
|
||||
print '</a></td>';
|
||||
|
||||
// Add to agenda
|
||||
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
|
||||
{
|
||||
print '<td align="center">';
|
||||
@ -739,8 +746,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
print img_object($langs->trans("Event"),"action");
|
||||
print '</a></td>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Edit
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
print '<td align="right">';
|
||||
@ -748,7 +755,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
print img_edit();
|
||||
print '</a></td>';
|
||||
}
|
||||
|
||||
else print '<td> </td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
|
||||
@ -613,11 +613,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
{
|
||||
$langs->load("suppliers");
|
||||
$newmenu->add("/fourn/liste.php?leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 1, $user->rights->fournisseur->lire, '', $mainmenu, 'suppliers');
|
||||
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
$newmenu->add("/societe/soc.php?leftmenu=suppliers&action=create&type=f",$langs->trans("MenuNewSupplier"), 2, $user->rights->societe->creer && $user->rights->fournisseur->lire);
|
||||
}
|
||||
$newmenu->add("/societe/soc.php?leftmenu=suppliers&action=create&type=f",$langs->trans("MenuNewSupplier"), 2, $user->rights->societe->creer && $user->rights->fournisseur->lire);
|
||||
//$newmenu->add("/fourn/liste.php?leftmenu=suppliers", $langs->trans("List"), 2, $user->rights->societe->lire && $user->rights->fournisseur->lire);
|
||||
//$newmenu->add("/contact/list.php?leftmenu=suppliers&type=f",$langs->trans("Contacts"), 2, $user->rights->societe->lire && $user->rights->fournisseur->lire && $user->rights->societe->contact->lire);
|
||||
}
|
||||
@ -640,25 +636,16 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
{
|
||||
// Categories prospects/customers
|
||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=2", $langs->trans("CustomersProspectsCategoriesShort"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
$newmenu->add("/categories/fiche.php?action=create&type=2", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
}
|
||||
$newmenu->add("/categories/fiche.php?action=create&type=2", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
}
|
||||
// Categories Contact
|
||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=4", $langs->trans("ContactCategoriesShort"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
$newmenu->add("/categories/fiche.php?action=create&type=4", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
}
|
||||
$newmenu->add("/categories/fiche.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=cat&type=1", $langs->trans("SuppliersCategoriesShort"), 0, $user->rights->categorie->lire);
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
$newmenu->add("/categories/fiche.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
}
|
||||
$newmenu->add("/categories/fiche.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
}
|
||||
//if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/liste.php", $langs->trans("List"), 1, $user->rights->categorie->lire);
|
||||
}
|
||||
@ -752,10 +739,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
{
|
||||
$langs->load("bills");
|
||||
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("BillsCustomers"),0,$user->rights->facture->lire, '', $mainmenu, 'customers_bills');
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
$newmenu->add("/compta/facture.php?action=create&leftmenu=customers_bills",$langs->trans("NewBill"),1,$user->rights->facture->creer);
|
||||
}
|
||||
$newmenu->add("/compta/facture.php?action=create&leftmenu=customers_bills",$langs->trans("NewBill"),1,$user->rights->facture->creer);
|
||||
$newmenu->add("/compta/facture/fiche-rec.php?leftmenu=customers_bills",$langs->trans("Repeatables"),1,$user->rights->facture->lire);
|
||||
|
||||
$newmenu->add("/compta/facture/impayees.php?leftmenu=customers_bills",$langs->trans("Unpaid"),1,$user->rights->facture->lire);
|
||||
@ -778,10 +762,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
{
|
||||
$langs->load("bills");
|
||||
$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"),0,$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills');
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
$newmenu->add("/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"),1,$user->rights->fournisseur->facture->creer);
|
||||
}
|
||||
$newmenu->add("/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"),1,$user->rights->fournisseur->facture->creer);
|
||||
$newmenu->add("/fourn/facture/impayees.php", $langs->trans("Unpaid"),1,$user->rights->fournisseur->facture->lire);
|
||||
$newmenu->add("/fourn/facture/paiement.php", $langs->trans("Payments"),1,$user->rights->fournisseur->facture->lire);
|
||||
|
||||
@ -959,11 +940,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
if (! empty($conf->product->enabled))
|
||||
{
|
||||
$newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->rights->produit->lire, '', $mainmenu, 'product');
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
$newmenu->add("/product/fiche.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->rights->produit->creer);
|
||||
$newmenu->add("/product/liste.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->rights->produit->lire);
|
||||
}
|
||||
$newmenu->add("/product/fiche.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->rights->produit->creer);
|
||||
$newmenu->add("/product/liste.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->rights->produit->lire);
|
||||
if (! empty($conf->propal->enabled))
|
||||
{
|
||||
$newmenu->add("/product/popuprop.php?leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->rights->produit->lire && $user->rights->propale->lire);
|
||||
@ -978,10 +956,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
if (! empty($conf->service->enabled))
|
||||
{
|
||||
$newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->rights->service->lire, '', $mainmenu, 'service');
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
$newmenu->add("/product/fiche.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->rights->service->creer);
|
||||
}
|
||||
$newmenu->add("/product/fiche.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->rights->service->creer);
|
||||
$newmenu->add("/product/liste.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->rights->service->lire);
|
||||
if (! empty($conf->propal->enabled))
|
||||
{
|
||||
@ -994,10 +969,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
{
|
||||
$langs->load("categories");
|
||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
$newmenu->add("/categories/fiche.php?action=create&type=0", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
}
|
||||
$newmenu->add("/categories/fiche.php?action=create&type=0", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
//if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/liste.php", $langs->trans("List"), 1, $user->rights->categorie->lire);
|
||||
}
|
||||
|
||||
@ -1039,10 +1011,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
$newmenu->add("/fourn/index.php?leftmenu=suppliers", $langs->trans("Suppliers"), 0, $user->rights->societe->lire && $user->rights->fournisseur->lire, '', $mainmenu, 'suppliers');
|
||||
|
||||
// Security check
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
$newmenu->add("/societe/soc.php?leftmenu=suppliers&action=create&type=f",$langs->trans("NewSupplier"), 1, $user->rights->societe->creer && $user->rights->fournisseur->lire);
|
||||
}
|
||||
$newmenu->add("/societe/soc.php?leftmenu=suppliers&action=create&type=f",$langs->trans("NewSupplier"), 1, $user->rights->societe->creer && $user->rights->fournisseur->lire);
|
||||
$newmenu->add("/fourn/liste.php",$langs->trans("List"), 1, $user->rights->societe->lire && $user->rights->fournisseur->lire);
|
||||
$newmenu->add("/contact/list.php?leftmenu=suppliers&type=f",$langs->trans("Contacts"), 1, $user->rights->societe->contact->lire && $user->rights->fournisseur->lire);
|
||||
$newmenu->add("/fourn/stats.php",$langs->trans("Statistics"), 1, $user->rights->societe->lire && $user->rights->fournisseur->lire);
|
||||
@ -1052,12 +1021,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
{
|
||||
$langs->load("bills");
|
||||
$newmenu->add("/fourn/facture/list.php?leftmenu=orders", $langs->trans("Bills"), 0, $user->rights->fournisseur->facture->lire, '', $mainmenu, 'orders');
|
||||
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
$newmenu->add("/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"), 1, $user->rights->fournisseur->facture->creer);
|
||||
}
|
||||
|
||||
$newmenu->add("/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"), 1, $user->rights->fournisseur->facture->creer);
|
||||
$newmenu->add("/fourn/facture/paiement.php", $langs->trans("Payments"), 1, $user->rights->fournisseur->facture->lire);
|
||||
}
|
||||
|
||||
@ -1073,10 +1037,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
{
|
||||
$langs->load("categories");
|
||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=1", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
$newmenu->add("/categories/fiche.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
}
|
||||
$newmenu->add("/categories/fiche.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
//if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/liste.php", $langs->trans("List"), 1, $user->rights->categorie->lire);
|
||||
}
|
||||
|
||||
@ -1196,10 +1157,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
{
|
||||
$langs->load("categories");
|
||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=3", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
$newmenu->add("/categories/fiche.php?action=create&type=3", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
}
|
||||
$newmenu->add("/categories/fiche.php?action=create&type=3", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
//if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/liste.php", $langs->trans("List"), 1, $user->rights->categorie->lire);
|
||||
}
|
||||
|
||||
|
||||
@ -158,7 +158,14 @@ if ($socid)
|
||||
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&socid='.$socid.'">'.$langs->trans("AddAction").'</a>';
|
||||
if (! empty($user->rights->agenda->myactions->create) || ! empty($user->rights->agenda->allactions->create))
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&socid='.$socid.'">'.$langs->trans("AddAction").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butActionRefused" href="#">'.$langs->trans("AddAction").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
@ -1576,12 +1576,12 @@ else
|
||||
|
||||
// Country
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'" class="nowrap">';
|
||||
if ($object->country_code)
|
||||
{
|
||||
$img=picto_from_langcode($object->country_code);
|
||||
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
|
||||
else print ($img?$img.' ':'').$object->country;
|
||||
}
|
||||
if (! empty($object->country_code))
|
||||
{
|
||||
$img=picto_from_langcode($object->country_code);
|
||||
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
|
||||
else print ($img?$img.' ':'').$object->country;
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// State
|
||||
|
||||
Loading…
Reference in New Issue
Block a user