Standardize interface
This commit is contained in:
parent
4f25bc5e3b
commit
0d192df1fd
@ -58,8 +58,7 @@ llxHeader("",$langs->trans("Orders"),$help_url);
|
||||
|
||||
print load_fiche_titre($langs->trans("OrdersArea"));
|
||||
|
||||
//print '<table width="100%" class="notopnoleftnoright">';
|
||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||
|
||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
|
||||
if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
|
||||
@ -141,7 +140,7 @@ if ($resql)
|
||||
{
|
||||
if (! $conf->use_javascript_ajax)
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$commandestatic->LibStatut($status,$bool,0).'</td>';
|
||||
print '<td align="right"><a href="list.php?viewstatut='.$status.'">'.(isset($vals[$status.$bool])?$vals[$status.$bool]:0).' ';
|
||||
@ -154,7 +153,6 @@ if ($resql)
|
||||
}
|
||||
}
|
||||
//if ($totalinprocess != $total)
|
||||
//print '<tr class="liste_total"><td>'.$langs->trans("Total").' ('.$langs->trans("CustomersOrdersRunning").')</td><td align="right">'.$totalinprocess.'</td></tr>';
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">'.$total.'</td></tr>';
|
||||
print "</table><br>";
|
||||
}
|
||||
@ -196,7 +194,7 @@ if (! empty($conf->commande->enabled))
|
||||
$var = true;
|
||||
while ($i < $num)
|
||||
{
|
||||
|
||||
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
$commandestatic->id=$obj->rowid;
|
||||
@ -220,7 +218,7 @@ if (! empty($conf->commande->enabled))
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td colspan="3">'.$langs->trans("NoOrder").'</td></tr>';
|
||||
}
|
||||
print "</table><br>";
|
||||
@ -228,7 +226,6 @@ if (! empty($conf->commande->enabled))
|
||||
}
|
||||
|
||||
|
||||
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
|
||||
|
||||
@ -268,7 +265,7 @@ if ($resql)
|
||||
$var = true;
|
||||
while ($i < $num)
|
||||
{
|
||||
|
||||
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
@ -349,7 +346,7 @@ if (! empty($conf->commande->enabled))
|
||||
$var = true;
|
||||
while ($i < $num)
|
||||
{
|
||||
|
||||
|
||||
$obj = $db->fetch_object($resql);
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowrap" width="20%">';
|
||||
@ -431,7 +428,7 @@ if (! empty($conf->commande->enabled))
|
||||
$var = true;
|
||||
while ($i < $num)
|
||||
{
|
||||
|
||||
|
||||
$obj = $db->fetch_object($resql);
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="20%" class="nowrap">';
|
||||
@ -479,7 +476,6 @@ if (! empty($conf->commande->enabled))
|
||||
}
|
||||
|
||||
|
||||
//print '</td></tr></table>';
|
||||
print '</div></div></div>';
|
||||
|
||||
|
||||
|
||||
@ -209,6 +209,8 @@ OppStatusPENDING=Pending
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
LatestProjects=Latest %s projects
|
||||
LatestModifiedProjects=Latest %s modified projects
|
||||
# Comments trans
|
||||
AllowCommentOnTask=Allow user comments on tasks
|
||||
AllowCommentOnProject=Allow user comments on projects
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
@ -50,12 +51,14 @@ $sortorder = GETPOST("sortorder",'alpha');
|
||||
* View
|
||||
*/
|
||||
|
||||
$socstatic=new Societe($db);
|
||||
$companystatic=new Societe($db);
|
||||
$projectstatic=new Project($db);
|
||||
$userstatic=new User($db);
|
||||
$form=new Form($db);
|
||||
$formfile=new FormFile($db);
|
||||
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,($mine?$mine:(empty($user->rights->projet->all->lire)?0:2)),1);
|
||||
$projectset = ($mine?$mine:(empty($user->rights->projet->all->lire)?0:2));
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, $projetset, 1);
|
||||
//var_dump($projectsListId);
|
||||
|
||||
|
||||
@ -160,6 +163,91 @@ print_projecttasks_array($db, $form, $socid, $projectsListId, 0, 0, $listofoppst
|
||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
|
||||
|
||||
$max=5;
|
||||
|
||||
// Last modified projects
|
||||
$sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut, p.tms as datem,";
|
||||
$sql.= " s.rowid as socid, s.nom as name, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.canvas";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
|
||||
$sql.= " WHERE p.entity IN (".getEntity('project').")";
|
||||
if ($mine || empty($user->rights->projet->all->lire)) $sql.= " AND p.rowid IN (".$projectsListId.")"; // If we have this test true, it also means projectset is not 2
|
||||
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
||||
$sql.= " ORDER BY p.tms DESC";
|
||||
$sql.= $db->plimit($max, 0);
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th colspan="4">'.$langs->trans("LatestModifiedProjects",$max).'</th></tr>';
|
||||
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num)
|
||||
{
|
||||
$i = 0;
|
||||
$var = true;
|
||||
while ($i < $num)
|
||||
{
|
||||
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="20%" class="nowrap">';
|
||||
|
||||
$projectstatic->id=$obj->rowid;
|
||||
$projectstatic->ref=$obj->ref;
|
||||
$projectstatic->title=$obj->title;
|
||||
$projectstatic->dateo=$obj->dateo;
|
||||
$projectstatic->datep=$obj->datep;
|
||||
$projectstatic->thirdparty_name=$obj->name;
|
||||
|
||||
$companystatic->id=$obj->socid;
|
||||
$companystatic->name=$obj->name;
|
||||
$companystatic->email=$obj->email;
|
||||
$companystatic->client=$obj->client;
|
||||
$companystatic->fournisseur=$obj->fournisseur;
|
||||
$companystatic->code_client=$obj->code_client;
|
||||
$companystatic->code_fournisseur=$obj->code_fournisseur;
|
||||
$companystatic->canvas=$obj->canvas;
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
print '<td width="96" class="nobordernopadding nowrap">';
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
print '<td width="16" class="nobordernopadding nowrap">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
print $formfile->getDocumentsLink($projectstatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</td>';
|
||||
|
||||
print '<td class="nowrap">';
|
||||
if ($companystatic->id > 0)
|
||||
{
|
||||
print $companystatic->getNomUrl(1,'company',16);
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>'.dol_print_date($db->jdate($obj->datem),'day').'</td>';
|
||||
print '<td align="right">'.$projectstatic->LibStatut($obj->fk_statut,5).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
print "</table><br>";
|
||||
}
|
||||
else dol_print_error($db);
|
||||
|
||||
|
||||
// Open project per thirdparty
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -171,10 +259,10 @@ $sql = "SELECT COUNT(p.rowid) as nb, SUM(p.opp_amount)";
|
||||
$sql.= ", s.nom as name, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
$sql.= " WHERE p.entity IN (".getEntity('project', $conf->entity).")";
|
||||
$sql.= " AND p.fk_statut = 1";
|
||||
if ($mine || empty($user->rights->projet->all->lire)) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
||||
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
||||
if ($mine || empty($user->rights->projet->all->lire)) $sql.= " AND p.rowid IN (".$projectsListId.")"; // If we have this test true, it also means projectset is not 2
|
||||
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
||||
$sql.= " GROUP BY s.nom, s.rowid";
|
||||
$sql.= $db->order($sortfield, $sortorder);
|
||||
|
||||
@ -193,9 +281,9 @@ if ( $resql )
|
||||
print '<td class="nowrap">';
|
||||
if ($obj->socid)
|
||||
{
|
||||
$socstatic->id=$obj->socid;
|
||||
$socstatic->name=$obj->name;
|
||||
print $socstatic->getNomUrl(1);
|
||||
$companystatic->id=$obj->socid;
|
||||
$companystatic->name=$obj->name;
|
||||
print $companystatic->getNomUrl(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -1753,6 +1753,8 @@ table.login_table_securitycode tr td {
|
||||
|
||||
div.backgroundsemitransparent {
|
||||
background:rgba(255,255,255,0.6);
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
div.login_block {
|
||||
position: absolute;
|
||||
|
||||
@ -1117,6 +1117,8 @@ div.login_block {
|
||||
|
||||
div.backgroundsemitransparent {
|
||||
background:rgba(255,255,255,0.6);
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
div.login_block {
|
||||
/* position: initial !important;*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user