Minor esthetical change and fix

This commit is contained in:
Laurent Destailleur 2009-05-04 17:52:15 +00:00
parent 871a987e7a
commit 4220aa58eb
3 changed files with 338 additions and 319 deletions

View File

@ -221,7 +221,7 @@ else
$title = $langs->trans("Group"); $title = $langs->trans("Group");
if (! $group->entity) $title = $langs->trans("GlobalGroup"); if (! $group->entity) $title = $langs->trans("GlobalGroup");
dol_fiche_head($head, 'group', $title.": ".$group->nom); dol_fiche_head($head, 'group', $title);
/* /*
@ -249,7 +249,7 @@ else
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
// Nom // Name
print '<tr><td width="25%" valign="top">'.$langs->trans("Name").'</td>'; print '<tr><td width="25%" valign="top">'.$langs->trans("Name").'</td>';
print '<td width="75%" class="valeur">'.$group->nom; print '<td width="75%" class="valeur">'.$group->nom;
if (!$group->entity) if (!$group->entity)

View File

@ -62,7 +62,7 @@ $fgroup->getrights();
*/ */
$head = group_prepare_head($fgroup); $head = group_prepare_head($fgroup);
dol_fiche_head($head, 'ldap', $langs->trans("Group").": ".$fgroup->nom); dol_fiche_head($head, 'ldap', $langs->trans("Group"));
@ -71,10 +71,21 @@ dol_fiche_head($head, 'ldap', $langs->trans("Group").": ".$fgroup->nom);
*/ */
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Nom // Ref
print '<tr><td width="25%" valign="top">'.$langs->trans("Ref").'</td>';
print '<td colspan="2">';
print $form->showrefnav($fgroup,'id','',$user->rights->user->group->lire || $user->admin);
print '</td>';
print '</tr>';
// Name
print '<tr><td width="25%" valign="top">'.$langs->trans("Name").'</td>'; print '<tr><td width="25%" valign="top">'.$langs->trans("Name").'</td>';
print '<td width="75%" class="valeur">'.$fgroup->nom.'</td>'; print '<td width="75%" class="valeur">'.$fgroup->nom;
print "</tr>\n"; if (!$fgroup->entity)
{
print img_redstar($langs->trans("GlobalGroup"));
}
print "</td></tr>\n";
// Note // Note
print '<tr><td width="25%" valign="top">'.$langs->trans("Note").'</td>'; print '<tr><td width="25%" valign="top">'.$langs->trans("Note").'</td>';

View File

@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org> * Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* *
@ -21,9 +21,9 @@
*/ */
/** /**
\file htdocs/user/group/perms.php * \file htdocs/user/group/perms.php
\brief Onglet user et permissions de la fiche utilisateur * \brief Onglet user et permissions de la fiche utilisateur
\version $Id$ * \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
@ -31,9 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/usergroups.lib.php");
$langs->load("users"); $langs->load("users");
$form = new Form($db);
$module=isset($_GET["module"])?$_GET["module"]:$_POST["module"]; $module=isset($_GET["module"])?$_GET["module"]:$_POST["module"];
// Defini si peux modifier utilisateurs et permisssions // Defini si peux modifier utilisateurs et permisssions
@ -62,6 +59,8 @@ if ($_GET["action"] == 'delrights' && $caneditperms)
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
$form = new Form($db);
llxHeader('',$langs->trans("Permissions")); llxHeader('',$langs->trans("Permissions"));
if ($_GET["id"]) if ($_GET["id"])
@ -77,15 +76,22 @@ if ($_GET["id"])
$title = $langs->trans("Group"); $title = $langs->trans("Group");
if (!$fgroup->entity) $title = $langs->trans("GlobalGroup"); if (!$fgroup->entity) $title = $langs->trans("GlobalGroup");
dol_fiche_head($head, 'rights', $title.": ".$fgroup->nom); dol_fiche_head($head, 'rights', $title);
$db->begin(); $db->begin();
// Charge les modules soumis a permissions // Charge les modules soumis a permissions
$dir = DOL_DOCUMENT_ROOT . "/includes/modules/";
$handle=opendir($dir);
$modules = array(); $modules = array();
foreach ($conf->dol_document_root as $dirroot)
{
$dir = $dirroot . "/includes/modules/";
// Load modules attributes in arrays (name, numero, orders) from dir directory
//print $dir."\n<br>";
$handle=@opendir($dir);
if ($handle)
{
while (($file = readdir($handle))!==false) while (($file = readdir($handle))!==false)
{ {
if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, strlen($file) - 10) == '.class.php') if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, strlen($file) - 10) == '.class.php')
@ -94,7 +100,7 @@ if ($_GET["id"])
if ($modName) if ($modName)
{ {
include_once("../../includes/modules/$file"); include_once($dir."/".$file);
$objMod = new $modName($db); $objMod = new $modName($db);
if ($objMod->rights_class) { if ($objMod->rights_class) {
@ -106,6 +112,8 @@ if ($_GET["id"])
} }
} }
} }
}
}
$db->commit(); $db->commit();
@ -155,7 +163,7 @@ if ($_GET["id"])
// Nom // Nom
print '<tr><td width="25%" valign="top">'.$langs->trans("Name").'</td>'; print '<tr><td width="25%" valign="top">'.$langs->trans("Name").'</td>';
print '<td colspan="2">'.$fgroup->nom.''; print '<td colspan="2">'.$fgroup->nom.'';
if (!$obj->entity) if (! $fgroup->entity)
{ {
print img_redstar($langs->trans("GlobalGroup")); print img_redstar($langs->trans("GlobalGroup"));
} }
@ -163,7 +171,7 @@ if ($_GET["id"])
// Note // Note
print '<tr><td width="25%" valign="top">'.$langs->trans("Note").'</td>'; print '<tr><td width="25%" valign="top">'.$langs->trans("Note").'</td>';
print '<td class="valeur">'.nl2br($fgroup->note).'&nbsp;</td>'; print '<td class="valeur">'.nl2br($fgroup->note).'</td>';
print "</tr>\n"; print "</tr>\n";
print '</table><br>'; print '</table><br>';