Fix list of project must be restricted on opened status
This commit is contained in:
parent
b04682db4c
commit
25bb6a588f
@ -8,8 +8,10 @@ SharedProject=Everybody
|
||||
PrivateProject=Contacts of project
|
||||
MyProjectsDesc=This view is limited to projects you are a contact for (whatever is the type).
|
||||
ProjectsPublicDesc=This view presents all projects you are allowed to read.
|
||||
ProjectsPublicTaskDesc=This view presents all projects and tasks you are allowed to read.
|
||||
ProjectsDesc=This view presents all projects (your user permissions grant you permission to view everything).
|
||||
MyTasksDesc=This view is limited to projects or tasks you are a contact for (whatever is the type).
|
||||
OnlyOpenedProject=Only opened projects are visible (projects with draft or closed status are not visible).
|
||||
TasksPublicDesc=This view presents all projects and tasks you are allowed to read.
|
||||
TasksDesc=This view presents all projects and tasks (your user permissions grant you permission to view everything).
|
||||
ProjectsArea=Projects area
|
||||
|
||||
@ -125,7 +125,8 @@ if ($id)
|
||||
$project->fetch_thirdparty();
|
||||
}
|
||||
|
||||
$tasksarray=$taskstatic->getTasksArray(0,0,($project->id?$project->id:$projectsListId),$socid,0); // We want to see all task of project i am allowed to see, not only mine. Later only mine will be editable later.
|
||||
$onlyopened=1; // or -1
|
||||
$tasksarray=$taskstatic->getTasksArray(0,0,($project->id?$project->id:$projectsListId),$socid,0,'',$onlyopened); // We want to see all task of opened project i am allowed to see, not only mine. Later only mine will be editable later.
|
||||
$projectsrole=$taskstatic->getUserRolesForProjectsOrTasks($user,0,($project->id?$project->id:$projectsListId),0);
|
||||
$tasksrole=$taskstatic->getUserRolesForProjectsOrTasks(0,$user,($project->id?$project->id:$projectsListId),0);
|
||||
//var_dump($tasksarray);
|
||||
@ -138,11 +139,11 @@ llxHeader("",$title,"");
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num);
|
||||
|
||||
// Show description of content
|
||||
if ($mine) print $langs->trans("MyTasksDesc").'<br><br>';
|
||||
if ($mine) print $langs->trans("MyTasksDesc").($onlyopened?' '.$langs->trans("OnlyOpenedProject"):'').'<br><br>';
|
||||
else
|
||||
{
|
||||
if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("ProjectsDesc").'<br><br>';
|
||||
else print $langs->trans("ProjectsPublicTakDesc").'<br><br>';
|
||||
if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("ProjectsDesc").($onlyopened?' '.$langs->trans("OnlyOpenedProject"):'').'<br><br>';
|
||||
else print $langs->trans("ProjectsPublicTaskDesc").($onlyopened?' '.$langs->trans("AlsoOnlyOpenedProject"):'').'<br><br>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ class Project extends CommonObject
|
||||
var $note_private;
|
||||
var $note_public;
|
||||
var $statuts_short;
|
||||
var $statuts;
|
||||
var $statuts; // 0=draft, 1=opened, 2=closed
|
||||
var $oldcopy;
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user