';
// Picto and label of module
@@ -372,59 +378,62 @@ if ($result)
//print img_object('', $picto, 'class="pictoobjectwidth"').' '.$objMod->getName();
print '';
- // Permission and tick
- if (!empty($object->admin) && !empty($objMod->rights_admin_allowed)) // Permission granted because admin
- {
- if ($caneditperms)
- {
- print '| '.img_picto($langs->trans("Administrator"), 'star').' | ';
- }
- print '';
- print img_picto($langs->trans("Active"), 'tick');
- print ' | ';
- } elseif (in_array($obj->id, $permsuser)) // Permission granted by user
- {
- if ($caneditperms)
- {
- print 'id.'&action=delrights&entity='.$entity.'&rights='.$obj->id.'">'.img_edit_remove($langs->trans("Remove")).' | ';
- }
- print '';
- print img_picto($langs->trans("Active"), 'tick');
- print ' | ';
- } elseif (is_array($permsgroupbyentity[$entity]))
- {
- if (in_array($obj->id, $permsgroupbyentity[$entity])) // Permission granted by group
- {
- if ($caneditperms)
- {
- print '';
- print $form->textwithtooltip($langs->trans("Inherited"), $langs->trans("PermissionInheritedFromAGroup"));
- print ' | ';
- }
- print '';
- print img_picto($langs->trans("Active"), 'tick');
- print ' | ';
- } else {
- // Do not own permission
- if ($caneditperms)
- {
- print 'id.'&action=addrights&entity='.$entity.'&rights='.$obj->id.'">'.img_edit_add($langs->trans("Add")).' | ';
- }
- print '  | ';
- }
- } else {
- // Do not own permission
- if ($caneditperms)
- {
- print 'id.'&action=addrights&entity='.$entity.'&rights='.$obj->id.'">'.img_edit_add($langs->trans("Add")).' | ';
- }
- print '  | ';
- }
+ // Permission and tick
+ if (!empty($object->admin) && !empty($objMod->rights_admin_allowed)) // Permission granted because admin
+ {
+ if ($caneditperms)
+ {
+ print ''.img_picto($langs->trans("Administrator"), 'star').' | ';
+ }
+ print '';
+ print img_picto($langs->trans("Active"), 'tick');
+ print ' | ';
+ } elseif (in_array($obj->id, $permsuser)) // Permission granted by user
+ {
+ if ($caneditperms)
+ {
+ print 'id.'&action=delrights&entity='.$entity.'&rights='.$obj->id.'">'.img_edit_remove($langs->trans("Remove")).' | ';
+ }
+ print '';
+ print img_picto($langs->trans("Active"), 'tick');
+ print ' | ';
+ } elseif (is_array($permsgroupbyentity[$entity]))
+ {
+ if (in_array($obj->id, $permsgroupbyentity[$entity])) // Permission granted by group
+ {
+ if ($caneditperms)
+ {
+ print '';
+ print $form->textwithtooltip($langs->trans("Inherited"), $langs->trans("PermissionInheritedFromAGroup"));
+ print ' | ';
+ }
+ print '';
+ print img_picto($langs->trans("Active"), 'tick');
+ print ' | ';
+ } else {
+ // Do not own permission
+ if ($caneditperms)
+ {
+ print 'id.'&action=addrights&entity='.$entity.'&rights='.$obj->id.'">'.img_edit_add($langs->trans("Add")).' | ';
+ }
+ print '  | ';
+ }
+ } else {
+ // Do not own permission
+ if ($caneditperms)
+ {
+ print 'id.'&action=addrights&entity='.$entity.'&rights='.$obj->id.'">'.img_edit_add($langs->trans("Add")).' | ';
+ }
+ print '  | ';
+ }
- // Label
+ // Label
$permlabel = ($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id) != ("PermissionAdvanced".$obj->id)) ? $langs->trans("PermissionAdvanced".$obj->id) : (($langs->trans("Permission".$obj->id) != ("Permission".$obj->id)) ? $langs->trans("Permission".$obj->id) : $langs->trans($obj->label)));
print ''.$permlabel.' | ';
+ // Permission id
+ if ($user->admin) print ''.$obj->id.' | ';
+
print '
'."\n";
$i++;