Trad: Traduction des libellés des permissions

This commit is contained in:
Laurent Destailleur 2005-03-31 22:47:18 +00:00
parent 6d368af834
commit f57bad4aca
3 changed files with 14 additions and 20 deletions

View File

@ -110,7 +110,8 @@ if ($result)
} }
print '<tr '. $bc[$var].'>'; print '<tr '. $bc[$var].'>';
print '<td>'.(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$obj->libelle) . '</td>'; $perm_libelle=(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$obj->libelle);
print '<td>'.$perm_libelle. '</td>';
print '<td>'.$modules[$obj->module]->getName(). '</td><td align="center">'; print '<td>'.$modules[$obj->module]->getName(). '</td><td align="center">';
if ($obj->bydefault == 1) if ($obj->bydefault == 1)
{ {

View File

@ -135,8 +135,8 @@ if ($_GET["id"])
include_once("../../includes/modules/$file"); include_once("../../includes/modules/$file");
$objMod = new $modName($db); $objMod = new $modName($db);
if ($objMod->rights_class) { if ($objMod->rights_class) {
$modules[$objMod->rights_class]=$modName; $modules[$objMod->rights_class]=$objMod;
//print "modules[".$objMod->rights_class."]=$modName;"; //print "modules[".$objMod->rights_class."]=$objMod;";
} }
} }
} }
@ -146,7 +146,6 @@ if ($_GET["id"])
* Ecran ajout/suppression permission * Ecran ajout/suppression permission
*/ */
print '<table width="100%" class="noborder">'; print '<table width="100%" class="noborder">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
if ($user->admin) print '<td width="24">&nbsp</td>'; if ($user->admin) print '<td width="24">&nbsp</td>';
@ -172,12 +171,8 @@ if ($_GET["id"])
$var = !$var; $var = !$var;
print '<tr '. $bc[$var].'>'; print '<tr '. $bc[$var].'>';
// Recupère objet module // Recupère objMod
$modName=$modules[$obj->module]; $objMod = $modules[$obj->module];
$file = $modName.".class.php";
include_once("../../includes/modules/$file");
$objMod = new $modName($db);
$picto=($objMod->picto?$objMod->picto:'generic'); $picto=($objMod->picto?$objMod->picto:'generic');
} }
else else
@ -206,7 +201,8 @@ if ($_GET["id"])
print '<td>&nbsp</td>'; print '<td>&nbsp</td>';
} }
print '<td>'.$obj->libelle . '</td>'; $perm_libelle=(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$obj->libelle);
print '<td>'.$perm_libelle. '</td>';
print '<td>'.img_object('',$picto).' '.$objMod->getName(); print '<td>'.img_object('',$picto).' '.$objMod->getName();
print '</td>'; print '</td>';

View File

@ -171,8 +171,8 @@ if ($_GET["id"])
include_once("../includes/modules/$file"); include_once("../includes/modules/$file");
$objMod = new $modName($db); $objMod = new $modName($db);
if ($objMod->rights_class) { if ($objMod->rights_class) {
$modules[$objMod->rights_class]=$modName; $modules[$objMod->rights_class]=$objMod;
//print "modules[".$objMod->rights_class."]=$modName;"; //print "modules[".$objMod->rights_class."]=$objMod;";
} }
} }
} }
@ -207,12 +207,8 @@ if ($_GET["id"])
$var = !$var; $var = !$var;
print '<tr '. $bc[$var].'>'; print '<tr '. $bc[$var].'>';
// Recupère objet module // Récupère objMod
$modName=$modules[$obj->module]; $objMod=$modules[$obj->module];
$file = $modName.".class.php";
include_once("../includes/modules/$file");
$objMod = new $modName($db);
$picto=($objMod->picto?$objMod->picto:'generic'); $picto=($objMod->picto?$objMod->picto:'generic');
} }
else else
@ -251,7 +247,8 @@ if ($_GET["id"])
print '<td>&nbsp</td>'; print '<td>&nbsp</td>';
} }
print '<td>'.$obj->libelle . '</td>'; $perm_libelle=(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$obj->libelle);
print '<td>'.$perm_libelle. '</td>';
print '<td>'.img_object('',$picto).' '.$objMod->getName(); print '<td>'.img_object('',$picto).' '.$objMod->getName();
print '</td>'; print '</td>';