Debug of project module
This commit is contained in:
parent
c961d89934
commit
54449e3465
@ -20,7 +20,7 @@
|
||||
\file htdocs/includes/menus/barre_left/eldy_backoffice.php
|
||||
\brief Gestionnaire du menu du gauche Eldy
|
||||
\version $Id$
|
||||
|
||||
|
||||
\remarks La construction d'un gestionnaire pour le menu de gauche est simple:
|
||||
\remarks A l'aide d'un objet $newmenu=new Menu() et des méthode add et add_submenu,
|
||||
\remarks définir la liste des entrées menu à faire apparaitre.
|
||||
@ -95,14 +95,14 @@ class MenuLeft {
|
||||
}
|
||||
|
||||
$newmenu = new Menu();
|
||||
|
||||
|
||||
// Show logo company
|
||||
if (! empty($conf->global->MAIN_SHOW_LOGO))
|
||||
{
|
||||
$mysoc->logo_small=$conf->global->MAIN_INFO_SOCIETE_LOGO_SMALL;
|
||||
if (! empty($mysoc->logo_small) && is_readable($conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_small))
|
||||
$mysoc->logo_small=$conf->global->MAIN_INFO_SOCIETE_LOGO_SMALL;
|
||||
if (! empty($mysoc->logo_small) && is_readable($conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_small))
|
||||
{
|
||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_small);
|
||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_small);
|
||||
print '<img title="'.$title.'" src="'.$urllogo.'">';
|
||||
}
|
||||
}
|
||||
@ -120,7 +120,7 @@ class MenuLeft {
|
||||
if ($mainmenu == 'home')
|
||||
{
|
||||
$langs->load("users");
|
||||
|
||||
|
||||
if ($user->admin)
|
||||
{
|
||||
$langs->load("admin");
|
||||
@ -179,13 +179,13 @@ class MenuLeft {
|
||||
{
|
||||
$langs->load("companies");
|
||||
$newmenu->add(DOL_URL_ROOT."/societe.php", $langs->trans("ThirdParty"), 0, $user->rights->societe->lire);
|
||||
|
||||
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/soc.php?action=create", $langs->trans("MenuNewThirdParty"));
|
||||
if (! $conf->use_javascript_ajax) $newmenu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&private=1",$langs->trans("MenuNewPrivateIndividual"));
|
||||
}
|
||||
|
||||
|
||||
if(is_dir("societe/groupe"))
|
||||
{
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/societe/groupe/index.php", $langs->trans("MenuSocGroup"));
|
||||
@ -218,7 +218,7 @@ class MenuLeft {
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 2, $user->rights->societe->creer);
|
||||
//$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=customers&type=p", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire);
|
||||
}
|
||||
|
||||
|
||||
// Clients
|
||||
if ($conf->societe->enabled)
|
||||
{
|
||||
@ -299,7 +299,7 @@ class MenuLeft {
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->rights->societe->contact->lire);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->rights->societe->contact->lire);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=o", $langs->trans("Others"), 2, $user->rights->societe->contact->lire);
|
||||
|
||||
|
||||
// Propal
|
||||
if ($conf->propal->enabled)
|
||||
{
|
||||
@ -366,7 +366,7 @@ class MenuLeft {
|
||||
if ($leftmenu=="ficheinter") $newmenu->add_submenu(DOL_URL_ROOT."/fichinter/fiche.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->rights->ficheinter->creer);
|
||||
if ($leftmenu=="ficheinter") $newmenu->add_submenu(DOL_URL_ROOT."/fichinter/index.php?leftmenu=ficheinter", $langs->trans("List"), 1 ,$user->rights->ficheinter->lire);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -445,7 +445,7 @@ class MenuLeft {
|
||||
|
||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/stats/index.php?leftmenu=customers_bills", $langs->trans("Statistics"),2,$user->rights->facture->lire);
|
||||
}
|
||||
|
||||
|
||||
// Proposals
|
||||
if ($conf->propal->enabled)
|
||||
{
|
||||
@ -479,7 +479,7 @@ class MenuLeft {
|
||||
if ($leftmenu=="tripsandexpenses") $newmenu->add(DOL_URL_ROOT."/compta/deplacement/fiche.php?action=create&leftmenu=tripsandexpenses&mainmenu=accountancy", $langs->trans("New"), 1, $user->rights->deplacement->creer);
|
||||
if ($leftmenu=="tripsandexpenses") $newmenu->add(DOL_URL_ROOT."/compta/deplacement/index.php?leftmenu=tripsandexpenses&mainmenu=accountancy", $langs->trans("List"), 1, $user->rights->deplacement->lire);
|
||||
}
|
||||
|
||||
|
||||
// Taxes and social contributions
|
||||
if ($conf->tax->enabled)
|
||||
{
|
||||
@ -603,7 +603,7 @@ class MenuLeft {
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/product/fiche.php?leftmenu=product&action=create&type=0&canvas=livre", $langs->trans("NewBook"), 1, $user->rights->produit->creer);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/product/liste.php?leftmenu=product&type=0&canvas=livre", $langs->trans("BookList"), 1, $user->rights->produit->creer);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($conf->stock->enabled)
|
||||
{
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/product/reassort.php?type=0", $langs->trans("Stocks"), 1, $user->rights->stock->lire);
|
||||
@ -652,7 +652,7 @@ class MenuLeft {
|
||||
}
|
||||
|
||||
// Expeditions
|
||||
if ($conf->expedition->enabled)
|
||||
if ($conf->expedition->enabled)
|
||||
{
|
||||
$langs->load("sendings");
|
||||
$newmenu->add(DOL_URL_ROOT."/expedition/index.php?leftmenu=sendings", $langs->trans("Sendings"), 0, $user->rights->expedition->lire);
|
||||
@ -717,7 +717,7 @@ class MenuLeft {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Menu AGENDA
|
||||
*/
|
||||
@ -727,7 +727,7 @@ class MenuLeft {
|
||||
if ($conf->agenda->enabled)
|
||||
{
|
||||
$langs->load("agenda");
|
||||
|
||||
|
||||
// Actions
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||
@ -752,8 +752,8 @@ class MenuLeft {
|
||||
// Reports
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Menu PROJETS
|
||||
*/
|
||||
@ -768,8 +768,8 @@ class MenuLeft {
|
||||
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/tasks/index.php", $langs->trans("Tasks"), 0, $user->rights->projet->lire);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/projet/tasks/fiche.php?action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/projet/tasks/index.php?mode=mine", $langs->trans("Mytasks"), 1, $user->rights->projet->lire);
|
||||
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/projet/tasks/index.php?mode=mine", $langs->trans("MyTasks"), 1, $user->rights->projet->lire);
|
||||
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/activity/index.php", $langs->trans("TimeSpent"), 0, $user->rights->projet->lire);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/projet/activity/list.php", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/projet/activity/index.php?mode=mine", $langs->trans("MyTimeSpent"), 1, $user->rights->projet->lire);
|
||||
@ -855,13 +855,13 @@ class MenuLeft {
|
||||
if (eregi("members_checks",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/fiche.php?leftmenu=members_checks&action=new",$langs->trans("NewChequeDeposit"),1,$user->rights->adherent->cotisation->creer);
|
||||
if (eregi("members_checks",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/liste.php?leftmenu=members_checks",$langs->trans("MenuChequesReceipts"),1,$user->rights->adherent->cotisation->lire);
|
||||
}
|
||||
|
||||
|
||||
if ($conf->banque->enabled)
|
||||
{
|
||||
$langs->load("banks");
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/compta/bank/index.php?leftmenu=members",$langs->trans("Banks"),0,$user->rights->adherent->lire);
|
||||
}
|
||||
|
||||
|
||||
$newmenu->add(DOL_URL_ROOT."/adherents/index.php?leftmenu=export&mainmenu=members",$langs->trans("Exports"),0,$user->rights->adherent->export);
|
||||
if ($conf->export->enabled && $leftmenu=="export") $newmenu->add_submenu(DOL_URL_ROOT."/exports/index.php?leftmenu=export",$langs->trans("Datas"),1,$user->rights->adherent->export);
|
||||
if ($leftmenu=="export") $newmenu->add_submenu(DOL_URL_ROOT."/adherents/htpasswd.php?leftmenu=export",$langs->trans("Filehtpasswd"),1,$user->rights->adherent->export);
|
||||
@ -876,17 +876,17 @@ class MenuLeft {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Affichage des menus personnalises
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/menubase.class.php");
|
||||
|
||||
|
||||
$menuArbo = new Menubase($this->db,'eldy','left');
|
||||
$this->overwritemenufor = $menuArbo->listeMainmenu();
|
||||
// Add other mainmenu to the list of menu to overwrite pre.inc.php
|
||||
$overwritemenumore=array('home','companies','members','products','suppliers','commercial','accountancy','agenda','project','tools','ecm');
|
||||
$this->overwritemenufor=array_merge($overwritemenumore, $this->overwritemenufor);
|
||||
$newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,0,'eldy');
|
||||
|
||||
|
||||
/*
|
||||
* Menu AUTRES (Pour les menus du haut qui ne serait pas gérés)
|
||||
*/
|
||||
@ -938,7 +938,7 @@ class MenuLeft {
|
||||
$tabstring.=' ';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Menu niveau 0
|
||||
if ($this->menu_array[$i]['level'] == 0)
|
||||
{
|
||||
@ -981,7 +981,7 @@ class MenuLeft {
|
||||
}
|
||||
}
|
||||
if ($contenu == 1) print '<div class="menu_fin"></div>'."\n";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
\file htdocs/includes/menus/barre_left/eldy_frontoffice.php
|
||||
\brief Gestionnaire du menu du gauche Eldy
|
||||
\version $Id$
|
||||
|
||||
|
||||
\remarks La construction d'un gestionnaire pour le menu de gauche est simple:
|
||||
\remarks A l'aide d'un objet $newmenu=new Menu() et des méthode add et add_submenu,
|
||||
\remarks définir la liste des entrées menu à faire apparaitre.
|
||||
@ -94,14 +94,14 @@ class MenuLeft {
|
||||
|
||||
|
||||
$newmenu = new Menu();
|
||||
|
||||
|
||||
// Show logo company
|
||||
if (! empty($conf->global->MAIN_SHOW_LOGO))
|
||||
{
|
||||
$mysoc->logo_small=$conf->global->MAIN_INFO_SOCIETE_LOGO_SMALL;
|
||||
if (! empty($mysoc->logo_small) && is_readable($conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_small))
|
||||
$mysoc->logo_small=$conf->global->MAIN_INFO_SOCIETE_LOGO_SMALL;
|
||||
if (! empty($mysoc->logo_small) && is_readable($conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_small))
|
||||
{
|
||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_small);
|
||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_small);
|
||||
print '<img title="'.$title.'" src="'.$urllogo.'">';
|
||||
}
|
||||
}
|
||||
@ -119,7 +119,7 @@ class MenuLeft {
|
||||
if ($mainmenu == 'home')
|
||||
{
|
||||
$langs->load("users");
|
||||
|
||||
|
||||
// My Informations
|
||||
$newmenu->add(DOL_URL_ROOT.'/user/fiche.php?id='.$user->id.'&leftmenu=home', $langs->trans("MyInformations"));
|
||||
|
||||
@ -183,12 +183,12 @@ class MenuLeft {
|
||||
{
|
||||
$langs->load("companies");
|
||||
$newmenu->add(DOL_URL_ROOT."/societe.php", $langs->trans("ThirdParty"), 0, $user->rights->societe->lire);
|
||||
|
||||
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/soc.php?action=create", $langs->trans("MenuNewThirdParty"));
|
||||
}
|
||||
|
||||
|
||||
if(is_dir("societe/groupe"))
|
||||
{
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/societe/groupe/index.php", $langs->trans("MenuSocGroup"));
|
||||
@ -221,7 +221,7 @@ class MenuLeft {
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 2, $user->rights->societe->creer);
|
||||
//$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=customers&type=p", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire);
|
||||
}
|
||||
|
||||
|
||||
// Clients
|
||||
if ($conf->societe->enabled)
|
||||
{
|
||||
@ -283,7 +283,7 @@ class MenuLeft {
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->rights->societe->contact->lire);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=o", $langs->trans("Others"), 2, $user->rights->societe->contact->lire);
|
||||
*/
|
||||
|
||||
|
||||
// Propal
|
||||
if ($conf->propal->enabled)
|
||||
{
|
||||
@ -427,7 +427,7 @@ class MenuLeft {
|
||||
|
||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/stats/index.php?leftmenu=customers_bills", $langs->trans("Statistics"),2,$user->rights->facture->lire);
|
||||
}
|
||||
|
||||
|
||||
// Proposals
|
||||
if ($conf->propal->enabled)
|
||||
{
|
||||
@ -553,7 +553,7 @@ class MenuLeft {
|
||||
if ($leftmenu=="ca") $newmenu->add(DOL_URL_ROOT."/compta/resultat/index.php?leftmenu=ca",$langs->trans("ReportInOut"),1,$user->rights->compta->resultat->lire||$user->rights->comptaexpert->comptarapport->lire);
|
||||
if ($leftmenu=="ca") $newmenu->add_submenu(DOL_URL_ROOT."/compta/resultat/clientfourn.php?leftmenu=ca",$langs->trans("ByCompanies"),2,$user->rights->compta->resultat->lire||$user->rights->comptaexpert->comptarapport->lire);
|
||||
|
||||
|
||||
|
||||
if ($leftmenu=="ca") $newmenu->add(DOL_URL_ROOT."/compta/stats/index.php?leftmenu=ca","Chiffre d'affaire",1,$user->rights->compta->resultat->lire||$user->rights->comptaexpert->comptarapport->lire);
|
||||
|
||||
|
||||
@ -632,7 +632,7 @@ class MenuLeft {
|
||||
}
|
||||
|
||||
// Expeditions
|
||||
if ($conf->expedition->enabled)
|
||||
if ($conf->expedition->enabled)
|
||||
{
|
||||
$langs->load("sendings");
|
||||
$newmenu->add(DOL_URL_ROOT."/expedition/index.php?leftmenu=sendings", $langs->trans("Sendings"), 0, $user->rights->expedition->lire);
|
||||
@ -696,7 +696,7 @@ class MenuLeft {
|
||||
if ($conf->agenda->enabled)
|
||||
{
|
||||
$langs->load("agenda");
|
||||
|
||||
|
||||
// Actions
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||
@ -721,7 +721,7 @@ class MenuLeft {
|
||||
// Reports
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Menu PROJETS
|
||||
@ -737,8 +737,8 @@ class MenuLeft {
|
||||
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/tasks/index.php", $langs->trans("Tasks"), 0, $user->rights->projet->lire);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/projet/tasks/fiche.php?action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/projet/tasks/index.php?mode=mine", $langs->trans("Mytasks"), 1, $user->rights->projet->lire);
|
||||
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/projet/tasks/index.php?mode=mine", $langs->trans("MyTasks"), 1, $user->rights->projet->lire);
|
||||
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/activity/index.php", $langs->trans("TimeSpent"), 0, $user->rights->projet->lire);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/projet/activity/list.php", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/projet/activity/index.php?mode=mine", $langs->trans("MyTimeSpent"), 1, $user->rights->projet->lire);
|
||||
@ -816,13 +816,13 @@ class MenuLeft {
|
||||
if (eregi("members_checks",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/fiche.php?leftmenu=members_checks&action=new",$langs->trans("NewChequeDeposit"),1,$user->rights->adherent->cotisation->creer);
|
||||
if (eregi("members_checks",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/liste.php?leftmenu=members_checks",$langs->trans("MenuChequesReceipts"),1,$user->rights->adherent->cotisation->lire);
|
||||
}
|
||||
|
||||
|
||||
if ($conf->banque->enabled)
|
||||
{
|
||||
$langs->load("banks");
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/compta/bank/index.php?leftmenu=members",$langs->trans("Banks"),0,$user->rights->adherent->lire);
|
||||
}
|
||||
|
||||
|
||||
$newmenu->add(DOL_URL_ROOT."/adherents/index.php?leftmenu=export&mainmenu=members",$langs->trans("Exports"),0,$user->rights->adherent->export);
|
||||
if ($conf->export->enabled && $leftmenu=="export") $newmenu->add_submenu(DOL_URL_ROOT."/exports/index.php?leftmenu=export",$langs->trans("Datas"),1,$user->rights->adherent->export);
|
||||
if ($leftmenu=="export") $newmenu->add_submenu(DOL_URL_ROOT."/adherents/htpasswd.php?leftmenu=export",$langs->trans("Filehtpasswd"),1,$user->rights->adherent->export);
|
||||
@ -840,14 +840,14 @@ class MenuLeft {
|
||||
|
||||
// Affichage des menus personnalises
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/menubase.class.php");
|
||||
|
||||
|
||||
$menuArbo = new Menubase($this->db,'eldy','left');
|
||||
$this->overwritemenufor = $menuArbo->listeMainmenu();
|
||||
// Add other mainmenu to the list of menu to overwrite pre.inc.php
|
||||
$overwritemenumore=array('home','companies','members','products','suppliers','commercial','accountancy','agenda','project','tools','ecm');
|
||||
$this->overwritemenufor=array_merge($overwritemenumore, $this->overwritemenufor);
|
||||
$newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,1,'eldy');
|
||||
|
||||
|
||||
/*
|
||||
* Menu AUTRES (Pour les menus du haut qui ne serait pas gérés)
|
||||
*/
|
||||
@ -944,7 +944,7 @@ class MenuLeft {
|
||||
}
|
||||
}
|
||||
if ($contenu == 1) print '<div class="menu_fin"></div>'."\n";
|
||||
|
||||
|
||||
}
|
||||
|
||||
$conf->global->MAIN_SEARCHFORM_SOCIETE=0;
|
||||
|
||||
@ -21,7 +21,7 @@ RefTask=Ref. tasca
|
||||
LabelTask=Etiqueta tasca
|
||||
NewTimeSpent=Nou temps dedicat
|
||||
MyTimeSpent=El meu temps dedicat
|
||||
Mytasks=Les meves tasques
|
||||
MyTasks=Les meves tasques
|
||||
Tasks=Tasques
|
||||
Task=Tasca
|
||||
NewTask=Nova tasca
|
||||
|
||||
@ -23,7 +23,7 @@ RefTask=Ref. task
|
||||
LabelTask=Label task
|
||||
NewTimeSpent=New time spent
|
||||
MyTimeSpent=My time spent
|
||||
Mytasks=My tasks
|
||||
MyTasks=My tasks
|
||||
Tasks=Tasks
|
||||
Task=Task
|
||||
NewTask=New task
|
||||
|
||||
@ -21,7 +21,7 @@ RefTask=Ref. tarea
|
||||
LabelTask=Etiqueta tarea
|
||||
NewTimeSpent=Nuevo tiempo dedicado
|
||||
MyTimeSpent=Mi tiempo dedicado
|
||||
Mytasks=Mis tareas
|
||||
MyTasks=Mis tareas
|
||||
Tasks=Tareas
|
||||
Task=Tarea
|
||||
NewTask=Nueva tarea
|
||||
|
||||
@ -23,7 +23,7 @@ RefTask=Ref. t
|
||||
LabelTask=Libellé tâche
|
||||
NewTimeSpent=Nouveau consommé
|
||||
MyTimeSpent=Mon consommé
|
||||
Mytasks=Mes tâches
|
||||
MyTasks=Mes tâches
|
||||
Tasks=Tâches
|
||||
Task=Tâche
|
||||
NewTask=Nouvelle tâche
|
||||
|
||||
@ -14,7 +14,7 @@ ShowProject =Visualizza progetto
|
||||
SetProject =Impostare progetto
|
||||
NoProject =Nessun progetto definito
|
||||
NbOpenTasks =Numeri aperto compiti
|
||||
Mytasks =I miei compiti
|
||||
MyTasks =I miei compiti
|
||||
Tasks =Compiti
|
||||
Task =Attività
|
||||
NewTask =Nuova attività
|
||||
|
||||
@ -40,6 +40,11 @@ function project_prepare_head($objsoc)
|
||||
$head[$h][2] = 'tasks';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/fiche.php?id='.$objsoc->id.'&mode=mine';
|
||||
$head[$h][1] = $langs->trans("MyTasks");
|
||||
$head[$h][2] = 'mytasks';
|
||||
$h++;
|
||||
|
||||
if ($conf->propal->enabled || $conf->commande->enabled || $conf->facture->enabled)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/element.php?id='.$objsoc->id;
|
||||
@ -103,5 +108,5 @@ function select_projects($socid, $selected='', $htmlname='projectid')
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@ -38,14 +38,14 @@ class Project extends CommonObject
|
||||
var $errors=array(); //!< To return several error codes (or messages)
|
||||
var $element='project'; //!< Id that identify managed objects
|
||||
var $table_element='projet'; //!< Name of table without prefix where object is stored
|
||||
|
||||
|
||||
var $id;
|
||||
var $ref;
|
||||
var $title;
|
||||
var $socid;
|
||||
var $user_resp_id;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
* \param DB handler acc<EFBFBD>s base de donn<EFBFBD>es
|
||||
@ -76,7 +76,7 @@ class Project extends CommonObject
|
||||
$sql.= " ".($this->socid > 0?$this->socid:"null").",";
|
||||
$sql.= " ".$user->id.",";
|
||||
$sql.= " ".$this->user_resp_id.", ".$this->db->idate(mktime()).", 0)";
|
||||
|
||||
|
||||
dolibarr_syslog("Project::create sql=".$sql,LOG_DEBUG);
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
@ -214,7 +214,7 @@ class Project extends CommonObject
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Return list of elements for type linked to project
|
||||
* \param type 'propal','order','invoice','order_supplier','invoice_supplier'
|
||||
@ -424,24 +424,34 @@ class Project extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Return list of project - tasks
|
||||
* Return list of task for project
|
||||
* @param user Object user to limit task affected to a particular user
|
||||
*
|
||||
* @return unknown
|
||||
*/
|
||||
function getTasksArray()
|
||||
function getTasksArray($user=0)
|
||||
{
|
||||
$tasks = array();
|
||||
|
||||
/* List of tasks */
|
||||
|
||||
$sql = "SELECT p.rowid as projectid, p.ref, p.title as ptitle,";
|
||||
$sql.= " t.rowid, t.title, t.fk_task_parent, t.duration_effective";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t on t.fk_projet = p.rowid";
|
||||
if ($this->id) $sql .= " WHERE t.fk_projet =".$this->id;
|
||||
if (is_object($user))
|
||||
{
|
||||
$sql.= ", ".MAIN_DB_PREFIX."projet_task as t";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."projet_task_actors as ta";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t on t.fk_projet = p.rowid";
|
||||
}
|
||||
$sql.=" WHERE 1 = 1";
|
||||
if ($this->id) $sql .= " AND t.fk_projet =".$this->id;
|
||||
if (is_object($user)) $sql .= " AND t.fk_projet = p.rowid AND ta.fk_projet_task = t.rowid AND ta.fk_user =".$user->id;
|
||||
$sql.= " ORDER BY p.ref, t.title";
|
||||
|
||||
dolibarr_syslog("Project::getTasksArray sql=".$sql);
|
||||
dolibarr_syslog("Project::getTasksArray sql=".$sql, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -465,7 +475,7 @@ class Project extends CommonObject
|
||||
{
|
||||
dolibarr_print_error($this->db);
|
||||
}
|
||||
|
||||
|
||||
return $tasks;
|
||||
}
|
||||
|
||||
@ -492,6 +502,6 @@ class Project extends CommonObject
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin;
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -40,7 +40,7 @@ $langs->load("companies");
|
||||
function llxHeader($head = "", $title="", $help_url='')
|
||||
{
|
||||
global $langs, $user;
|
||||
|
||||
|
||||
top_menu($head, $title);
|
||||
|
||||
$menu = new Menu();
|
||||
@ -51,12 +51,12 @@ function llxHeader($head = "", $title="", $help_url='')
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/projet/tasks/index.php", $langs->trans("Tasks"), 0, $user->rights->projet->lire);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/projet/tasks/fiche.php?action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/projet/tasks/index.php?mode=mine", $langs->trans("Mytasks"), 1, $user->rights->projet->lire);
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/projet/tasks/index.php?mode=mine", $langs->trans("MyTasks"), 1, $user->rights->projet->lire);
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/projet/activity/index.php", $langs->trans("TimeSpent"), 0, $user->rights->projet->lire);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/projet/activity/list.php", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/projet/activity/index.php?mode=mine", $langs->trans("MyTimeSpent"), 1, $user->rights->projet->lire);
|
||||
|
||||
|
||||
left_menu($menu->liste, $help_url);
|
||||
}
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
/**
|
||||
\file htdocs/projet/liste.php
|
||||
\ingroup projet
|
||||
\brief Page liste des projets
|
||||
@ -59,9 +59,8 @@ $pagenext = $page + 1;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Affichage de la liste des projets
|
||||
*
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
@ -77,8 +76,8 @@ $sql .= ") LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = p.fk_soc";
|
||||
$sql .= " WHERE 1 = 1 ";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if ($socid)
|
||||
{
|
||||
$sql .= " AND s.rowid = ".$socid;
|
||||
{
|
||||
$sql .= " AND s.rowid = ".$socid;
|
||||
}
|
||||
if ($_GET["search_ref"])
|
||||
{
|
||||
@ -100,9 +99,9 @@ if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
|
||||
print_barre_liste($langs->trans("ProjectsList"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num);
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),"liste.php","p.ref","","","",$sortfield,$sortorder);
|
||||
@ -110,7 +109,7 @@ if ($resql)
|
||||
print_liste_field_titre($langs->trans("Company"),"liste.php","s.nom","","","",$sortfield,$sortorder);
|
||||
print '<td> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
print '<form method="get" action="liste.php">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td valign="right">';
|
||||
@ -125,15 +124,15 @@ if ($resql)
|
||||
print '<td class="liste_titre" align="center"><input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" alt="'.$langs->trans("Search").'">';
|
||||
print "</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
$objp = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td><a href=\"fiche.php?id=$objp->projectid\">".img_object($langs->trans("ShowProject"),"project")." ".$objp->ref."</a></td>\n";
|
||||
print "<td><a href=\"fiche.php?id=$objp->projectid\">".$objp->title."</a></td>\n";
|
||||
|
||||
|
||||
// Company
|
||||
print '<td>';
|
||||
if ($objp->socid)
|
||||
@ -143,17 +142,17 @@ if ($resql)
|
||||
print $staticsoc->getNomUrl(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
print ' ';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '<td> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
|
||||
@ -43,7 +43,7 @@ $langs->load("commercial");
|
||||
function llxHeader($head = "", $title="", $help_url='')
|
||||
{
|
||||
global $langs, $user;
|
||||
|
||||
|
||||
top_menu($head, $title);
|
||||
|
||||
$menu = new Menu();
|
||||
@ -54,12 +54,12 @@ function llxHeader($head = "", $title="", $help_url='')
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/projet/tasks/index.php", $langs->trans("Tasks"), 0, $user->rights->projet->lire);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/projet/tasks/fiche.php?action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/projet/tasks/index.php?mode=mine", $langs->trans("Mytasks"), 1, $user->rights->projet->lire);
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/projet/tasks/index.php?mode=mine", $langs->trans("MyTasks"), 1, $user->rights->projet->lire);
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/projet/activity/index.php", $langs->trans("TimeSpent"), 0, $user->rights->projet->lire);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/projet/activity/list.php", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/projet/activity/index.php?mode=mine", $langs->trans("MyTimeSpent"), 1, $user->rights->projet->lire);
|
||||
|
||||
|
||||
left_menu($menu->liste, $help_url);
|
||||
}
|
||||
?>
|
||||
|
||||
@ -49,18 +49,18 @@ if ($_POST["action"] == 'createtask' && empty($_POST["cancel"]) && $user->rights
|
||||
$_GET["action"]='create';
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$tmparray=split('_',$_POST['task_parent']);
|
||||
$projectid=$tmparray[0];
|
||||
$task_parent=$tmparray[1];
|
||||
if (empty($task_parent)) $task_parent=0; // If task_parent is ''
|
||||
|
||||
|
||||
//print $_POST['task_parent'].'-'.$projectid.'-'.$task_parent;exit;
|
||||
$project = new Project($db);
|
||||
$result = $project->fetch($projectid);
|
||||
|
||||
|
||||
$result=$project->CreateTask($user, $_POST["task_name"], $task_parent);
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ if ($_POST["action"] == 'addtime' && $user->rights->projet->creer)
|
||||
{
|
||||
$post=intval($post)+(($post-intval($post))*(1+2/3));
|
||||
$post=price2num($post);
|
||||
|
||||
|
||||
$id = ereg_replace("task","",$key);
|
||||
|
||||
$date = dolibarr_mktime(12,0,0,$_POST["$id"."month"],$_POST["$id"."day"],$_POST["$id"."year"]);
|
||||
@ -138,8 +138,9 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
|
||||
|
||||
print '<form action="fiche.php" method="post">';
|
||||
print '<input type="hidden" name="action" value="createtask">';
|
||||
if ($_GET['id']) print '<input type="hidden" name="id" value="'.$_GET['id'].'">';
|
||||
|
||||
if ($_GET['id']) print '<input type="hidden" name="id" value="'.$_GET['id'].'">';
|
||||
if ($_GET['mode']) print '<input type="hidden" name="mode" value="'.$_GET['mode'].'">';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td>'.$langs->trans("NewTask").'</td><td colspan="3">';
|
||||
@ -166,28 +167,32 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Fiche projet en mode visu
|
||||
*
|
||||
*/
|
||||
$tab='tasks';
|
||||
if ($_REQUEST["mode"]=='mine') $tab='mytasks';
|
||||
|
||||
$head=project_prepare_head($projet);
|
||||
dolibarr_fiche_head($head, 'tasks', $langs->trans("Project"));
|
||||
dolibarr_fiche_head($head, $tab, $langs->trans("Project"));
|
||||
|
||||
$param=($_REQUEST["mode"]=='mine'?'&mode=mine':'');
|
||||
|
||||
print '<form name="addtime" method="POST" action="fiche.php?id='.$projet->id.'">';
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">';
|
||||
print $langs->trans("Ref");
|
||||
print '</td><td>';
|
||||
print $form->showrefnav($projet,'ref','',1,'ref','ref');
|
||||
print $form->showrefnav($projet,'ref','',1,'ref','ref','',$param);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$projet->title.'</td></tr>';
|
||||
print '<td>'.$langs->trans("Company").'</td><td>';
|
||||
if (! empty($projet->societe->id)) print $projet->societe->getNomUrl(1);
|
||||
@ -196,7 +201,7 @@ else
|
||||
//print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
$tasksarray=$projet->getTasksArray();
|
||||
$tasksarray=$projet->getTasksArray($_REQUEST["mode"]=='mine'?$user:0);
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -204,8 +209,8 @@ else
|
||||
|
||||
print '</form>';
|
||||
print '</div>';
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
@ -213,11 +218,11 @@ else
|
||||
|
||||
if ($user->rights->projet->creer)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$projet->id.'&action=create">'.$langs->trans('AddTask').'</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$projet->id.'&action=create'.$param.'">'.$langs->trans('AddTask').'</a>';
|
||||
}
|
||||
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
print '<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -230,7 +235,7 @@ else
|
||||
PLines($j, 0, $tasksarray, $level, true);
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
|
||||
}
|
||||
|
||||
$db->close();
|
||||
@ -245,9 +250,9 @@ function PLines(&$inc, $parent, $lines, &$level, $var)
|
||||
global $user, $bc, $langs;
|
||||
|
||||
$lastprojectid=0;
|
||||
|
||||
|
||||
$projectstatic = new Project($db);
|
||||
|
||||
|
||||
for ($i = 0 ; $i < sizeof($lines) ; $i++)
|
||||
{
|
||||
if ($parent == 0) $level = 0;
|
||||
@ -260,7 +265,7 @@ function PLines(&$inc, $parent, $lines, &$level, $var)
|
||||
$var = !$var;
|
||||
$lastprojectid=$lines[$i]->projectid;
|
||||
}
|
||||
|
||||
|
||||
print "<tr $bc[$var]>\n";
|
||||
|
||||
print "<td>";
|
||||
@ -268,9 +273,9 @@ function PLines(&$inc, $parent, $lines, &$level, $var)
|
||||
$projectstatic->ref=$lines[$i]->projectref;
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print "</td>";
|
||||
|
||||
|
||||
print "<td>".$lines[$i]->id."</td>";
|
||||
|
||||
|
||||
print "<td>";
|
||||
for ($k = 0 ; $k < $level ; $k++)
|
||||
{
|
||||
@ -286,9 +291,9 @@ function PLines(&$inc, $parent, $lines, &$level, $var)
|
||||
print '<td align="right">'.$heure." h ".$minutes."</td>\n";
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
$inc++;
|
||||
|
||||
|
||||
$level++;
|
||||
if ($lines[$i]->id) PLines($inc, $lines[$i]->id, $lines, $level, $var);
|
||||
$level--;
|
||||
@ -312,9 +317,9 @@ function PLines(&$inc, $parent, $lines, &$level, $var)
|
||||
function PLineSelect(&$inc, $parent, $lines, &$level)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
|
||||
$lastprojectid=0;
|
||||
|
||||
|
||||
for ($i = 0 ; $i < sizeof($lines) ; $i++)
|
||||
{
|
||||
if ($parent == 0) $level = 0;
|
||||
@ -334,7 +339,7 @@ function PLineSelect(&$inc, $parent, $lines, &$level)
|
||||
$lastprojectid=$lines[$i]->projectid;
|
||||
$inc++;
|
||||
}
|
||||
|
||||
|
||||
print '<option value="'.$lines[$i]->projectid.'_'.$lines[$i]->id.'">';
|
||||
print $langs->trans("Project").' '.$lines[$i]->projectref;
|
||||
if ($lines[$i]->id) print ' > ';
|
||||
@ -345,7 +350,7 @@ function PLineSelect(&$inc, $parent, $lines, &$level)
|
||||
print $lines[$i]->title."</option>\n";
|
||||
|
||||
$inc++;
|
||||
|
||||
|
||||
$level++;
|
||||
if ($lines[$i]->id) PLineSelect($inc, $lines[$i]->id, $lines, $level);
|
||||
$level--;
|
||||
|
||||
@ -58,10 +58,11 @@ if ($_POST["action"] == 'createtask' && $user->rights->projet->creer)
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$title=$langs->trans("Tasks");
|
||||
if ($mode == 'mine') $title=$langs->trans("Mytasks");
|
||||
if ($mode == 'mine') $title=$langs->trans("MyTasks");
|
||||
|
||||
llxHeader("",$title,"Projet");
|
||||
|
||||
@ -70,7 +71,7 @@ llxHeader("",$title,"Projet");
|
||||
*/
|
||||
|
||||
$h=0;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/index.php';
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/index.php'.($_GET["mode"]?'?mode='.$_GET["mode"]:'');
|
||||
$head[$h][1] = $title;
|
||||
$head[$h][2] = 'tasks';
|
||||
$h++;
|
||||
@ -78,7 +79,7 @@ $h++;
|
||||
dolibarr_fiche_head($head, 'tasks', $title);
|
||||
|
||||
$projet = new Project($db);
|
||||
$tasksarray=$projet->getTasksArray();
|
||||
$tasksarray=$projet->getTasksArray($_GET["mode"]=='mine'?$user:0);
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
@ -117,9 +118,9 @@ function PLines(&$inc, $parent, $lines, &$level, $var)
|
||||
global $user, $bc, $langs;
|
||||
|
||||
$lastprojectid=0;
|
||||
|
||||
|
||||
$projectstatic = new Project($db);
|
||||
|
||||
|
||||
for ($i = 0 ; $i < sizeof($lines) ; $i++)
|
||||
{
|
||||
if ($parent == 0) $level = 0;
|
||||
@ -132,7 +133,7 @@ function PLines(&$inc, $parent, $lines, &$level, $var)
|
||||
$var = !$var;
|
||||
$lastprojectid=$lines[$i]->projectid;
|
||||
}
|
||||
|
||||
|
||||
print "<tr $bc[$var]>\n";
|
||||
|
||||
print "<td>";
|
||||
@ -140,9 +141,9 @@ function PLines(&$inc, $parent, $lines, &$level, $var)
|
||||
$projectstatic->ref=$lines[$i]->projectref;
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print "</td>";
|
||||
|
||||
|
||||
print "<td>".$lines[$i]->id."</td>";
|
||||
|
||||
|
||||
print "<td>";
|
||||
for ($k = 0 ; $k < $level ; $k++)
|
||||
{
|
||||
@ -158,9 +159,9 @@ function PLines(&$inc, $parent, $lines, &$level, $var)
|
||||
print '<td align="right">'.$heure." h ".$minutes."</td>\n";
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
$inc++;
|
||||
|
||||
|
||||
$level++;
|
||||
if ($lines[$i]->id) PLines($inc, $lines[$i]->id, $lines, $level, $var);
|
||||
$level--;
|
||||
|
||||
@ -39,7 +39,7 @@ $langs->load("companies");
|
||||
function llxHeader($head = "", $title="", $help_url='')
|
||||
{
|
||||
global $langs, $user;
|
||||
|
||||
|
||||
top_menu($head, $title);
|
||||
|
||||
$menu = new Menu();
|
||||
@ -50,12 +50,12 @@ function llxHeader($head = "", $title="", $help_url='')
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/projet/tasks/index.php", $langs->trans("Tasks"), 0, $user->rights->projet->lire);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/projet/tasks/fiche.php?action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/projet/tasks/index.php?mode=mine", $langs->trans("Mytasks"), 1, $user->rights->projet->lire);
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/projet/tasks/index.php?mode=mine", $langs->trans("MyTasks"), 1, $user->rights->projet->lire);
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/projet/activity/index.php", $langs->trans("TimeSpent"), 0, $user->rights->projet->lire);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/projet/activity/list.php", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/projet/activity/index.php?mode=mine", $langs->trans("MyTimeSpent"), 1, $user->rights->projet->lire);
|
||||
|
||||
|
||||
left_menu($menu->liste, $help_url);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user