Merge remote-tracking branch 'upstream/3.2' into 3.2
This commit is contained in:
commit
6958fe9693
@ -22,7 +22,8 @@ AppVerName=DoliWamp-3.2.0-beta
|
||||
OutputBaseFilename=DoliWamp-3.2.0-beta
|
||||
; Define full path from wich all relative path are defined
|
||||
; You must modify this to put here your dolibarr root directory
|
||||
SourceDir=c:\Documents and Settings\ldestail\git\dolibarr
|
||||
;SourceDir=C:\Documents and Settings\ldestail\git\dolibarrold
|
||||
SourceDir=Z:\home\ldestail\git\dolibarrold
|
||||
; ----- End of change
|
||||
;OutputManifestFile=build\doliwampbuild.log
|
||||
AppId=doliwamp
|
||||
|
||||
@ -24,7 +24,7 @@ $RPMSUBVERSION="auto"; # auto use value found into BUILD
|
||||
"RPM_OPENSUSE"=>"rpmbuild",
|
||||
"DEB"=>"dpkg",
|
||||
"APS"=>"zip",
|
||||
"EXEDOLIWAMP"=>"iscc.exe"
|
||||
"EXEDOLIWAMP"=>"ISCC.exe"
|
||||
);
|
||||
%ALTERNATEPATH=(
|
||||
"7z"=>"7-ZIP",
|
||||
@ -38,7 +38,7 @@ $FILENAMEZIP="$PROJECT-$MAJOR.$MINOR.$BUILD";
|
||||
$FILENAMERPM="$PROJECT-$MAJOR.$MINOR.$BUILD-$RPMSUBVERSION";
|
||||
$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${BUILD}";
|
||||
$FILENAMEAPS="$PROJECT-$MAJOR.$MINOR.$BUILD.app";
|
||||
$FILENAMEEXEDOLIWAMP="$PROJECT-$MAJOR.$MINOR.$BUILD";
|
||||
$FILENAMEEXEDOLIWAMP="DoliWamp-$MAJOR.$MINOR.$BUILD";
|
||||
if (-d "/usr/src/redhat") { $RPMDIR="/usr/src/redhat"; } # redhat
|
||||
if (-d "/usr/src/RPM") { $RPMDIR="/usr/src/RPM"; } # mandrake
|
||||
|
||||
@ -763,8 +763,10 @@ if ($nboftargetok) {
|
||||
print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n";
|
||||
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
|
||||
|
||||
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCE\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
|
||||
$cmd= "iscc.exe \"$SOURCE\\build\\exe\\doliwamp\\doliwamp.iss\"";
|
||||
$SOURCEBACK=$SOURCE;
|
||||
$SOURCEBACK =~ s/\//\\/g;
|
||||
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
|
||||
$cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"";
|
||||
print "$cmd\n";
|
||||
$ret= `$cmd`;
|
||||
#print "$ret\n";
|
||||
@ -772,6 +774,8 @@ if ($nboftargetok) {
|
||||
# Move to final dir
|
||||
print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||
rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
|
||||
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||
$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -48,6 +48,7 @@ if ($user->societe_id > 0)
|
||||
*/
|
||||
|
||||
$propalstatic=new Propal($db);
|
||||
$companystatic=new Societe($db);
|
||||
$form = new Form($db);
|
||||
$formfile = new FormFile($db);
|
||||
$help_url="EN:Module_Commercial_Proposals|FR:Module_Propositions_commerciales|ES:Módulo Presupuestos";
|
||||
@ -155,7 +156,7 @@ else
|
||||
*/
|
||||
if ($conf->propal->enabled)
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.ref, s.nom, s.rowid as socid";
|
||||
$sql = "SELECT c.rowid, c.ref, s.nom as socname, s.rowid as socid, s.canvas, s.client";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -182,9 +183,18 @@ if ($conf->propal->enabled)
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($resql);
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td nowrap="nowrap">';
|
||||
print "<a href=".DOL_URL_ROOT."/comm/propal.php?id=".$obj->rowid.">".img_object($langs->trans("ShowPropal"),"propal").' '.$obj->ref."</a></td>";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'</a></td></tr>';
|
||||
|
||||
$propalstatic->id=$obj->rowid;
|
||||
$propalstatic->ref=$obj->ref;
|
||||
print '<td nowrap="nowrap">'.$propalstatic->getNomUrl(1).'</td>';
|
||||
|
||||
$companystatic->id=$obj->socid;
|
||||
$companystatic->name=$obj->socname;
|
||||
$companystatic->client=$obj->client;
|
||||
$companystatic->canvas=$obj->canvas;
|
||||
print '<td>'.$companystatic->getNomUrl(1,'customer',24).'</td>';
|
||||
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
@ -201,7 +211,7 @@ $max=5;
|
||||
* Last modified proposals
|
||||
*/
|
||||
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom, s.rowid as socid,";
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom as socname, s.rowid as socid, s.canvas, s.client,";
|
||||
$sql.= " date_cloture as datec";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
@ -255,7 +265,12 @@ if ($resql)
|
||||
|
||||
print '</td>';
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
|
||||
$companystatic->id=$obj->socid;
|
||||
$companystatic->name=$obj->socname;
|
||||
$companystatic->client=$obj->client;
|
||||
$companystatic->canvas=$obj->canvas;
|
||||
print '<td>'.$companystatic->getNomUrl(1,'customer').'</td>';
|
||||
|
||||
print '<td>'.dol_print_date($db->jdate($obj->datec),'day').'</td>';
|
||||
print '<td align="right">'.$propalstatic->LibStatut($obj->fk_statut,5).'</td>';
|
||||
print '</tr>';
|
||||
@ -274,7 +289,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
|
||||
{
|
||||
$langs->load("propal");
|
||||
|
||||
$sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp";
|
||||
$sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."propal as p";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -324,8 +339,13 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
|
||||
print '</td></tr></table>';
|
||||
|
||||
print "</td>";
|
||||
|
||||
$companystatic->id=$obj->socid;
|
||||
$companystatic->name=$obj->socname;
|
||||
$companystatic->client=$obj->client;
|
||||
$companystatic->canvas=$obj->canvas;
|
||||
print '<td align="left">'.$companystatic->getNomUrl(1,'customer',44).'</td>'."\n";
|
||||
|
||||
print '<td align="left"><a href="fiche.php?socid='.$obj->rowid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,44).'</a></td>'."\n";
|
||||
print '<td align="right">';
|
||||
print dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n";
|
||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
||||
|
||||
@ -357,11 +357,7 @@ class Conf
|
||||
$this->product->limit_size=$this->global->PRODUIT_LIMIT_SIZE;
|
||||
|
||||
// conf->theme et $this->css
|
||||
if (empty($this->global->MAIN_THEME))
|
||||
{
|
||||
if (isset($_SERVER["HTTP_USER_AGENT"]) && preg_match('/(epiphany|iceweasel)/i',$_SERVER["HTTP_USER_AGENT"])) $this->global->MAIN_THEME="auguria";
|
||||
else $this->global->MAIN_THEME="eldy";
|
||||
}
|
||||
if (empty($this->global->MAIN_THEME)) $this->global->MAIN_THEME="eldy";
|
||||
$this->theme=$this->global->MAIN_THEME;
|
||||
$this->css = "/theme/".$this->theme."/style.css.php";
|
||||
|
||||
|
||||
@ -138,6 +138,7 @@ function getBrowserInfo()
|
||||
elseif (preg_match('/chrome(\/|\s)([\d\.]+)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='chrome'; $version=$reg[2]; } // we can have 'chrome (Mozilla...) chrome x.y' in one string
|
||||
elseif (preg_match('/chrome/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='chrome'; }
|
||||
elseif (preg_match('/iceweasel/i',$_SERVER["HTTP_USER_AGENT"])) { $name='iceweasel'; $version=$reg[2]; }
|
||||
elseif (preg_match('/epiphany/i',$_SERVER["HTTP_USER_AGENT"])) { $name='epiphany'; $version=$reg[2]; }
|
||||
elseif ((empty($phone) || preg_match('/iphone/i',$_SERVER["HTTP_USER_AGENT"])) && preg_match('/safari(\/|\s)([\d\.]*)/i',$_SERVER["HTTP_USER_AGENT"], $reg)) { $name='safari'; $version=$reg[2]; } // Safari is often present in string for mobile but its not.
|
||||
elseif (preg_match('/opera(\/|\s)([\d\.]*)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='opera'; $version=$reg[2]; }
|
||||
elseif (preg_match('/msie(\/|\s)([\d\.]*)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='ie'; $version=$reg[2]; } // MS products at end
|
||||
|
||||
@ -54,7 +54,7 @@ $action=GETPOST('action','alpha');
|
||||
$original_file=GETPOST('file','alpha'); // Do not use urldecode here ($_GET are already decoded by PHP).
|
||||
$modulepart=GETPOST('modulepart','alpha');
|
||||
$urlsource=GETPOST('urlsource','alpha');
|
||||
$entity=GETPOST('entity','int');
|
||||
$entity=GETPOST('entity')?GETPOST('entity','int'):$conf->entity;
|
||||
|
||||
// Security check
|
||||
if (empty($modulepart)) accessforbidden('Bad value for parameter modulepart');
|
||||
@ -440,6 +440,7 @@ if ($modulepart)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Basic protection (against external users only)
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2012-2012 Vinicius Nogueira <viniciusvgn@gmail.com>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -69,6 +70,14 @@ $companystatic=new Societe($db);
|
||||
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
|
||||
$search_ref = GETPOST('search_ref','alpha');
|
||||
$search_ref_supplier = GETPOST('search_ref_supplier','alpha');
|
||||
$search_societe = GETPOST('search_societe','alpha');
|
||||
$search_montant_ht = GETPOST('search_montant_ht','int');
|
||||
$search_montant_ttc = GETPOST('search_montant_ttc','int');
|
||||
|
||||
|
||||
$page = GETPOST("page",'int');
|
||||
if ($page == -1) { $page = 0; }
|
||||
$offset = $conf->liste_limit * $page;
|
||||
@ -105,28 +114,28 @@ if ($user->rights->fournisseur->facture->lire)
|
||||
}
|
||||
}
|
||||
|
||||
if ($_GET["search_ref"])
|
||||
if ($search_ref)
|
||||
{
|
||||
$sql .= " AND f.rowid like '%".$_GET["search_ref"]."%'";
|
||||
$sql .= " AND f.rowid like '%".$search_ref."%'";
|
||||
}
|
||||
if ($_GET["search_ref_supplier"])
|
||||
if ($search_ref_supplier)
|
||||
{
|
||||
$sql .= " AND f.facnumber like '%".$_GET["search_ref_supplier"]."%'";
|
||||
$sql .= " AND f.facnumber like '%".$search_ref_supplier."%'";
|
||||
}
|
||||
|
||||
if ($_GET["search_societe"])
|
||||
if ($search_societe)
|
||||
{
|
||||
$sql .= " AND s.nom like '%".$_GET["search_societe"]."%'";
|
||||
$sql .= " AND s.nom like '%".$search_societe."%'";
|
||||
}
|
||||
|
||||
if ($_GET["search_montant_ht"])
|
||||
if ($search_montant_ht)
|
||||
{
|
||||
$sql .= " AND f.total_ht = '".$_GET["search_montant_ht"]."'";
|
||||
$sql .= " AND f.total_ht = '".$search_montant_ht."'";
|
||||
}
|
||||
|
||||
if ($_GET["search_montant_ttc"])
|
||||
if ($search_montant_ttc)
|
||||
{
|
||||
$sql .= " AND f.total_ttc = '".$_GET["search_montant_ttc"]."'";
|
||||
$sql .= " AND f.total_ttc = '".$search_montant_ttc."'";
|
||||
}
|
||||
|
||||
if (dol_strlen($_POST["sf_ref"]) > 0)
|
||||
@ -153,6 +162,13 @@ if ($user->rights->fournisseur->facture->lire)
|
||||
|
||||
$param ='';
|
||||
if ($socid) $param.="&socid=".$socid;
|
||||
|
||||
if ($search_ref) $param.='&search_ref='.urlencode($search_ref);
|
||||
if ($search_ref_supplier) $param.='&search_ref_supplier='.urlencode($search_ref_supplier);
|
||||
if ($search_societe) $param.='&search_societe='.urlencode($search_societe);
|
||||
if ($search_montant_ht) $param.='&search_montant_ht='.urlencode($search_montant_ht);
|
||||
if ($search_montant_ttc) $param.='&search_montant_ttc='.urlencode($search_montant_ttc);
|
||||
|
||||
$param.=($option?"&option=".$option:"");
|
||||
if ($late) $param.='&late='.urlencode($late);
|
||||
$urlsource.=str_replace('&','&',$param);
|
||||
@ -187,17 +203,17 @@ if ($user->rights->fournisseur->facture->lire)
|
||||
// Lines with filter fields
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="8" type="text" name="search_ref" value="'.$_GET["search_ref"].'"></td>';
|
||||
print '<input class="flat" size="8" type="text" name="search_ref" value="'.$search_ref.'"></td>';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="8" type="text" name="search_ref_supplier" value="'.$_GET["search_ref_supplier"].'"></td>';
|
||||
print '<input class="flat" size="8" type="text" name="search_ref_supplier" value="'.$search_ref_supplier.'"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" size="6" name="search_societe" value="'.$_GET["search_societe"].'">';
|
||||
print '<input class="flat" type="text" size="6" name="search_societe" value="'.$search_societe.'">';
|
||||
print '</td><td class="liste_titre" align="right">';
|
||||
print '<input class="flat" type="text" size="8" name="search_montant_ht" value="'.$_GET["search_montant_ht"].'">';
|
||||
print '<input class="flat" type="text" size="8" name="search_montant_ht" value="'.$search_montant_ht.'">';
|
||||
print '</td><td class="liste_titre" align="right">';
|
||||
print '<input class="flat" type="text" size="8" name="search_montant_ttc" value="'.$_GET["search_montant_ttc"].'">';
|
||||
print '<input class="flat" type="text" size="8" name="search_montant_ttc" value="'.$search_montant_ttc.'">';
|
||||
print '</td><td class="liste_titre" colspan="2" align="right">';
|
||||
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '</td>';
|
||||
|
||||
@ -1222,7 +1222,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("CurrentTheme").'</b>: '.$conf->theme;
|
||||
$s=picto_from_langcode($langs->getDefaultLang());
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("CurrentUserLanguage").'</b>: '.($s?$s.' ':'').$langs->getDefaultLang();
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("Browser").'</b>: '.$conf->browser->name.' ('.$_SERVER['HTTP_USER_AGENT'].')';
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("Browser").'</b>: '.$conf->browser->name.($conf->browser->version?' '.$conf->browser->version:'').' ('.$_SERVER['HTTP_USER_AGENT'].')';
|
||||
if (! empty($conf->browser->phone)) $loginhtmltext.='<br><b>'.$langs->trans("Phone").'</b>: '.$conf->browser->phone;
|
||||
if (! empty($_SESSION["disablemodules"])) $loginhtmltext.='<br><b>'.$langs->trans("DisabledModules").'</b>: <br>'.join(', ',explode(',',$_SESSION["disablemodules"]));
|
||||
|
||||
|
||||
@ -82,6 +82,7 @@ if (isset($_POST["button_removefilter_x"]))
|
||||
$sref="";
|
||||
$sbarcode="";
|
||||
$snom="";
|
||||
$search_categ=0;
|
||||
}
|
||||
|
||||
if ($conf->categorie->enabled && GETPOST('catid'))
|
||||
@ -190,6 +191,7 @@ else
|
||||
|
||||
$param="&sref=".$sref.($sbarcode?"&sbarcode=".$sbarcode:"")."&snom=".$snom."&sall=".$sall."&tosell=".$tosell."&tobuy=".$tobuy;
|
||||
$param.=($fourn_id?"&fourn_id=".$fourn_id:"");
|
||||
$param.=($search_categ?"&search_categ=".$search_categ:"");
|
||||
$param.=isset($type)?"&type=".$type:"";
|
||||
print_barre_liste($texte, $page, "liste.php", $param, $sortfield, $sortorder,'',$num);
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -33,17 +33,21 @@ require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
|
||||
$langs->load("projects");
|
||||
$langs->load("companies");
|
||||
|
||||
$taskid = isset($_GET["id"])?$_GET["id"]:'';
|
||||
$id = GETPOST('id','int');
|
||||
$ref= GETPOST('ref');
|
||||
$action=GETPOST('action');
|
||||
$withproject=GETPOST('withproject');
|
||||
$id=GETPOST('id','int');
|
||||
$ref=GETPOST('ref','alpha');
|
||||
$action=GETPOST('action','alpha');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$withproject=GETPOST('withproject','int');
|
||||
$project_ref=GETPOST('project_ref','alpha');
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
if ($user->societe_id > 0) $socid = $user->societe_id;
|
||||
//$result = restrictedArea($user, 'projet', $taskid, 'projet_task');
|
||||
if (!$user->rights->projet->lire) accessforbidden();
|
||||
//$result = restrictedArea($user, 'projet', $id, 'projet_task');
|
||||
if (! $user->rights->projet->lire) accessforbidden();
|
||||
|
||||
$object = new Task($db);
|
||||
$projectstatic = new Project($db);
|
||||
|
||||
|
||||
/*
|
||||
@ -53,31 +57,28 @@ if (!$user->rights->projet->lire) accessforbidden();
|
||||
// Add new contact
|
||||
if ($action == 'addcontact' && $user->rights->projet->creer)
|
||||
{
|
||||
$result = $object->fetch($id);
|
||||
|
||||
$result = 0;
|
||||
$task = new Task($db);
|
||||
$result = $task->fetch($taskid);
|
||||
|
||||
if ($result > 0 && $taskid > 0)
|
||||
if ($result > 0 && $id > 0)
|
||||
{
|
||||
$result = $task->add_contact($_POST["contactid"], $_POST["type"], $_POST["source"]);
|
||||
$result = $object->add_contact($_POST["contactid"], $_POST["type"], $_POST["source"]);
|
||||
}
|
||||
|
||||
if ($result >= 0)
|
||||
{
|
||||
Header("Location: contact.php?id=".$task->id);
|
||||
Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id.($withproject?'&withproject=1':''));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($task->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||
{
|
||||
$langs->load("errors");
|
||||
$mesg = '<div class="error">'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$mesg = '<div class="error">'.$task->error.'</div>';
|
||||
$mesg = '<div class="error">'.$object->error.'</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -85,10 +86,9 @@ if ($action == 'addcontact' && $user->rights->projet->creer)
|
||||
// bascule du statut d'un contact
|
||||
if ($action == 'swapstatut' && $user->rights->projet->creer)
|
||||
{
|
||||
$task = new Task($db);
|
||||
if ($task->fetch($taskid))
|
||||
if ($object->fetch($id))
|
||||
{
|
||||
$result=$task->swapContactStatus(GETPOST('ligne'));
|
||||
$result=$object->swapContactStatus(GETPOST('ligne'));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -99,13 +99,12 @@ if ($action == 'swapstatut' && $user->rights->projet->creer)
|
||||
// Efface un contact
|
||||
if ($action == 'deleteline' && $user->rights->projet->creer)
|
||||
{
|
||||
$task = new Task($db);
|
||||
$task->fetch($taskid);
|
||||
$result = $task->delete_contact($_GET["lineid"]);
|
||||
$object->fetch($id);
|
||||
$result = $object->delete_contact($_GET["lineid"]);
|
||||
|
||||
if ($result >= 0)
|
||||
{
|
||||
Header("Location: contact.php?id=".$task->id);
|
||||
Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id.($withproject?'&withproject=1':''));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@ -114,6 +113,23 @@ if ($action == 'deleteline' && $user->rights->projet->creer)
|
||||
}
|
||||
}
|
||||
|
||||
// Retreive First Task ID of Project if withprojet is on to allow project prev next to work
|
||||
if (! empty($project_ref) && ! empty($withproject))
|
||||
{
|
||||
if ($projectstatic->fetch(0,$project_ref) > 0)
|
||||
{
|
||||
$tasksarray=$object->getTasksArray(0, 0, $projectstatic->id, $socid, 0);
|
||||
if (count($tasksarray) > 0)
|
||||
{
|
||||
$id=$tasksarray[0]->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
Header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject?'&withproject=1':'').(empty($mode)?'':'&mode='.$mode));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* View
|
||||
@ -125,8 +141,6 @@ $form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
$contactstatic = new Contact($db);
|
||||
$userstatic = new User($db);
|
||||
$project = new Project($db);
|
||||
$task = new Task($db);
|
||||
|
||||
|
||||
/* *************************************************************************** */
|
||||
@ -137,19 +151,19 @@ $task = new Task($db);
|
||||
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
if ($task->fetch($id,$ref) > 0)
|
||||
if ($object->fetch($id) > 0)
|
||||
{
|
||||
$result=$project->fetch($task->fk_project);
|
||||
if (! empty($project->socid)) $project->societe->fetch($project->socid);
|
||||
$result=$projectstatic->fetch($object->fk_project);
|
||||
if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid);
|
||||
|
||||
$userWrite = $project->restrictedProjectArea($user,'write');
|
||||
$userWrite = $projectstatic->restrictedProjectArea($user,'write');
|
||||
|
||||
if ($withproject)
|
||||
{
|
||||
// Tabs for project
|
||||
$tab='tasks';
|
||||
$head=project_prepare_head($project);
|
||||
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($project->public?'projectpub':'project'));
|
||||
$head=project_prepare_head($projectstatic);
|
||||
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($projectstatic->public?'projectpub':'project'));
|
||||
|
||||
$param=($mode=='mine'?'&mode=mine':'');
|
||||
|
||||
@ -162,28 +176,28 @@ if ($id > 0 || ! empty($ref))
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (! $user->rights->projet->all->lire)
|
||||
{
|
||||
$projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,0);
|
||||
$project->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,0);
|
||||
$projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||
}
|
||||
print $form->showrefnav($project,'ref','',1,'ref','ref','',$param);
|
||||
print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$project->title.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$projectstatic->title.'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td>';
|
||||
if (! empty($project->societe->id)) print $project->societe->getNomUrl(1);
|
||||
if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($project->public) print $langs->trans('SharedProject');
|
||||
if ($projectstatic->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$project->getLibStatut(4).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$projectstatic->getLibStatut(4).'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -193,12 +207,12 @@ if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
|
||||
// To verify role of users
|
||||
//$userAccess = $project->restrictedProjectArea($user); // We allow task affected to user even if a not allowed project
|
||||
//$arrayofuseridoftask=$task->getListContactId('internal');
|
||||
//$userAccess = $projectstatic->restrictedProjectArea($user); // We allow task affected to user even if a not allowed project
|
||||
//$arrayofuseridoftask=$object->getListContactId('internal');
|
||||
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
$head = task_prepare_head($task);
|
||||
$head = task_prepare_head($object);
|
||||
dol_fiche_head($head, 'task_contact', $langs->trans("Task"), 0, 'projecttask');
|
||||
|
||||
|
||||
@ -208,33 +222,33 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$param=(GETPOST('withproject')?'&withproject=1':'');
|
||||
$linkback=GETPOST('withproject')?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$project->id.'">'.$langs->trans("BackToList").'</a>':'';
|
||||
$linkback=GETPOST('withproject')?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>':'';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans('Ref').'</td><td colspan="3">';
|
||||
if (! GETPOST('withproject') || empty($project->id))
|
||||
if (! GETPOST('withproject') || empty($projectstatic->id))
|
||||
{
|
||||
$projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,1);
|
||||
$task->next_prev_filter=" fk_projet in (".$projectsListId.")";
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1);
|
||||
$object->next_prev_filter=" fk_projet in (".$projectsListId.")";
|
||||
}
|
||||
else $task->next_prev_filter=" fk_projet = ".$project->id;
|
||||
print $form->showrefnav($task,'id',$linkback,1,'rowid','ref','',$param);
|
||||
else $object->next_prev_filter=" fk_projet = ".$projectstatic->id;
|
||||
print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param);
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$task->label.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->label.'</td></tr>';
|
||||
|
||||
// Project
|
||||
if (empty($withproject))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
||||
print $project->getNomUrl(1);
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Customer
|
||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
||||
print '<td colspan="3">';
|
||||
if ($project->societe->id > 0) print $project->societe->getNomUrl(1);
|
||||
if ($projectstatic->societe->id > 0) print $projectstatic->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -269,6 +283,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<input type="hidden" name="action" value="addcontact">';
|
||||
print '<input type="hidden" name="source" value="internal">';
|
||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||
print '<input type="hidden" name="withproject" value="'.$withproject.'">';
|
||||
|
||||
// Ligne ajout pour contact interne
|
||||
print "<tr $bc[$var]>";
|
||||
@ -283,11 +298,11 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
print '<td colspan="1">';
|
||||
// On recupere les id des users deja selectionnes
|
||||
$contactsofproject=$project->getListContactId('internal');
|
||||
$contactsofproject=$projectstatic->getListContactId('internal');
|
||||
$form->select_users($user->id,'contactid',0,'',0,'',$contactsofproject);
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$formcompany->selectTypeContact($task, '', 'type','internal','rowid');
|
||||
$formcompany->selectTypeContact($object, '', 'type','internal','rowid');
|
||||
print '</td>';
|
||||
print '<td align="right" colspan="3" ><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
|
||||
print '</tr>';
|
||||
@ -295,13 +310,13 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</form>';
|
||||
|
||||
// Line to add an external contact. Only if project linked to a third party.
|
||||
if ($project->socid)
|
||||
if ($projectstatic->socid)
|
||||
{
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">';
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="addcontact">';
|
||||
print '<input type="hidden" name="source" value="external">';
|
||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
@ -311,18 +326,18 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</td>';
|
||||
|
||||
print '<td colspan="1">';
|
||||
$thirdpartyofproject=$project->getListContactId('thirdparty');
|
||||
$selectedCompany = isset($_GET["newcompany"])?$_GET["newcompany"]:$project->societe->id;
|
||||
$selectedCompany = $formcompany->selectCompaniesForNewContact($task, 'id', $selectedCompany, 'newcompany',$thirdpartyofproject);
|
||||
$thirdpartyofproject=$projectstatic->getListContactId('thirdparty');
|
||||
$selectedCompany = isset($_GET["newcompany"])?$_GET["newcompany"]:$projectstatic->societe->id;
|
||||
$selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany',$thirdpartyofproject);
|
||||
print '</td>';
|
||||
|
||||
print '<td colspan="1">';
|
||||
$contactofproject=$project->getListContactId('external');
|
||||
$contactofproject=$projectstatic->getListContactId('external');
|
||||
$nbofcontacts=$form->select_contacts($selectedCompany,'','contactid',0,'',$contactofproject);
|
||||
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$formcompany->selectTypeContact($task, '', 'type','external','rowid');
|
||||
$formcompany->selectTypeContact($object, '', 'type','external','rowid');
|
||||
print '</td>';
|
||||
print '<td align="right" colspan="3" ><input type="submit" class="button" value="'.$langs->trans("Add").'"';
|
||||
if (! $nbofcontacts) print ' disabled="disabled"';
|
||||
@ -348,7 +363,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
foreach(array('internal','external') as $source)
|
||||
{
|
||||
$tab = $task->liste_contact(-1,$source);
|
||||
$tab = $object->liste_contact(-1,$source);
|
||||
$num=count($tab);
|
||||
|
||||
$i = 0;
|
||||
@ -405,9 +420,9 @@ if ($id > 0 || ! empty($ref))
|
||||
// Statut
|
||||
print '<td align="center">';
|
||||
// Activation desativation du contact
|
||||
if ($task->statut >= 0) print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$task->id.'&action=swapstatut&ligne='.$tab[$i]['rowid'].'">';
|
||||
if ($object->statut >= 0) print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=swapstatut&ligne='.$tab[$i]['rowid'].($withproject?'&withproject=1':'').'">';
|
||||
print $contactstatic->LibStatut($tab[$i]['status'],3);
|
||||
if ($task->statut >= 0) print '</a>';
|
||||
if ($object->statut >= 0) print '</a>';
|
||||
print '</td>';
|
||||
|
||||
// Icon update et delete
|
||||
@ -415,7 +430,7 @@ if ($id > 0 || ! empty($ref))
|
||||
if ($user->rights->projet->creer)
|
||||
{
|
||||
print ' ';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$task->id.'&action=deleteline&lineid='.$tab[$i]['rowid'].'">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deleteline&lineid='.$tab[$i]['rowid'].($withproject?'&withproject=1':'').'">';
|
||||
print img_delete();
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||
/* Copyright (C) 2010-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Florian Henry
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -32,12 +34,14 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||
$langs->load('projects');
|
||||
$langs->load('other');
|
||||
|
||||
$action=GETPOST('action');
|
||||
$action=GETPOST('action','alpha');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$mine = $_REQUEST['mode']=='mine' ? 1 : 0;
|
||||
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
|
||||
$id = GETPOST('id','int');
|
||||
$ref= GETPOST('ref');
|
||||
$withproject=GETPOST('withproject');
|
||||
$ref= GETPOST('ref','alpha');
|
||||
$withproject=GETPOST('withproject','int');
|
||||
$project_ref = GETPOST('project_ref','alpha');
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
@ -57,22 +61,10 @@ if (! $sortorder) $sortorder="ASC";
|
||||
if (! $sortfield) $sortfield="name";
|
||||
|
||||
|
||||
$object = new Task($db);
|
||||
$projectstatic = new Project($db);
|
||||
|
||||
$task = new Task($db);
|
||||
|
||||
if ($task->fetch($id,$ref) > 0)
|
||||
{
|
||||
$projectstatic = new Project($db);
|
||||
$projectstatic->fetch($task->fk_project);
|
||||
|
||||
if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid);
|
||||
|
||||
$upload_dir = $conf->projet->dir_output.'/'.dol_sanitizeFileName($projectstatic->ref).'/'.dol_sanitizeFileName($task->ref);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@ -118,143 +110,172 @@ if ($action=='delete')
|
||||
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
|
||||
}
|
||||
|
||||
// Retreive First Task ID of Project if withprojet is on to allow project prev next to work
|
||||
if (! empty($project_ref) && ! empty($withproject))
|
||||
{
|
||||
if ($projectstatic->fetch(0,$project_ref) > 0)
|
||||
{
|
||||
$tasksarray=$object->getTasksArray(0, 0, $projectstatic->id, $socid, 0);
|
||||
if (count($tasksarray) > 0)
|
||||
{
|
||||
$id=$tasksarray[0]->id;
|
||||
$object->fetch($id);
|
||||
}
|
||||
else
|
||||
{
|
||||
Header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject?'&withproject=1':'').(empty($mode)?'':'&mode='.$mode));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Find upload dir after retreive is task if necessary
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
if ($object->fetch($id,$ref) > 0)
|
||||
{
|
||||
$projectstatic->fetch($object->fk_project);
|
||||
|
||||
if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid);
|
||||
|
||||
$upload_dir = $conf->projet->dir_output.'/'.dol_sanitizeFileName($projectstatic->ref).'/'.dol_sanitizeFileName($object->ref);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$project = new Project($db);
|
||||
$task = new Task($db);
|
||||
|
||||
llxHeader('',$langs->trans('Project'));
|
||||
|
||||
if ($id > 0 || ! empty($ref))
|
||||
if ($object->id > 0)
|
||||
{
|
||||
if ($task->fetch($id,$ref) >= 0)
|
||||
{
|
||||
$result=$project->fetch($task->fk_project);
|
||||
if (! empty($project->socid)) $project->societe->fetch($project->socid);
|
||||
if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid);
|
||||
|
||||
$userWrite = $project->restrictedProjectArea($user,'write');
|
||||
$userWrite = $projectstatic->restrictedProjectArea($user,'write');
|
||||
|
||||
if ($withproject)
|
||||
if (! empty($withproject))
|
||||
{
|
||||
// Tabs for project
|
||||
$tab='tasks';
|
||||
$head=project_prepare_head($projectstatic);
|
||||
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($projectstatic->public?'projectpub':'project'));
|
||||
|
||||
$param=($mode=='mine'?'&mode=mine':'');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">';
|
||||
print $langs->trans("Ref");
|
||||
print '</td><td>';
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (! $user->rights->projet->all->lire)
|
||||
{
|
||||
// Tabs for project
|
||||
$tab='tasks';
|
||||
$head=project_prepare_head($project);
|
||||
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($project->public?'projectpub':'project'));
|
||||
|
||||
$param=($mode=='mine'?'&mode=mine':'');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">';
|
||||
print $langs->trans("Ref");
|
||||
print '</td><td>';
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (! $user->rights->projet->all->lire)
|
||||
{
|
||||
$projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,0);
|
||||
$project->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||
}
|
||||
print $form->showrefnav($project,'ref','',1,'ref','ref','',$param);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$project->title.'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td>';
|
||||
if (! empty($project->societe->id)) print $project->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($project->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$project->getLibStatut(4).'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<br>';
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,0);
|
||||
$projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||
}
|
||||
print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1');
|
||||
print '</td></tr>';
|
||||
|
||||
$head = task_prepare_head($task);
|
||||
dol_fiche_head($head, 'task_document', $langs->trans("Task"), 0, 'projecttask');
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$projectstatic->title.'</td></tr>';
|
||||
|
||||
$param=(GETPOST('withproject')?'&withproject=1':'');
|
||||
$linkback=GETPOST('withproject')?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$project->id.'">'.$langs->trans("BackToList").'</a>':'';
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td>';
|
||||
if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Files list constructor
|
||||
$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||
$totalsize=0;
|
||||
foreach($filearray as $key => $file)
|
||||
{
|
||||
$totalsize+=$file['size'];
|
||||
}
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($projectstatic->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$projectstatic->getLibStatut(4).'</td></tr>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">';
|
||||
print $langs->trans("Ref");
|
||||
print '</td><td colspan="3">';
|
||||
if (! GETPOST('withproject') || empty($project->id))
|
||||
{
|
||||
$projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,1);
|
||||
$task->next_prev_filter=" fk_projet in (".$projectsListId.")";
|
||||
}
|
||||
else $task->next_prev_filter=" fk_projet = ".$project->id;
|
||||
print $form->showrefnav($task,'id',$linkback,1,'rowid','ref','',$param);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$task->label.'</td></tr>';
|
||||
dol_fiche_end();
|
||||
|
||||
// Project
|
||||
if (empty($withproject))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
// Third party
|
||||
print '<td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||
if ($projectstatic->societe->id) print $projectstatic->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
}
|
||||
$head = task_prepare_head($object);
|
||||
dol_fiche_head($head, 'task_document', $langs->trans("Task"), 0, 'projecttask');
|
||||
|
||||
// Files infos
|
||||
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
||||
$param=(GETPOST('withproject')?'&withproject=1':'');
|
||||
$linkback=GETPOST('withproject')?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>':'';
|
||||
|
||||
print "</table>\n";
|
||||
// Files list constructor
|
||||
$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||
$totalsize=0;
|
||||
foreach($filearray as $key => $file)
|
||||
{
|
||||
$totalsize+=$file['size'];
|
||||
}
|
||||
|
||||
dol_fiche_end();
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<br>';
|
||||
// Ref
|
||||
print '<tr><td width="30%">';
|
||||
print $langs->trans("Ref");
|
||||
print '</td><td colspan="3">';
|
||||
if (empty($withproject) || empty($projectstatic->id))
|
||||
{
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1);
|
||||
$object->next_prev_filter=" fk_projet in (".$projectsListId.")";
|
||||
}
|
||||
else $object->next_prev_filter=" fk_projet = ".$projectstatic->id;
|
||||
print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
dol_htmloutput_mesg($mesg);
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$object->label.'</td></tr>';
|
||||
|
||||
// Project
|
||||
if (empty($withproject))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Third party
|
||||
print '<td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||
if ($projectstatic->societe->id) print $projectstatic->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Files infos
|
||||
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<br>';
|
||||
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
|
||||
// Affiche formulaire upload
|
||||
$formfile=new FormFile($db);
|
||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/projet/tasks/document.php?id='.$task->id,'',0,0,$user->rights->projet->creer);
|
||||
// Affiche formulaire upload
|
||||
$formfile=new FormFile($db);
|
||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/projet/tasks/document.php?id='.$object->id.($withproject?'&withproject=1':''),'',0,0,$user->rights->projet->creer);
|
||||
|
||||
|
||||
// List of document
|
||||
$param='&id='.$task->id;
|
||||
$formfile->list_of_documents($filearray,$task,'projet',$param,0,dol_sanitizeFileName($project->ref).'/'.dol_sanitizeFileName($task->ref).'/');
|
||||
}
|
||||
// List of document
|
||||
$param='&id='.$object->id;
|
||||
$formfile->list_of_documents($filearray,$object,'projet',$param,0,dol_sanitizeFileName($projectstatic->ref).'/'.dol_sanitizeFileName($object->ref).'/');
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -266,4 +287,4 @@ else
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
?>
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||
/* Copyright (C) 2010-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -28,12 +28,14 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/project.lib.php");
|
||||
|
||||
$langs->load('projects');
|
||||
|
||||
$action=GETPOST('action');
|
||||
$action=GETPOST('action','alpha');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$mine = $_REQUEST['mode']=='mine' ? 1 : 0;
|
||||
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
|
||||
$id = GETPOST('id','int');
|
||||
$ref= GETPOST('ref', 'alpha');
|
||||
$withproject=GETPOST('withproject');
|
||||
$withproject=GETPOST('withproject','int');
|
||||
$project_ref = GETPOST('project_ref','alpha');
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
@ -42,7 +44,39 @@ if (!$user->rights->projet->lire) accessforbidden();
|
||||
//$result = restrictedArea($user, 'projet', $id, '', 'task'); // TODO ameliorer la verification
|
||||
|
||||
$object = new Task($db);
|
||||
$object->fetch($id, $ref);
|
||||
$projectstatic = new Project($db);
|
||||
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
if ($object->fetch($id,$ref) > 0)
|
||||
{
|
||||
$projectstatic->fetch($object->fk_project);
|
||||
if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Retreive First Task ID of Project if withprojet is on to allow project prev next to work
|
||||
if (! empty($project_ref) && ! empty($withproject))
|
||||
{
|
||||
if ($projectstatic->fetch(0,$project_ref) > 0)
|
||||
{
|
||||
$tasksarray=$object->getTasksArray(0, 0, $projectstatic->id, $socid, 0);
|
||||
if (count($tasksarray) > 0)
|
||||
{
|
||||
$id=$tasksarray[0]->id;
|
||||
$object->fetch($id);
|
||||
}
|
||||
else
|
||||
{
|
||||
Header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.(empty($mode)?'':'&mode='.$mode));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@ -70,24 +104,20 @@ else if ($action == 'setnote_private' && $user->rights->ficheinter->creer)
|
||||
llxHeader();
|
||||
|
||||
$form = new Form($db);
|
||||
$project = new Project($db);
|
||||
$userstatic = new User($db);
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
if ($id > 0 || ! empty($ref))
|
||||
if ($object->id > 0)
|
||||
{
|
||||
$result=$project->fetch($object->fk_project);
|
||||
if (! empty($project->socid)) $project->societe->fetch($project->socid);
|
||||
$userWrite = $projectstatic->restrictedProjectArea($user,'write');
|
||||
|
||||
$userWrite = $project->restrictedProjectArea($user,'write');
|
||||
|
||||
if ($withproject)
|
||||
if (! empty($withproject))
|
||||
{
|
||||
// Tabs for project
|
||||
$tab='tasks';
|
||||
$head=project_prepare_head($project);
|
||||
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($project->public?'projectpub':'project'));
|
||||
$head=project_prepare_head($projectstatic);
|
||||
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($projectstatic->public?'projectpub':'project'));
|
||||
|
||||
$param=($mode=='mine'?'&mode=mine':'');
|
||||
|
||||
@ -100,30 +130,30 @@ if ($id > 0 || ! empty($ref))
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (! $user->rights->projet->all->lire)
|
||||
{
|
||||
$projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,0);
|
||||
$project->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,0);
|
||||
$projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||
}
|
||||
print $form->showrefnav($project,'ref','',1,'ref','ref','',$param);
|
||||
print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1');
|
||||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$project->title.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$projectstatic->title.'</td></tr>';
|
||||
|
||||
// Company
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td>';
|
||||
if (! empty($project->societe->id)) print $project->societe->getNomUrl(1);
|
||||
if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($project->public) print $langs->trans('SharedProject');
|
||||
if ($projectstatic->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$project->getLibStatut(4).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$projectstatic->getLibStatut(4).'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -138,16 +168,16 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$param=(GETPOST('withproject')?'&withproject=1':'');
|
||||
$linkback=GETPOST('withproject')?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$project->id.'">'.$langs->trans("BackToList").'</a>':'';
|
||||
$linkback=GETPOST('withproject')?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>':'';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td>';
|
||||
if (! GETPOST('withproject') || empty($project->id))
|
||||
if (empty($withproject) || empty($projectstatic->id))
|
||||
{
|
||||
$projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,1);
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1);
|
||||
$object->next_prev_filter=" fk_projet in (".$projectsListId.")";
|
||||
}
|
||||
else $object->next_prev_filter=" fk_projet = ".$project->id;
|
||||
else $object->next_prev_filter=" fk_projet = ".$projectstatic->id;
|
||||
print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param);
|
||||
print '</td></tr>';
|
||||
|
||||
@ -158,12 +188,12 @@ if ($id > 0 || ! empty($ref))
|
||||
if (empty($withproject))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
print $project->getNomUrl(1);
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Third party
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td>';
|
||||
if ($project->societe->id > 0) print $project->societe->getNomUrl(1);
|
||||
if ($projectstatic->societe->id > 0) print $projectstatic->societe->getNomUrl(1);
|
||||
else print' ';
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -180,7 +210,7 @@ if ($id > 0 || ! empty($ref))
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
llxFooter();
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/projet/tasks/task.php
|
||||
* \ingroup projet
|
||||
* \ingroup project
|
||||
* \brief Page of a project task
|
||||
*/
|
||||
|
||||
@ -29,17 +29,20 @@ require_once(DOL_DOCUMENT_ROOT."/projet/class/task.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/project.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formother.class.php");
|
||||
|
||||
$taskid = GETPOST('id','int');
|
||||
$taskref = GETPOST("ref");
|
||||
$id = GETPOST('id','int');
|
||||
$ref= GETPOST('ref');
|
||||
$action=GETPOST('action');
|
||||
$withproject=GETPOST('withproject');
|
||||
$id=GETPOST('id','int');
|
||||
$ref=GETPOST('ref','alpha');
|
||||
$action=GETPOST('action','alpha');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$withproject=GETPOST('withproject','int');
|
||||
$project_ref=GETPOST('project_ref','alpha');
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
if ($user->societe_id > 0) $socid = $user->societe_id;
|
||||
if (!$user->rights->projet->lire) accessforbidden();
|
||||
if (! $user->rights->projet->lire) accessforbidden();
|
||||
|
||||
$object = new Task($db);
|
||||
$projectstatic = new Project($db);
|
||||
|
||||
|
||||
/*
|
||||
@ -57,44 +60,38 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->projet->creer)
|
||||
}
|
||||
if (! $error)
|
||||
{
|
||||
$task = new Task($db);
|
||||
$task->fetch($id);
|
||||
$object->fetch($id);
|
||||
|
||||
$tmparray=explode('_',$_POST['task_parent']);
|
||||
$task_parent=$tmparray[1];
|
||||
if (empty($task_parent)) $task_parent = 0; // If task_parent is ''
|
||||
|
||||
$task->label = $_POST["label"];
|
||||
$task->description = $_POST['description'];
|
||||
$task->fk_task_parent = $task_parent;
|
||||
$task->date_start = dol_mktime(12,0,0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear']);
|
||||
$task->date_end = dol_mktime(12,0,0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear']);
|
||||
$task->progress = $_POST['progress'];
|
||||
$object->label = $_POST["label"];
|
||||
$object->description = $_POST['description'];
|
||||
$object->fk_task_parent = $task_parent;
|
||||
$object->date_start = dol_mktime(12,0,0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear']);
|
||||
$object->date_end = dol_mktime(12,0,0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear']);
|
||||
$object->progress = $_POST['progress'];
|
||||
|
||||
$result=$task->update($user);
|
||||
|
||||
$taskid=$task->id; // On retourne sur la fiche tache
|
||||
$result=$object->update($user);
|
||||
}
|
||||
else
|
||||
{
|
||||
$taskid=$_POST["id"];
|
||||
$action='edit';
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights->projet->supprimer)
|
||||
if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->projet->supprimer)
|
||||
{
|
||||
$task = new Task($db);
|
||||
if ($task->fetch($id) >= 0 )
|
||||
if ($object->fetch($id) >= 0 )
|
||||
{
|
||||
$projet = new Project($db);
|
||||
$result=$projet->fetch($task->fk_projet);
|
||||
if (! empty($projet->socid))
|
||||
$result=$projecstatict->fetch($object->fk_projet);
|
||||
if (! empty($projecstatic->socid))
|
||||
{
|
||||
$projet->societe->fetch($projet->socid);
|
||||
$projecstatic->societe->fetch($projecstatic->socid);
|
||||
}
|
||||
|
||||
if ($task->delete($user) > 0)
|
||||
if ($object->delete($user) > 0)
|
||||
{
|
||||
Header("Location: index.php");
|
||||
exit;
|
||||
@ -102,12 +99,28 @@ if ($action == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights->
|
||||
else
|
||||
{
|
||||
$langs->load("errors");
|
||||
$mesg='<div class="error">'.$langs->trans($task->error).'</div>';
|
||||
$_POST["action"]='';
|
||||
$mesg='<div class="error">'.$langs->trans($object->error).'</div>';
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Retreive First Task ID of Project if withprojet is on to allow project prev next to work
|
||||
if (! empty($project_ref) && ! empty($withproject))
|
||||
{
|
||||
if ($projectstatic->fetch('',$project_ref) > 0)
|
||||
{
|
||||
$tasksarray=$object->getTasksArray(0, 0, $projectstatic->id, $socid, 0);
|
||||
if (count($tasksarray) > 0)
|
||||
{
|
||||
$id=$tasksarray[0]->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
Header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.(empty($mode)?'':'&mode='.$mode));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* View
|
||||
@ -117,24 +130,22 @@ llxHeader("",$langs->trans("Task"));
|
||||
|
||||
$form = new Form($db);
|
||||
$formother = new FormOther($db);
|
||||
$project = new Project($db);
|
||||
$task = new Task($db);
|
||||
|
||||
if ($taskid)
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
if ($task->fetch($taskid) > 0)
|
||||
if ($object->fetch($id) > 0)
|
||||
{
|
||||
$result=$project->fetch($task->fk_project);
|
||||
if (! empty($project->socid)) $project->societe->fetch($project->socid);
|
||||
$result=$projectstatic->fetch($object->fk_project);
|
||||
if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid);
|
||||
|
||||
$userWrite = $project->restrictedProjectArea($user,'write');
|
||||
$userWrite = $projectstatic->restrictedProjectArea($user,'write');
|
||||
|
||||
if ($withproject)
|
||||
if (! empty($withproject))
|
||||
{
|
||||
// Tabs for project
|
||||
$tab='tasks';
|
||||
$head=project_prepare_head($project);
|
||||
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($project->public?'projectpub':'project'));
|
||||
$head=project_prepare_head($projectstatic);
|
||||
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($projectstatic->public?'projectpub':'project'));
|
||||
|
||||
$param=($mode=='mine'?'&mode=mine':'');
|
||||
|
||||
@ -147,28 +158,28 @@ if ($taskid)
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (! $user->rights->projet->all->lire)
|
||||
{
|
||||
$projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,0);
|
||||
$project->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,0);
|
||||
$projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||
}
|
||||
print $form->showrefnav($project,'ref','',1,'ref','ref','',$param);
|
||||
print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$project->title.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$projectstatic->title.'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td>';
|
||||
if (! empty($project->societe->id)) print $project->societe->getNomUrl(1);
|
||||
if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($project->public) print $langs->trans('SharedProject');
|
||||
if ($projectstatic->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$project->getLibStatut(4).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$projectstatic->getLibStatut(4).'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -184,7 +195,7 @@ if ($taskid)
|
||||
|
||||
if ($user->rights->projet->all->creer || $user->rights->projet->creer)
|
||||
{
|
||||
if ($project->public || $userWrite > 0)
|
||||
if ($projectstatic->public || $userWrite > 0)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=create'.$param.'">'.$langs->trans('AddTask').'</a>';
|
||||
}
|
||||
@ -202,12 +213,12 @@ if ($taskid)
|
||||
*/
|
||||
|
||||
// To verify role of users
|
||||
//$userAccess = $project->restrictedProjectArea($user); // We allow task affected to user even if a not allowed project
|
||||
//$arrayofuseridoftask=$task->getListContactId('internal');
|
||||
//$userAccess = $projectstatic->restrictedProjectArea($user); // We allow task affected to user even if a not allowed project
|
||||
//$arrayofuseridoftask=$object->getListContactId('internal');
|
||||
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
$head=task_prepare_head($task);
|
||||
$head=task_prepare_head($object);
|
||||
dol_fiche_head($head, 'task_task', $langs->trans("Task"),0,'projecttask');
|
||||
|
||||
if ($action == 'edit' && $user->rights->projet->creer)
|
||||
@ -216,56 +227,56 @@ if ($taskid)
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="withproject" value="'.$withproject.'">';
|
||||
print '<input type="hidden" name="id" value="'.$task->id.'">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td>'.$task->ref.'</td></tr>';
|
||||
print '<td>'.$object->ref.'</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td>';
|
||||
print '<td><input size="30" name="label" value="'.$task->label.'"></td></tr>';
|
||||
print '<td><input size="30" name="label" value="'.$object->label.'"></td></tr>';
|
||||
|
||||
// Project
|
||||
if (empty($withproject))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
print $project->getNomUrl(1);
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Third party
|
||||
print '<td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||
if ($project->societe->id) print $project->societe->getNomUrl(1);
|
||||
if ($projectstatic->societe->id) print $projectstatic->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Task parent
|
||||
print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>';
|
||||
print $formother->selectProjectTasks($task->fk_task_parent,$project->id, 'task_parent', $user->admin?0:1, 0);
|
||||
print $formother->selectProjectTasks($object->fk_task_parent,$projectstatic->id, 'task_parent', $user->admin?0:1, 0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||
print $form->select_date($task->date_start,'dateo');
|
||||
print $form->select_date($object->date_start,'dateo');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
||||
print $form->select_date($task->date_end?$task->date_end:-1,'datee');
|
||||
print $form->select_date($object->date_end?$object->date_end:-1,'datee');
|
||||
print '</td></tr>';
|
||||
|
||||
// Progress
|
||||
print '<tr><td>'.$langs->trans("Progress").'</td><td colspan="3">';
|
||||
print $formother->select_percent($task->progress,'progress');
|
||||
print $formother->select_percent($object->progress,'progress');
|
||||
print '</td></tr>';
|
||||
|
||||
// Description
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td>';
|
||||
print '<td>';
|
||||
print '<textarea name="description" wrap="soft" cols="80" rows="'.ROWS_3.'">'.$task->description.'</textarea>';
|
||||
print '<textarea name="description" wrap="soft" cols="80" rows="'.ROWS_3.'">'.$object->description.'</textarea>';
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
@ -283,7 +294,7 @@ if ($taskid)
|
||||
* Fiche tache en mode visu
|
||||
*/
|
||||
$param=($withproject?'&withproject=1':'');
|
||||
$linkback=$withproject?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$project->id.'">'.$langs->trans("BackToList").'</a>':'';
|
||||
$linkback=$withproject?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>':'';
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
@ -297,51 +308,51 @@ if ($taskid)
|
||||
print '<tr><td width="30%">';
|
||||
print $langs->trans("Ref");
|
||||
print '</td><td colspan="3">';
|
||||
if (! GETPOST('withproject') || empty($project->id))
|
||||
if (! GETPOST('withproject') || empty($projectstatic->id))
|
||||
{
|
||||
$projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,1);
|
||||
$task->next_prev_filter=" fk_projet in (".$projectsListId.")";
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1);
|
||||
$object->next_prev_filter=" fk_projet in (".$projectsListId.")";
|
||||
}
|
||||
else $task->next_prev_filter=" fk_projet = ".$project->id;
|
||||
print $form->showrefnav($task,'id',$linkback,1,'rowid','ref','',$param);
|
||||
else $object->next_prev_filter=" fk_projet = ".$projectstatic->id;
|
||||
print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$task->label.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$object->label.'</td></tr>';
|
||||
|
||||
// Project
|
||||
if (empty($withproject))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
print $project->getNomUrl(1);
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Third party
|
||||
print '<td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||
if ($project->societe->id) print $project->societe->getNomUrl(1);
|
||||
if ($projectstatic->societe->id) print $projectstatic->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td colspan="3">';
|
||||
print dol_print_date($task->date_start,'day');
|
||||
print dol_print_date($object->date_start,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td colspan="3">';
|
||||
print dol_print_date($task->date_end,'day');
|
||||
print dol_print_date($object->date_end,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
// Progress
|
||||
print '<tr><td>'.$langs->trans("Progress").'</td><td colspan="3">';
|
||||
print $task->progress.' %';
|
||||
print $object->progress.' %';
|
||||
print '</td></tr>';
|
||||
|
||||
// Description
|
||||
print '<td valign="top">'.$langs->trans("Description").'</td><td colspan="3">';
|
||||
print nl2br($task->description);
|
||||
print nl2br($object->description);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
@ -361,7 +372,7 @@ if ($taskid)
|
||||
// Modify
|
||||
if ($user->rights->projet->creer)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$task->id.'&action=edit&withproject='.$withproject.'">'.$langs->trans('Modify').'</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit&withproject='.$withproject.'">'.$langs->trans('Modify').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -369,9 +380,9 @@ if ($taskid)
|
||||
}
|
||||
|
||||
// Delete
|
||||
if ($user->rights->projet->supprimer && ! $task->hasChildren())
|
||||
if ($user->rights->projet->supprimer && ! $object->hasChildren())
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?id='.$task->id.'&action=delete&withproject='.$withproject.'">'.$langs->trans('Delete').'</a>';
|
||||
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&withproject='.$withproject.'">'.$langs->trans('Delete').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -385,6 +396,5 @@ if ($taskid)
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/projet/tasks/time.php
|
||||
* \ingroup projet
|
||||
* \ingroup project
|
||||
* \brief Page to add new time spent on a task
|
||||
*/
|
||||
|
||||
@ -32,21 +32,26 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/date.lib.php");
|
||||
|
||||
$langs->load('projects');
|
||||
|
||||
$taskid = isset($_GET["id"])?$_GET["id"]:'';
|
||||
$id = GETPOST('id','int');
|
||||
$ref= GETPOST('ref');
|
||||
$action=GETPOST('action');
|
||||
$withproject=GETPOST('withproject');
|
||||
$id=GETPOST('id','int');
|
||||
$ref=GETPOST('ref','alpha');
|
||||
$action=GETPOST('action','alpha');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$withproject=GETPOST('withproject','int');
|
||||
$project_ref=GETPOST('project_ref','alpha');
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
if ($user->societe_id > 0) $socid = $user->societe_id;
|
||||
if (!$user->rights->projet->lire) accessforbidden();
|
||||
|
||||
$object = new Task($db);
|
||||
$projectstatic = new Project($db);
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'addtimespent' && $user->rights->projet->creer)
|
||||
{
|
||||
$error=0;
|
||||
@ -64,28 +69,27 @@ if ($action == 'addtimespent' && $user->rights->projet->creer)
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$task = new Task($db);
|
||||
$task->fetch($_POST["id"]);
|
||||
$object->fetch($id);
|
||||
|
||||
$task->timespent_note = $_POST["timespent_note"];
|
||||
$task->timespent_duration = $_POST["timespent_durationhour"]*60*60; // We store duration in seconds
|
||||
$task->timespent_duration+= $_POST["timespent_durationmin"]*60; // We store duration in seconds
|
||||
$task->timespent_date = dol_mktime(12,0,0,$_POST["timemonth"],$_POST["timeday"],$_POST["timeyear"]);
|
||||
$task->timespent_fk_user = $_POST["userid"];
|
||||
$object->timespent_note = $_POST["timespent_note"];
|
||||
$object->timespent_duration = $_POST["timespent_durationhour"]*60*60; // We store duration in seconds
|
||||
$object->timespent_duration+= $_POST["timespent_durationmin"]*60; // We store duration in seconds
|
||||
$object->timespent_date = dol_mktime(12,0,0,$_POST["timemonth"],$_POST["timeday"],$_POST["timeyear"]);
|
||||
$object->timespent_fk_user = $_POST["userid"];
|
||||
|
||||
$result=$task->addTimeSpent($user);
|
||||
$result=$object->addTimeSpent($user);
|
||||
if ($result >= 0)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$mesg='<div class="error">'.$langs->trans($task->error).'</div>';
|
||||
$mesg='<div class="error">'.$langs->trans($object->error).'</div>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_POST["action"]='';
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,44 +105,60 @@ if ($action == 'updateline' && ! $_POST["cancel"] && $user->rights->projet->cree
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$task = new Task($db);
|
||||
$task->fetch($_POST["id"]);
|
||||
$object->fetch($id);
|
||||
|
||||
$task->timespent_id = $_POST["lineid"];
|
||||
$task->timespent_note = $_POST["timespent_note_line"];
|
||||
$task->timespent_old_duration = $_POST["old_duration"];
|
||||
$task->timespent_duration = $_POST["new_durationhour"]*60*60; // We store duration in seconds
|
||||
$task->timespent_duration+= $_POST["new_durationmin"]*60; // We store duration in seconds
|
||||
$task->timespent_date = dol_mktime(12,0,0,$_POST["timelinemonth"],$_POST["timelineday"],$_POST["timelineyear"]);
|
||||
$task->timespent_fk_user = $_POST["userid_line"];
|
||||
$object->timespent_id = $_POST["lineid"];
|
||||
$object->timespent_note = $_POST["timespent_note_line"];
|
||||
$object->timespent_old_duration = $_POST["old_duration"];
|
||||
$object->timespent_duration = $_POST["new_durationhour"]*60*60; // We store duration in seconds
|
||||
$object->timespent_duration+= $_POST["new_durationmin"]*60; // We store duration in seconds
|
||||
$object->timespent_date = dol_mktime(12,0,0,$_POST["timelinemonth"],$_POST["timelineday"],$_POST["timelineyear"]);
|
||||
$object->timespent_fk_user = $_POST["userid_line"];
|
||||
|
||||
$result=$task->updateTimeSpent($user);
|
||||
$result=$object->updateTimeSpent($user);
|
||||
if ($result >= 0)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$mesg='<div class="error">'.$langs->trans($task->error).'</div>';
|
||||
$mesg='<div class="error">'.$langs->trans($object->error).'</div>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_POST["action"]='';
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'confirm_delete' && $_REQUEST["confirm"] == "yes" && $user->rights->projet->creer)
|
||||
if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->projet->creer)
|
||||
{
|
||||
$task = new Task($db);
|
||||
$task->fetchTimeSpent($_GET['lineid']);
|
||||
$result = $task->delTimeSpent($user);
|
||||
$object->fetchTimeSpent($_GET['lineid']);
|
||||
$result = $object->delTimeSpent($user);
|
||||
|
||||
if (!$result)
|
||||
{
|
||||
$langs->load("errors");
|
||||
$mesg='<div class="error">'.$langs->trans($task->error).'</div>';
|
||||
$_POST["action"]='';
|
||||
$mesg='<div class="error">'.$langs->trans($object->error).'</div>';
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
|
||||
// Retreive First Task ID of Project if withprojet is on to allow project prev next to work
|
||||
if (! empty($project_ref) && ! empty($withproject))
|
||||
{
|
||||
if ($projectstatic->fetch(0,$project_ref) > 0)
|
||||
{
|
||||
$tasksarray=$object->getTasksArray(0, 0, $projectstatic->id, $socid, 0);
|
||||
if (count($tasksarray) > 0)
|
||||
{
|
||||
$id=$tasksarray[0]->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
Header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject?'&withproject=1':'').(empty($mode)?'':'&mode='.$mode));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -147,10 +167,6 @@ if ($action == 'confirm_delete' && $_REQUEST["confirm"] == "yes" && $user->right
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$project = new Project($db);
|
||||
$task = new Task($db);
|
||||
|
||||
llxHeader("",$langs->trans("Task"));
|
||||
|
||||
$form = new Form($db);
|
||||
@ -160,19 +176,19 @@ if ($id > 0 || ! empty($ref))
|
||||
/*
|
||||
* Fiche projet en mode visu
|
||||
*/
|
||||
if ($task->fetch($id,$ref) >= 0)
|
||||
if ($object->fetch($id) >= 0)
|
||||
{
|
||||
$result=$project->fetch($task->fk_project);
|
||||
if (! empty($project->socid)) $project->societe->fetch($project->socid);
|
||||
$result=$projectstatic->fetch($object->fk_project);
|
||||
if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid);
|
||||
|
||||
$userWrite = $project->restrictedProjectArea($user,'write');
|
||||
$userWrite = $projectstatic->restrictedProjectArea($user,'write');
|
||||
|
||||
if ($withproject)
|
||||
{
|
||||
// Tabs for project
|
||||
$tab='tasks';
|
||||
$head=project_prepare_head($project);
|
||||
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($project->public?'projectpub':'project'));
|
||||
$head=project_prepare_head($projectstatic);
|
||||
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($projectstatic->public?'projectpub':'project'));
|
||||
|
||||
$param=($mode=='mine'?'&mode=mine':'');
|
||||
|
||||
@ -185,28 +201,28 @@ if ($id > 0 || ! empty($ref))
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (! $user->rights->projet->all->lire)
|
||||
{
|
||||
$projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,0);
|
||||
$project->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,0);
|
||||
$projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||
}
|
||||
print $form->showrefnav($project,'ref','',1,'ref','ref','',$param);
|
||||
print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$project->title.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$projectstatic->title.'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td>';
|
||||
if (! empty($project->societe->id)) print $project->societe->getNomUrl(1);
|
||||
if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($project->public) print $langs->trans('SharedProject');
|
||||
if ($projectstatic->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$project->getLibStatut(4).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$projectstatic->getLibStatut(4).'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -215,48 +231,48 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
$head=task_prepare_head($task);
|
||||
$head=task_prepare_head($object);
|
||||
dol_fiche_head($head, 'task_time', $langs->trans("Task"),0,'projecttask');
|
||||
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
if ($action == 'deleteline')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"].'&lineid='.$_GET["lineid"],$langs->trans("DeleteATimeSpent"),$langs->trans("ConfirmDeleteATimeSpent"),"confirm_delete",'','',1);
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id.'&lineid='.$_GET["lineid"].($withproject?'&withproject=1':''),$langs->trans("DeleteATimeSpent"),$langs->trans("ConfirmDeleteATimeSpent"),"confirm_delete",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$param=($withproject?'&withproject=1':'');
|
||||
$linkback=$withproject?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$project->id.'">'.$langs->trans("BackToList").'</a>':'';
|
||||
$linkback=$withproject?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>':'';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">';
|
||||
print $langs->trans("Ref");
|
||||
print '</td><td colspan="3">';
|
||||
if (! GETPOST('withproject') || empty($project->id))
|
||||
if (! GETPOST('withproject') || empty($projectstatic->id))
|
||||
{
|
||||
$projectsListId = $project->getProjectsAuthorizedForUser($user,$mine,1);
|
||||
$task->next_prev_filter=" fk_projet in (".$projectsListId.")";
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1);
|
||||
$object->next_prev_filter=" fk_projet in (".$projectsListId.")";
|
||||
}
|
||||
else $task->next_prev_filter=" fk_projet = ".$project->id;
|
||||
print $form->showrefnav($task,'id',$linkback,1,'rowid','ref','',$param);
|
||||
else $object->next_prev_filter=" fk_projet = ".$projectstatic->id;
|
||||
print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param);
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$task->label.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$object->label.'</td></tr>';
|
||||
|
||||
// Project
|
||||
if (empty($withproject))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
||||
print $project->getNomUrl(1);
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Third party
|
||||
print '<td>'.$langs->trans("Company").'</td><td>';
|
||||
if ($project->societe->id) print $project->societe->getNomUrl(1);
|
||||
if ($projectstatic->societe->id) print $projectstatic->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -273,10 +289,11 @@ if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
print '<br>';
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$task->id.'">';
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="addtimespent">';
|
||||
print '<input type="hidden" name="id" value="'.$task->id.'">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
print '<input type="hidden" name="withproject" value="'.$withproject.'">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
@ -298,7 +315,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
// Contributor
|
||||
print '<td nowrap="nowrap">';
|
||||
$contactoftask=$task->getListContactId('internal');
|
||||
$contactoftask=$object->getListContactId('internal');
|
||||
print img_object('','user');
|
||||
print $form->select_users($_POST["userid"]?$_POST["userid"]:$user->id,'userid',0,'',0,'',$contactoftask);
|
||||
print '</td>';
|
||||
@ -329,7 +346,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$sql.= ", u.name, u.firstname";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE t.fk_task =".$task->id;
|
||||
$sql .= " WHERE t.fk_task =".$object->id;
|
||||
$sql .= " AND t.fk_user = u.rowid";
|
||||
$sql .= " ORDER BY t.task_date DESC";
|
||||
|
||||
@ -353,10 +370,10 @@ if ($id > 0 || ! empty($ref))
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$task->id.'">';
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="updateline">';
|
||||
print '<input type="hidden" name="id" value="'.$task->id.'">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -427,7 +444,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
// Edit and delete icon
|
||||
print '<td align="center" valign="middle" width="80">';
|
||||
if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid)
|
||||
if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid)
|
||||
{
|
||||
print '<input type="hidden" name="lineid" value="'.$_GET['lineid'].'">';
|
||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
@ -437,12 +454,12 @@ if ($id > 0 || ! empty($ref))
|
||||
else if ($user->rights->projet->creer)
|
||||
{
|
||||
print ' ';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$task->id.'&action=editline&lineid='.$task_time->rowid.'">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editline&lineid='.$task_time->rowid.($withproject?'&withproject=1':'').'">';
|
||||
print img_edit();
|
||||
print '</a>';
|
||||
|
||||
print ' ';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$task->id.'&action=deleteline&lineid='.$task_time->rowid.'">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deleteline&lineid='.$task_time->rowid.($withproject?'&withproject=1':'').'">';
|
||||
print img_delete();
|
||||
print '</a>';
|
||||
}
|
||||
@ -460,7 +477,7 @@ if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
BIN
htdocs/theme/eldy/img/liste_titre.png
Normal file
BIN
htdocs/theme/eldy/img/liste_titre.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 312 B |
BIN
htdocs/theme/eldy/img/liste_titre2.png
Executable file
BIN
htdocs/theme/eldy/img/liste_titre2.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 304 B |
@ -154,6 +154,10 @@ print 'colorbacklinepair1='.$colorbacklinepair1."\n";
|
||||
print 'colorbacklinepair2='.$colorbacklinepair2."\n";
|
||||
print '*/'."\n";
|
||||
|
||||
$usecss3=true;
|
||||
if ($conf->browser->name == 'ie' && round($conf->browser->version,2) < 10) $usecss3=false;
|
||||
elseif ($conf->browser->name == 'iceweasel') $usecss3=false;
|
||||
elseif ($conf->browser->name == 'epiphany') $usecss3=false;
|
||||
?>
|
||||
|
||||
/* ============================================================================== */
|
||||
@ -356,13 +360,17 @@ div.tmenu {
|
||||
font-weight: normal;
|
||||
height: <?php print $heightmenu; ?>px;
|
||||
|
||||
/* DYN */
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorback1; ?>) 75%, rgb(<?php echo $colorback2; ?>) 100%);
|
||||
background-image: -o-linear-gradient(bottom, rgb(<?php echo $colorback1; ?>) 75%, rgb(<?php echo $colorback2; ?>) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(<?php echo $colorback1; ?>) 75%, rgb(<?php echo $colorback2; ?>) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(<?php echo $colorback1; ?>) 40%, rgb(<?php echo $colorback2; ?>) 60%, rgb(<?php echo $colorback1; ?>) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(<?php echo $colorback1; ?>) 75%, rgb(<?php echo $colorback2; ?>) 100%);
|
||||
|
||||
<?php if ($usecss3) { ?>
|
||||
background-image: -o-linear-gradient(bottom, rgb(<?php echo $colorback1; ?>) 75%, rgb(<?php echo $colorback2; ?>) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(<?php echo $colorback1; ?>) 75%, rgb(<?php echo $colorback2; ?>) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(<?php echo $colorback1; ?>) 40%, rgb(<?php echo $colorback2; ?>) 60%, rgb(<?php echo $colorback1; ?>) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(<?php echo $colorback1; ?>) 75%, rgb(<?php echo $colorback2; ?>) 100%);
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorback1; ?>) 75%, rgb(<?php echo $colorback2; ?>) 100%);
|
||||
<?php } else { ?>
|
||||
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/tmenu2.jpg' ?>);
|
||||
background-position:top;
|
||||
background-repeat:repeat-x;
|
||||
<?php } ?>
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
<?php } ?>
|
||||
@ -704,13 +712,17 @@ div.blockvmenupair, div.blockvmenuimpair
|
||||
padding-bottom: 3px;
|
||||
margin: 1px 0px 8px 2px;
|
||||
|
||||
/* DYN */
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -o-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
|
||||
<?php if ($usecss3) { ?>
|
||||
background-image: -o-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
<?php } else { ?>
|
||||
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/tmenu.jpg' ?>);
|
||||
background-position:top;
|
||||
background-repeat:repeat-x;
|
||||
<?php } ?>
|
||||
border-left: 1px solid #CCCCCC;
|
||||
border-right: 1px solid #BBBBBB;
|
||||
border-bottom: 1px solid #BBBBBB;
|
||||
@ -736,12 +748,13 @@ div.blockvmenusearch
|
||||
margin: 6px 0px 8px 2px;
|
||||
background: #E3E6E8;
|
||||
|
||||
/* DYN */
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -o-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
<?php if ($usecss3) { ?>
|
||||
background-image: -o-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
<?php } ?>
|
||||
|
||||
border-left: 1px solid #CCCCCC;
|
||||
border-right: 1px solid #BBBBBB;
|
||||
@ -769,12 +782,13 @@ div.blockvmenubookmarks
|
||||
margin: 6px 0px 8px 2px;
|
||||
background: #E3E6E8;
|
||||
|
||||
/* DYN */
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -o-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
<?php if ($usecss3) { ?>
|
||||
background-image: -o-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 85%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
<?php } ?>
|
||||
|
||||
border-left: 1px solid #CCCCCC;
|
||||
border-right: 1px solid #BBBBBB;
|
||||
@ -851,12 +865,16 @@ td.photo {
|
||||
/* ============================================================================== */
|
||||
|
||||
.toolbar {
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo '240,240,240'; ?>) 15%, rgb(<?php echo '255,255,255'; ?>) 100%) !important;
|
||||
<?php if ($usecss3) { ?>
|
||||
background-image: -o-linear-gradient(bottom, rgb(<?php echo '240,240,240'; ?>) 15%, rgb(<?php echo '255,255,255'; ?>) 100%) !important;
|
||||
background-image: -moz-linear-gradient(bottom, rgb(<?php echo '240,240,240'; ?>) 15%, rgb(<?php echo '255,255,255'; ?>) 100%) !important;
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(<?php echo '240,240,240'; ?>) 15%, rgb(<?php echo '255,255,255'; ?>) 100%) !important;
|
||||
background-image: -ms-linear-gradient(bottom, rgb(<?php echo '240,240,240'; ?>) 15%, rgb(<?php echo '255,255,255'; ?>) 100%) !important;
|
||||
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo '240,240,240'; ?>) 15%, rgb(<?php echo '255,255,255'; ?>) 100%) !important;
|
||||
<?php } else { ?>
|
||||
background-image: url(<?php echo DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tmenu2.jpg' ?>) !important;
|
||||
background-repeat: repeat-x !important;
|
||||
<?php } ?>
|
||||
border: 1px solid #CCC !important;
|
||||
|
||||
-moz-border-radius: 5px 5px 5px 5px !important;
|
||||
@ -1100,13 +1118,15 @@ div.tabBar {
|
||||
border-left: 1px solid #D0D0D0;
|
||||
border-top: 1px solid #D8D8D8;
|
||||
|
||||
/* DYN */
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorbacktabcard1; ?>) 25%, rgb(<?php echo $colorbacktabcard2; ?>) 100%);
|
||||
<?php if ($usecss3) { ?>
|
||||
background-image: -o-linear-gradient(bottom, rgb(<?php echo $colorbacktabcard1; ?>) 25%, rgb(<?php echo $colorbacktabcard2; ?>) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacktabcard1; ?>) 25%, rgb(<?php echo $colorbacktabcard2; ?>) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacktabcard1; ?>) 25%, rgb(<?php echo $colorbacktabcard2; ?>) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacktabcard1; ?>) 25%, rgb(<?php echo $colorbacktabcard2; ?>) 100%);
|
||||
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorbacktabcard1; ?>) 25%, rgb(<?php echo $colorbacktabcard2; ?>) 100%);
|
||||
<?php } else { ?>
|
||||
background: #dee7ec url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/tab_background.png' ?>) repeat-x;
|
||||
<?php } ?>
|
||||
-moz-box-shadow: 4px 4px 4px #CCC;
|
||||
-webkit-box-shadow: 4px 4px 4px #CCC;
|
||||
box-shadow: 4px 4px 4px #CCC;
|
||||
@ -1144,17 +1164,24 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
|
||||
border-<?php print $left; ?>: 1px solid #D8D8D8;
|
||||
border-top: 1px solid #D8D8D8;
|
||||
|
||||
/* DYN */
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 35%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
<?php if ($usecss3) { ?>
|
||||
background-image: -o-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 35%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 35%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 35%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 35%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorbacktab1; ?>) 35%, rgb(<?php echo $colorbacktab2; ?>) 100%);
|
||||
<?php } else { ?>
|
||||
background: #dee7ec;
|
||||
<?php } ?>
|
||||
}
|
||||
|
||||
a.tab#active {
|
||||
<?php if ($usecss3) { ?>
|
||||
border-bottom: 1px solid rgb(<?php echo $colorbacktabactive; ?>) !important;
|
||||
background-color: rgb(<?php echo $colorbacktabactive; ?>) !important;
|
||||
<?php } else { ?>
|
||||
background: #ffffff;
|
||||
<?php } ?>
|
||||
background-image: none !important;
|
||||
}
|
||||
a.tab:link, a.tab:visited, a.tab:hover, a.tab#active
|
||||
@ -1412,13 +1439,16 @@ div.liste_titre, tr.liste_titre, tr.liste_titre_sel
|
||||
height: 20px !important;
|
||||
background-repeat: repeat-x;
|
||||
|
||||
/* DYN */
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorbacktitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
<?php if ($usecss3) { ?>
|
||||
background-image: -o-linear-gradient(bottom, rgb(<?php echo $colorbacktitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacktitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacktitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacktitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorbacktitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
<?php } else { ?>
|
||||
background: #7699A9;
|
||||
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/liste_titre2.png' ?>);
|
||||
<?php } ?>
|
||||
color: #<?php echo $colortextmain; ?>;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
font-weight: normal;
|
||||
@ -1461,13 +1491,15 @@ tr.liste_total td {
|
||||
}
|
||||
|
||||
.impair {
|
||||
/* DYN */
|
||||
<?php if ($usecss3) { ?>
|
||||
background: linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
|
||||
<?php } else { ?>
|
||||
background: #eaeaea;
|
||||
<?php } ?>
|
||||
font-family: <?php print $fontlist ?>;
|
||||
border: 0px;
|
||||
margin-bottom: 1px;
|
||||
@ -1481,13 +1513,15 @@ tr.liste_total td {
|
||||
*/
|
||||
|
||||
.pair {
|
||||
/* DYN */
|
||||
<?php if ($usecss3) { ?>
|
||||
background: linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
|
||||
<?php } else { ?>
|
||||
background: #ffffff;
|
||||
<?php } ?>
|
||||
font-family: <?php print $fontlist ?>;
|
||||
border: 0px;
|
||||
margin-bottom: 1px;
|
||||
@ -1519,68 +1553,68 @@ div.tabBar .noborder {
|
||||
*/
|
||||
|
||||
.boxtable {
|
||||
-moz-box-shadow: 4px 4px 4px #CCC;
|
||||
-webkit-box-shadow: 4px 4px 4px #CCC;
|
||||
box-shadow: 4px 4px 4px #CCC;
|
||||
margin-bottom: 8px !important;
|
||||
-moz-box-shadow: 4px 4px 4px #CCC;
|
||||
-webkit-box-shadow: 4px 4px 4px #CCC;
|
||||
box-shadow: 4px 4px 4px #CCC;
|
||||
margin-bottom: 8px !important;
|
||||
}
|
||||
|
||||
|
||||
.box {
|
||||
padding-right: 0px;
|
||||
padding-left: 0px;
|
||||
padding-bottom: 4px;
|
||||
padding-right: 0px;
|
||||
padding-left: 0px;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
tr.box_titre {
|
||||
height: 20px;
|
||||
background: #7699A9;
|
||||
height: 20px;
|
||||
background: #7699A9;
|
||||
|
||||
/* DYN */
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorbackttitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
background-image: -o-linear-gradient(bottom, rgb(<?php echo $colorbacktitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacktitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacktitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacktitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
|
||||
background-repeat: repeat-x;
|
||||
color: #<?php echo $colortextmain; ?>;
|
||||
font-family: <?php print $fontlist ?>, sans-serif;
|
||||
font-weight: normal;
|
||||
border-bottom: 1px solid #FDFFFF;
|
||||
white-space: nowrap;
|
||||
<?php if ($usecss3) { ?>
|
||||
background-image: -o-linear-gradient(bottom, rgb(<?php echo $colorbacktitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacktitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacktitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacktitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorbackttitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
<?php } else { ?>
|
||||
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/liste_titre2.png' ?>);
|
||||
<?php } ?>
|
||||
background-repeat: repeat-x;
|
||||
color: #<?php echo $colortextmain; ?>;
|
||||
font-family: <?php print $fontlist ?>, sans-serif;
|
||||
font-weight: normal;
|
||||
border-bottom: 1px solid #FDFFFF;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
tr.box_impair {
|
||||
/* background: #e6ebed; */
|
||||
/* background: #f6f6f6; */
|
||||
|
||||
/* DYN */
|
||||
background: linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
|
||||
font-family: <?php print $fontlist ?>;
|
||||
<?php if ($usecss3) { ?>
|
||||
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
<?php } else { ?>
|
||||
background: #eaeaea;
|
||||
<?php } ?>
|
||||
font-family: <?php print $fontlist ?>;
|
||||
}
|
||||
|
||||
tr.box_pair {
|
||||
/* background: #d0d4d7; */
|
||||
/* background: #ffffff; */
|
||||
|
||||
/* DYN */
|
||||
background: linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
|
||||
font-family: <?php print $fontlist ?>;
|
||||
<?php if ($usecss3) { ?>
|
||||
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
<?php } else { ?>
|
||||
background: #ffffff;
|
||||
<?php } ?>
|
||||
font-family: <?php print $fontlist ?>;
|
||||
}
|
||||
|
||||
tr.fiche {
|
||||
font-family: <?php print $fontlist ?>;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user