Look and feel v12

This commit is contained in:
Laurent Destailleur 2020-02-25 13:28:11 +01:00
parent dbe770a24f
commit 61abfb95a5
4 changed files with 54 additions and 45 deletions

View File

@ -2175,7 +2175,8 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
if ($userAccess >= 0) if ($userAccess >= 0)
{ {
$projectstatic->ref = $objp->ref; $projectstatic->ref = $objp->ref;
$projectstatic->statut = $objp->status; $projectstatic->statut = $objp->status; // deprecated
$projectstatic->status = $objp->status;
$projectstatic->title = $objp->title; $projectstatic->title = $objp->title;
$projectstatic->datee = $db->jdate($objp->datee); $projectstatic->datee = $db->jdate($objp->datee);
$projectstatic->dateo = $db->jdate($objp->dateo); $projectstatic->dateo = $db->jdate($objp->dateo);

View File

@ -493,7 +493,7 @@ class Project extends CommonObject
if (empty($id) && empty($ref)) return -1; if (empty($id) && empty($ref)) return -1;
$sql = "SELECT rowid, ref, title, description, public, datec, opp_amount, budget_amount,"; $sql = "SELECT rowid, ref, title, description, public, datec, opp_amount, budget_amount,";
$sql .= " tms, dateo, datee, date_close, fk_soc, fk_user_creat, fk_user_modif, fk_user_close, fk_statut, fk_opp_status, opp_percent,"; $sql .= " tms, dateo, datee, date_close, fk_soc, fk_user_creat, fk_user_modif, fk_user_close, fk_statut as status, fk_opp_status, opp_percent,";
$sql .= " note_private, note_public, model_pdf, usage_opportunity, usage_task, usage_bill_time, usage_organize_event, entity"; $sql .= " note_private, note_public, model_pdf, usage_opportunity, usage_task, usage_bill_time, usage_organize_event, entity";
$sql .= " FROM ".MAIN_DB_PREFIX."projet"; $sql .= " FROM ".MAIN_DB_PREFIX."projet";
if (!empty($id)) if (!empty($id))
@ -534,7 +534,8 @@ class Project extends CommonObject
$this->user_modification_id = $obj->fk_user_modif; $this->user_modification_id = $obj->fk_user_modif;
$this->user_close_id = $obj->fk_user_close; $this->user_close_id = $obj->fk_user_close;
$this->public = $obj->public; $this->public = $obj->public;
$this->statut = $obj->fk_statut; $this->statut = $obj->status; // deprecated
$this->status = $obj->status;
$this->opp_status = $obj->fk_opp_status; $this->opp_status = $obj->fk_opp_status;
$this->opp_amount = $obj->opp_amount; $this->opp_amount = $obj->opp_amount;
$this->opp_percent = $obj->opp_percent; $this->opp_percent = $obj->opp_percent;
@ -994,7 +995,7 @@ class Project extends CommonObject
*/ */
public function getLibStatut($mode = 0) public function getLibStatut($mode = 0)
{ {
return $this->LibStatut($this->statut, $mode); return $this->LibStatut(isset($this->statut)?$this->statut:$this->status, $mode);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
@ -1055,6 +1056,9 @@ class Project extends CommonObject
if (!empty($this->datee)) if (!empty($this->datee))
$label .= ($label ? '<br>' : '').'<b>'.$langs->trans('DateEnd').': </b>'.dol_print_date($this->datee, 'day'); // The space must be after the : to not being explode when showing the title in img_picto $label .= ($label ? '<br>' : '').'<b>'.$langs->trans('DateEnd').': </b>'.dol_print_date($this->datee, 'day'); // The space must be after the : to not being explode when showing the title in img_picto
if ($moreinpopup) $label .= '<br>'.$moreinpopup; if ($moreinpopup) $label .= '<br>'.$moreinpopup;
if (isset($this->status)) {
$label .= '<br><b>'.$langs->trans("Status").":</b> ".$this->getLibStatut(5);
}
$url = ''; $url = '';
if ($option != 'nolink') if ($option != 'nolink')

View File

@ -172,8 +172,8 @@ print_projecttasks_array($db, $form, $socid, $projectsListId, 0, 0, $listofoppst
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">'; print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
// Latest modified projects // Latest modified projects
$sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut, p.tms as datem,"; $sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut as status, 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 .= " s.rowid as socid, s.nom as name, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.canvas, s.status as thirdpartystatus";
$sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql .= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
$sql .= " WHERE p.entity IN (".getEntity('project').")"; $sql .= " WHERE p.entity IN (".getEntity('project').")";
@ -208,6 +208,7 @@ if ($resql)
$projectstatic->dateo = $obj->dateo; $projectstatic->dateo = $obj->dateo;
$projectstatic->datep = $obj->datep; $projectstatic->datep = $obj->datep;
$projectstatic->thirdparty_name = $obj->name; $projectstatic->thirdparty_name = $obj->name;
$projectstatic->status = $obj->status;
$companystatic->id = $obj->socid; $companystatic->id = $obj->socid;
$companystatic->name = $obj->name; $companystatic->name = $obj->name;
@ -217,6 +218,7 @@ if ($resql)
$companystatic->code_client = $obj->code_client; $companystatic->code_client = $obj->code_client;
$companystatic->code_fournisseur = $obj->code_fournisseur; $companystatic->code_fournisseur = $obj->code_fournisseur;
$companystatic->canvas = $obj->canvas; $companystatic->canvas = $obj->canvas;
$companystatic->status = $obj->thirdpartystatus;
print '<table class="nobordernopadding"><tr class="nocellnopadd">'; print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td width="96" class="nobordernopadding nowrap">'; print '<td width="96" class="nobordernopadding nowrap">';
@ -243,7 +245,7 @@ if ($resql)
} }
print '</td>'; print '</td>';
print '<td>'.dol_print_date($db->jdate($obj->datem), 'day').'</td>'; print '<td>'.dol_print_date($db->jdate($obj->datem), 'day').'</td>';
print '<td class="right">'.$projectstatic->LibStatut($obj->fk_statut, 3).'</td>'; print '<td class="right">'.$projectstatic->LibStatut($obj->status, 3).'</td>';
print '</tr>'; print '</tr>';
$i++; $i++;
} }
@ -265,14 +267,14 @@ print_liste_field_titre("NbOfProjects", "", "", "", "", '', $sortfield, $sortord
print "</tr>\n"; print "</tr>\n";
$sql = "SELECT COUNT(p.rowid) as nb, SUM(p.opp_amount)"; $sql = "SELECT COUNT(p.rowid) as nb, SUM(p.opp_amount)";
$sql .= ", s.nom as name, s.rowid as socid"; $sql .= ", s.rowid as socid, s.nom as name, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.canvas, s.status";
$sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql .= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
$sql .= " WHERE p.entity IN (".getEntity('project').")"; $sql .= " WHERE p.entity IN (".getEntity('project').")";
$sql .= " AND p.fk_statut = 1"; $sql .= " AND p.fk_statut = 1";
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 ($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.")"; 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 .= " GROUP BY s.rowid, s.nom, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.canvas, s.status";
$sql .= $db->order($sortfield, $sortorder); $sql .= $db->order($sortfield, $sortorder);
//$sql .= $db->plimit($max + 1, 0); //$sql .= $db->plimit($max + 1, 0);
@ -299,6 +301,9 @@ if ($resql)
{ {
$companystatic->id = $obj->socid; $companystatic->id = $obj->socid;
$companystatic->name = $obj->name; $companystatic->name = $obj->name;
$companystatic->email = $obj->email;
$companystatic->status = $obj->status;
print $companystatic->getNomUrl(1); print $companystatic->getNomUrl(1);
} }
else else

View File

@ -6,41 +6,40 @@
/* ============================================================================== */ /* ============================================================================== */
:root { :root {
--colorbackhmenu1: rgb(<?php print $colorbackhmenu1; ?>); --colorbackhmenu1: rgb(<?php print $colorbackhmenu1; ?>);
--colorbackvmenu1: rgb(<?php print $colorbackvmenu1; ?>); --colorbackvmenu1: rgb(<?php print $colorbackvmenu1; ?>);
--colorbacktitle1: rgb(<?php print $colorbacktitle1; ?>); --colorbacktitle1: rgb(<?php print $colorbacktitle1; ?>);
--colorbacktabcard1: rgb(<?php print $colorbacktabcard1; ?>); --colorbacktabcard1: rgb(<?php print $colorbacktabcard1; ?>);
--colorbacktabactive: rgb(<?php print $colorbacktabactive; ?>); --colorbacktabactive: rgb(<?php print $colorbacktabactive; ?>);
--colorbacklineimpair1: rgb(<?php print $colorbacklineimpair1; ?>); --colorbacklineimpair1: rgb(<?php print $colorbacklineimpair1; ?>);
--colorbacklineimpair2: rgb(<?php print $colorbacklineimpair2; ?>); --colorbacklineimpair2: rgb(<?php print $colorbacklineimpair2; ?>);
--colorbacklinepair1: rgb(<?php print $colorbacklinepair1; ?>); --colorbacklinepair1: rgb(<?php print $colorbacklinepair1; ?>);
--colorbacklinepair2: rgb(<?php print $colorbacklinepair2; ?>); --colorbacklinepair2: rgb(<?php print $colorbacklinepair2; ?>);
--colorbacklinepairhover: rgb(<?php print $colorbacklinepairhover; ?>); --colorbacklinepairhover: rgb(<?php print $colorbacklinepairhover; ?>);
--colorbacklinepairchecked: rgb(<?php print $colorbacklinepairchecked; ?>); --colorbacklinepairchecked: rgb(<?php print $colorbacklinepairchecked; ?>);
--colorbackbody: rgb(<?php print $colorbackbody; ?>); --colorbackbody: rgb(<?php print $colorbackbody; ?>);
--colortexttitlenotab: rgb(<?php print $colortexttitlenotab; ?>); --colortexttitlenotab: rgb(<?php print $colortexttitlenotab; ?>);
--colortexttitle: rgb(<?php print $colortexttitle; ?>); --colortexttitle: rgb(<?php print $colortexttitle; ?>);
--colortext: rgb(<?php print $colortext; ?>); --colortext: rgb(<?php print $colortext; ?>);
--colortextlink: rgb(<?php print $colortextlink; ?>); --colortextlink: rgb(<?php print $colortextlink; ?>);
--colortextbackhmenu: #<?php echo $colortextbackhmenu; ?>; --colortextbackhmenu: #<?php echo $colortextbackhmenu; ?>;
--colortextbackvmenu: #<?php print $colortextbackvmenu; ?>) ; --colortextbackvmenu: #<?php print $colortextbackvmenu; ?>) ;
--listetotal: #551188; --listetotal: #551188;
--inputbackgroundcolor: #FFF; --inputbackgroundcolor: #FFF;
--inputbordercolor: rgba(0,0,0,.2); --inputbordercolor: rgba(0,0,0,.2);
--tooltipbgcolor: <?php print $toolTipBgColor; ?>; --tooltipbgcolor: <?php print $toolTipBgColor; ?>;
--tooltipfontcolor : <?php print $toolTipFontColor; ?>; --tooltipfontcolor : <?php print $toolTipFontColor; ?>;
--oddevencolor: #202020; --oddevencolor: #202020;
--colorboxstatsborder: #ddd; --colorboxstatsborder: #ddd;
--dolgraphbg: rgba(255,255,255,0); --dolgraphbg: rgba(255,255,255,0);
--fieldrequiredcolor: #000055; --fieldrequiredcolor: #000055;
--colortextbacktab: #<?php print $colortextbacktab; ?>) ; --colortextbacktab: #<?php print $colortextbacktab; ?>) ;
--colorboxiconbg: #eee; --colorboxiconbg: #eee;
--refidnocolor:#444; --refidnocolor:#444;
--tableforfieldcolor:#666; --tableforfieldcolor:#666;
--amountremaintopaycolor:#880000; --amountremaintopaycolor:#880000;
--amountpaymentcomplete:#008800; --amountpaymentcomplete:#008800;
--amountremaintopaybackcolor:none; --amountremaintopaybackcolor:none;
} }
<?php <?php
@ -124,7 +123,7 @@ select.vmenusearchselectcombo {
background-color: unset; background-color: unset;
} }
th.wrapcolumntitle.liste_titre:not(.maxwidthsearch), td.wrapcolumntitle.liste_titre:not(.maxwidthsearch) { table.liste th.wrapcolumntitle.liste_titre:not(.maxwidthsearch), table.liste td.wrapcolumntitle.liste_titre:not(.maxwidthsearch) {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
max-width: 120px; max-width: 120px;