Show greyed lines for not allowed export filters
This commit is contained in:
parent
48f0215e96
commit
66dafbd201
@ -112,11 +112,11 @@ class Export
|
|||||||
$bool=$user->rights->$perm[0]->$perm[1];
|
$bool=$user->rights->$perm[0]->$perm[1];
|
||||||
}
|
}
|
||||||
if ($perm[0]=='user' && $user->admin) $bool=true;
|
if ($perm[0]=='user' && $user->admin) $bool=true;
|
||||||
//print("$bool<br>");
|
//print $bool." $perm[0]"."<br>";
|
||||||
|
|
||||||
// Permissions ok
|
// Permissions ok
|
||||||
if ($bool)
|
// if ($bool)
|
||||||
{
|
// {
|
||||||
// Charge fichier lang en rapport
|
// Charge fichier lang en rapport
|
||||||
$langtoload=$module->getLangFilesArray();
|
$langtoload=$module->getLangFilesArray();
|
||||||
if (is_array($langtoload))
|
if (is_array($langtoload))
|
||||||
@ -129,6 +129,8 @@ class Export
|
|||||||
|
|
||||||
// Module
|
// Module
|
||||||
$this->array_export_module[$i]=$module;
|
$this->array_export_module[$i]=$module;
|
||||||
|
// Permission
|
||||||
|
$this->array_export_perms[$i]=$bool;
|
||||||
// Icon
|
// Icon
|
||||||
$this->array_export_icon[$i]=(isset($module->export_icon[$r])?$module->export_icon[$r]:$module->picto);
|
$this->array_export_icon[$i]=(isset($module->export_icon[$r])?$module->export_icon[$r]:$module->picto);
|
||||||
// Code du dataset export
|
// Code du dataset export
|
||||||
@ -151,7 +153,7 @@ class Export
|
|||||||
|
|
||||||
dolibarr_syslog("Export loaded for module ".$modulename." with index ".$i.", dataset=".$module->export_code[$r].", nb of fields=".sizeof($module->export_fields_code[$r]));
|
dolibarr_syslog("Export loaded for module ".$modulename." with index ".$i.", dataset=".$module->export_code[$r].", nb of fields=".sizeof($module->export_fields_code[$r]));
|
||||||
$i++;
|
$i++;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -292,8 +292,15 @@ if ($step == 1 || ! $datatoexport)
|
|||||||
print img_object($objexport->array_export_module[$key]->getName(),$objexport->array_export_icon[$key]).' ';
|
print img_object($objexport->array_export_module[$key]->getName(),$objexport->array_export_icon[$key]).' ';
|
||||||
print $objexport->array_export_label[$key];
|
print $objexport->array_export_label[$key];
|
||||||
print '</td><td align="right">';
|
print '</td><td align="right">';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/exports/export.php?step=2&datatoexport='.$objexport->array_export_code[$key].'">'.img_picto($langs->trans("NewExport"),'filenew').'</a>';
|
if ($objexport->array_export_perms[$key])
|
||||||
print '</td></tr>';
|
{
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/exports/export.php?step=2&datatoexport='.$objexport->array_export_code[$key].'">'.img_picto($langs->trans("NewExport"),'filenew').'</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $langs->trans("NotEnoughPermissions");
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user