NEW Filter "active" by default on user list.
Fix label of permission of project module
This commit is contained in:
parent
40d17add22
commit
2c5ef858d0
@ -832,7 +832,7 @@ if ($id)
|
|||||||
$fieldlist=explode(',',$tabfield[$id]);
|
$fieldlist=explode(',',$tabfield[$id]);
|
||||||
|
|
||||||
// Line for title
|
// Line for title
|
||||||
print '<tr class="liste_titre nohover">';
|
print '<tr class="liste_titre">';
|
||||||
foreach ($fieldlist as $field => $value)
|
foreach ($fieldlist as $field => $value)
|
||||||
{
|
{
|
||||||
// Determine le nom du champ par rapport aux noms possibles
|
// Determine le nom du champ par rapport aux noms possibles
|
||||||
@ -906,7 +906,7 @@ if ($id)
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Line to enter new values
|
// Line to enter new values
|
||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bcnd[$var].">";
|
||||||
|
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
// If data was already input, we define them in obj to populate input fields.
|
// If data was already input, we define them in obj to populate input fields.
|
||||||
|
|||||||
@ -3218,7 +3218,8 @@ class Form
|
|||||||
$formconfirm.= '<script type="text/javascript">'."\n";
|
$formconfirm.= '<script type="text/javascript">'."\n";
|
||||||
$formconfirm.= 'jQuery(document).ready(function() {
|
$formconfirm.= 'jQuery(document).ready(function() {
|
||||||
$(function() {
|
$(function() {
|
||||||
$( "#'.$dialogconfirm.'" ).dialog({
|
$( "#'.$dialogconfirm.'" ).dialog(
|
||||||
|
{
|
||||||
autoOpen: '.($autoOpen ? "true" : "false").',';
|
autoOpen: '.($autoOpen ? "true" : "false").',';
|
||||||
if ($newselectedchoice == 'no')
|
if ($newselectedchoice == 'no')
|
||||||
{
|
{
|
||||||
@ -3272,7 +3273,8 @@ class Form
|
|||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
var button = "'.$button.'";
|
var button = "'.$button.'";
|
||||||
if (button.length > 0) {
|
if (button.length > 0) {
|
||||||
|
|||||||
@ -130,35 +130,35 @@ class modProjet extends DolibarrModules
|
|||||||
|
|
||||||
$r++;
|
$r++;
|
||||||
$this->rights[$r][0] = 41; // id de la permission
|
$this->rights[$r][0] = 41; // id de la permission
|
||||||
$this->rights[$r][1] = "Lire les projets et tâches (partagés ou dont je suis contact)"; // libelle de la permission
|
$this->rights[$r][1] = "Read projects and tasks (shared projects or projects I am contact for). Can also enter time consumed on assigned tasks (timesheet)"; // libelle de la permission
|
||||||
$this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour)
|
$this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour)
|
||||||
$this->rights[$r][3] = 1; // La permission est-elle une permission par defaut
|
$this->rights[$r][3] = 1; // La permission est-elle une permission par defaut
|
||||||
$this->rights[$r][4] = 'lire';
|
$this->rights[$r][4] = 'lire';
|
||||||
|
|
||||||
$r++;
|
$r++;
|
||||||
$this->rights[$r][0] = 42; // id de la permission
|
$this->rights[$r][0] = 42; // id de la permission
|
||||||
$this->rights[$r][1] = "Creer/modifier les projets et tâches (partagés ou dont je suis contact)"; // libelle de la permission
|
$this->rights[$r][1] = "Create/modify projects and tasks (shared projects or projects I am contact for)"; // libelle de la permission
|
||||||
$this->rights[$r][2] = 'w'; // type de la permission (deprecie a ce jour)
|
$this->rights[$r][2] = 'w'; // type de la permission (deprecie a ce jour)
|
||||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
||||||
$this->rights[$r][4] = 'creer';
|
$this->rights[$r][4] = 'creer';
|
||||||
|
|
||||||
$r++;
|
$r++;
|
||||||
$this->rights[$r][0] = 44; // id de la permission
|
$this->rights[$r][0] = 44; // id de la permission
|
||||||
$this->rights[$r][1] = "Supprimer les projets et tâches (partagés ou dont je suis contact)"; // libelle de la permission
|
$this->rights[$r][1] = "Delete project and tasks (shared projects or projects I am contact for)"; // libelle de la permission
|
||||||
$this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour)
|
$this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour)
|
||||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
||||||
$this->rights[$r][4] = 'supprimer';
|
$this->rights[$r][4] = 'supprimer';
|
||||||
|
|
||||||
$r++;
|
$r++;
|
||||||
$this->rights[$r][0] = 45; // id de la permission
|
$this->rights[$r][0] = 45; // id de la permission
|
||||||
$this->rights[$r][1] = "Exporter les projets"; // libelle de la permission
|
$this->rights[$r][1] = "Export projects"; // libelle de la permission
|
||||||
$this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour)
|
$this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour)
|
||||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
||||||
$this->rights[$r][4] = 'export';
|
$this->rights[$r][4] = 'export';
|
||||||
|
|
||||||
$r++;
|
$r++;
|
||||||
$this->rights[$r][0] = 141; // id de la permission
|
$this->rights[$r][0] = 141; // id de la permission
|
||||||
$this->rights[$r][1] = "Lire tous les projets et tâches (y compris prives qui ne me sont pas affectes)"; // libelle de la permission
|
$this->rights[$r][1] = "Read all projects and tasks (also private projects I am not contact for)"; // libelle de la permission
|
||||||
$this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour)
|
$this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour)
|
||||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
||||||
$this->rights[$r][4] = 'all';
|
$this->rights[$r][4] = 'all';
|
||||||
@ -166,7 +166,7 @@ class modProjet extends DolibarrModules
|
|||||||
|
|
||||||
$r++;
|
$r++;
|
||||||
$this->rights[$r][0] = 142; // id de la permission
|
$this->rights[$r][0] = 142; // id de la permission
|
||||||
$this->rights[$r][1] = "Creer/modifier tous les projets et tâches (y compris prives qui ne me sont pas affectes)"; // libelle de la permission
|
$this->rights[$r][1] = "Create/modify all projects and tasks (also private projects I am not contact for)"; // libelle de la permission
|
||||||
$this->rights[$r][2] = 'w'; // type de la permission (deprecie a ce jour)
|
$this->rights[$r][2] = 'w'; // type de la permission (deprecie a ce jour)
|
||||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
||||||
$this->rights[$r][4] = 'all';
|
$this->rights[$r][4] = 'all';
|
||||||
@ -174,7 +174,7 @@ class modProjet extends DolibarrModules
|
|||||||
|
|
||||||
$r++;
|
$r++;
|
||||||
$this->rights[$r][0] = 144; // id de la permission
|
$this->rights[$r][0] = 144; // id de la permission
|
||||||
$this->rights[$r][1] = "Supprimer tous les projets et tâches (y compris prives qui ne me sont pas affectes)"; // libelle de la permission
|
$this->rights[$r][1] = "Delete all projects and tasks (also private projects I am not contact for)"; // libelle de la permission
|
||||||
$this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour)
|
$this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour)
|
||||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
||||||
$this->rights[$r][4] = 'all';
|
$this->rights[$r][4] = 'all';
|
||||||
|
|||||||
@ -579,7 +579,7 @@ Permission32=Create/modify products
|
|||||||
Permission34=Delete products
|
Permission34=Delete products
|
||||||
Permission36=See/manage hidden products
|
Permission36=See/manage hidden products
|
||||||
Permission38=Export products
|
Permission38=Export products
|
||||||
Permission41=Read projects (shared project and projects i'm contact for)
|
Permission41=Read projects and tasks (shared project and projects i'm contact for). Can also enter time consumed on assigned tasks (timesheet)
|
||||||
Permission42=Create/modify projects (shared project and projects i'm contact for)
|
Permission42=Create/modify projects (shared project and projects i'm contact for)
|
||||||
Permission44=Delete projects (shared project and projects i'm contact for)
|
Permission44=Delete projects (shared project and projects i'm contact for)
|
||||||
Permission61=Read interventions
|
Permission61=Read interventions
|
||||||
@ -621,9 +621,9 @@ Permission121=Read third parties linked to user
|
|||||||
Permission122=Create/modify third parties linked to user
|
Permission122=Create/modify third parties linked to user
|
||||||
Permission125=Delete third parties linked to user
|
Permission125=Delete third parties linked to user
|
||||||
Permission126=Export third parties
|
Permission126=Export third parties
|
||||||
Permission141=Read projects (also private i am not contact for)
|
Permission141=Read all projects and tasks (also private projects i am not contact for)
|
||||||
Permission142=Create/modify projects (also private i am not contact for)
|
Permission142=Create/modify all projects and tasks (also private projects i am not contact for)
|
||||||
Permission144=Delete projects (also private i am not contact for)
|
Permission144=Delete all projects and tasks (also private projects i am not contact for)
|
||||||
Permission146=Read providers
|
Permission146=Read providers
|
||||||
Permission147=Read stats
|
Permission147=Read stats
|
||||||
Permission151=Read standing orders
|
Permission151=Read standing orders
|
||||||
|
|||||||
@ -2329,9 +2329,10 @@ class User extends CommonObject
|
|||||||
* fullpath = chemin complet compose des id: "_grandparentid_parentid_id"
|
* fullpath = chemin complet compose des id: "_grandparentid_parentid_id"
|
||||||
*
|
*
|
||||||
* @param int $deleteafterid Removed all users including the leaf $deleteafterid (and all its child) in user tree.
|
* @param int $deleteafterid Removed all users including the leaf $deleteafterid (and all its child) in user tree.
|
||||||
|
* @param string $filter SQL filter on users
|
||||||
* @return array Array of users $this->users. Note: $this->parentof is also set.
|
* @return array Array of users $this->users. Note: $this->parentof is also set.
|
||||||
*/
|
*/
|
||||||
function get_full_tree($deleteafterid=0)
|
function get_full_tree($deleteafterid=0, $filter='')
|
||||||
{
|
{
|
||||||
global $conf,$user;
|
global $conf,$user;
|
||||||
|
|
||||||
@ -2351,6 +2352,8 @@ class User extends CommonObject
|
|||||||
{
|
{
|
||||||
$sql.= " WHERE u.entity IN (".getEntity('user',1).")";
|
$sql.= " WHERE u.entity IN (".getEntity('user',1).")";
|
||||||
}
|
}
|
||||||
|
if ($filter) $sql.=" AND ".$filter;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::get_full_tree get user list", LOG_DEBUG);
|
dol_syslog(get_class($this)."::get_full_tree get user list", LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
@ -44,6 +44,7 @@ $search_user=GETPOST('search_user','alpha');
|
|||||||
|
|
||||||
$userstatic=new User($db);
|
$userstatic=new User($db);
|
||||||
$companystatic = new Societe($db);
|
$companystatic = new Societe($db);
|
||||||
|
$search_statut=GETPOST('search_statut','int');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -58,12 +59,12 @@ $arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css')
|
|||||||
|
|
||||||
llxHeader('',$langs->trans("ListOfUsers"). ' ('.$langs->trans("HierarchicView").')','','',0,0,$arrayofjs,$arrayofcss);
|
llxHeader('',$langs->trans("ListOfUsers"). ' ('.$langs->trans("HierarchicView").')','','',0,0,$arrayofjs,$arrayofcss);
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("ListOfUsers"). ' ('.$langs->trans("HierarchicView").')', '<form action="'.DOL_URL_ROOT.'/user/index.php" method="POST"><input type="submit" class="button" style="width:120px" name="viewcal" value="'.dol_escape_htmltag($langs->trans("ViewList")).'"></form>');
|
print_fiche_titre($langs->trans("ListOfUsers"). ' ('.$langs->trans("HierarchicView").')', '<form action="'.DOL_URL_ROOT.'/user/index.php'.(($search_statut != '' && $search_statut >= 0) ?'?search_statut='.$search_statut:'').'" method="POST"><input type="submit" class="button" style="width:120px" name="viewcal" value="'.dol_escape_htmltag($langs->trans("ViewList")).'"></form>');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Load hierarchy of users
|
// Load hierarchy of users
|
||||||
$user_arbo = $userstatic->get_full_tree();
|
$user_arbo = $userstatic->get_full_tree(0, ($search_statut != '' && $search_statut >= 0) ? "statut = ".$search_statut : '');
|
||||||
|
|
||||||
// Define fulltree array
|
// Define fulltree array
|
||||||
$fulltree=$user_arbo;
|
$fulltree=$user_arbo;
|
||||||
@ -111,6 +112,10 @@ foreach($fulltree as $key => $val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*print $langs->trans("Status").': ';
|
||||||
|
print $form->selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut);
|
||||||
|
*/
|
||||||
|
|
||||||
print '<table class="liste nohover" width="100%">';
|
print '<table class="liste nohover" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("HierarchicView").'</td><td></td><td align="right"><div id="iddivjstreecontrol"><a href="#">'.img_picto('','object_category').' '.$langs->trans("UndoExpandAll").'</a>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("HierarchicView").'</td><td></td><td align="right"><div id="iddivjstreecontrol"><a href="#">'.img_picto('','object_category').' '.$langs->trans("UndoExpandAll").'</a>';
|
||||||
print ' | <a href="#">'.img_picto('','object_category-expanded').' '.$langs->trans("ExpandAll").'</a></div></td></tr>';
|
print ' | <a href="#">'.img_picto('','object_category-expanded').' '.$langs->trans("ExpandAll").'</a></div></td></tr>';
|
||||||
|
|||||||
@ -48,6 +48,8 @@ $search_firstname=GETPOST('search_firstname','alpha');
|
|||||||
$search_statut=GETPOST('search_statut','alpha');
|
$search_statut=GETPOST('search_statut','alpha');
|
||||||
$search_thirdparty=GETPOST('search_thirdparty','alpha');
|
$search_thirdparty=GETPOST('search_thirdparty','alpha');
|
||||||
|
|
||||||
|
if ($search_statut == '') $search_statut='1';
|
||||||
|
|
||||||
$sortfield = GETPOST('sortfield','alpha');
|
$sortfield = GETPOST('sortfield','alpha');
|
||||||
$sortorder = GETPOST('sortorder','alpha');
|
$sortorder = GETPOST('sortorder','alpha');
|
||||||
$page = GETPOST('page','int');
|
$page = GETPOST('page','int');
|
||||||
@ -73,13 +75,14 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
|
|||||||
$search_thirdparty="";
|
$search_thirdparty="";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader('',$langs->trans("ListOfUsers"));
|
llxHeader('',$langs->trans("ListOfUsers"));
|
||||||
|
|
||||||
$buttonviewhierarchy='<form action="'.DOL_URL_ROOT.'/user/hierarchy.php" method="POST"><input type="submit" class="button" style="width:120px" name="viewcal" value="'.dol_escape_htmltag($langs->trans("HierarchicView")).'"></form>';
|
$buttonviewhierarchy='<form action="'.DOL_URL_ROOT.'/user/hierarchy.php'.(($search_statut != '' && $search_statut >= 0) ? '?search_statut='.$search_statut : '').'" method="POST"><input type="submit" class="button" style="width:120px" name="viewcal" value="'.dol_escape_htmltag($langs->trans("HierarchicView")).'"></form>';
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("ListOfUsers"), $buttonviewhierarchy);
|
print_fiche_titre($langs->trans("ListOfUsers"), $buttonviewhierarchy);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user