From 7f0cca8fb9459ca0ec84d813ac91a77df6f46eda Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Nov 2011 01:59:13 +0100 Subject: [PATCH] Look: Enhancements into themes. --- htdocs/comm/fiche.php | 45 +++++++------ htdocs/comm/propal.php | 13 +++- htdocs/comm/propal/class/propal.class.php | 18 +++--- htdocs/comm/prospect/fiche.php | 9 +-- htdocs/fourn/fiche.php | 15 +++-- htdocs/index.php | 18 +++--- htdocs/projet/index.php | 3 + htdocs/societe/index.php | 10 +-- htdocs/theme/eldy/style.css.php | 78 ++++++++++++----------- 9 files changed, 118 insertions(+), 91 deletions(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 40314836c4b..f310d23ca19 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -471,8 +471,6 @@ if ($socid > 0) //var_dump($proposals); - print ''; - $sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.fk_statut, p.total_ht, p.ref, p.remise, "; $sql.= " p.datep as dp, p.fin_validite as datelimite"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."c_propalst as c"; @@ -488,7 +486,9 @@ if ($socid > 0) if ($num > 0) { - print ''; + print '
'; + + print ''; print ''; @@ -512,12 +512,13 @@ if ($socid > 0) $i++; } $db->free($resql); + + if ($num > 0) print "
'; print ''; print '
'.$langs->trans("LastPropals",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllPropals").' ('.$num.')'.img_picto($langs->trans("Statistics"),'stats').'
"; } else { dol_print_error($db); } - print ""; } /* @@ -527,8 +528,6 @@ if ($socid > 0) { $commande_static=new Commande($db); - print ''; - $sql = "SELECT s.nom, s.rowid,"; $sql.= " c.rowid as cid, c.total_ht, c.ref, c.fk_statut, c.facture,"; $sql.= " c.date_commande as dc"; @@ -545,7 +544,9 @@ if ($socid > 0) if ($num > 0) { - print ''; + print '
'; + + print ''; print ''; @@ -565,12 +566,13 @@ if ($socid > 0) $i++; } $db->free($resql); + + if ($num >0) print "
'; print ''; print '
'.$langs->trans("LastOrders",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllOrders").' ('.$num.')'.img_picto($langs->trans("Statistics"),'stats').'
"; } else { dol_print_error($db); } - print ""; } /* @@ -580,8 +582,6 @@ if ($socid > 0) { $contratstatic=new Contrat($db); - print ''; - $sql = "SELECT s.nom, s.rowid, c.rowid as id, c.ref as ref, c.statut, c.datec as dc"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c"; $sql .= " WHERE c.fk_soc = s.rowid "; @@ -595,7 +595,9 @@ if ($socid > 0) $num = $db->num_rows($resql); if ($num >0 ) { - print ''; + print '
'; + + print ''; print ''; print ''; @@ -623,12 +625,13 @@ if ($socid > 0) $i++; } $db->free($resql); + + if ($num > 0) print "
'; print '
'.$langs->trans("LastContracts",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllContracts").' ('.$num.')
"; } else { dol_print_error($db); } - print ""; } /* @@ -636,8 +639,6 @@ if ($socid > 0) */ if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire) { - print ''; - $sql = "SELECT s.nom, s.rowid, f.rowid as id, f.ref, f.duree as duration, f.datei as startdate"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."fichinter as f"; $sql .= " WHERE f.fk_soc = s.rowid"; @@ -653,7 +654,9 @@ if ($socid > 0) $num = $db->num_rows($resql); if ($num > 0) { - print ''; + print '
'; + + print ''; print ''; print ''; $var=!$var; @@ -674,12 +677,13 @@ if ($socid > 0) $i++; } $db->free($resql); + + if ($num > 0) print "
'.$langs->trans("LastInterventions",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllInterventions").' ('.$num.')
"; } else { dol_print_error($db); } - print ""; } /* @@ -689,8 +693,6 @@ if ($socid > 0) { $facturestatic = new Facture($db); - print ''; - $sql = 'SELECT f.rowid as facid, f.facnumber, f.type, f.amount, f.total, f.total_ttc,'; $sql.= ' f.datef as df, f.datec as dc, f.paye as paye, f.fk_statut as statut,'; $sql.= ' s.nom, s.rowid as socid,'; @@ -711,7 +713,9 @@ if ($socid > 0) $i = 0; if ($num > 0) { - $tableaushown=1; + print '
'; + + $tableaushown=1; print ''; print '
'; print ''; @@ -745,12 +749,13 @@ if ($socid > 0) $i++; } $db->free($resql); + + if ($num > 0) print "
'.$langs->trans("LastCustomersBills",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllBills").' ('.$num.')'.img_picto($langs->trans("Statistics"),'stats').'
"; } else { dol_print_error($db); } - print "
"; } print ""; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 138b2d43763..2cb0bafa50f 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1050,11 +1050,18 @@ if ($id > 0 || ! empty($ref)) */ if ($action == 'validate') { + $error=0; + // on verifie si l'objet est en numerotation provisoire $ref = substr($object->ref, 1, 4); if ($ref == 'PROV') { $numref = $object->getNextNumRef($soc); + if (empty($numref)) + { + $error++; + dol_htmloutput_errors($object->error); + } } else { @@ -1070,7 +1077,7 @@ if ($id > 0 || ! empty($ref)) $text.=$notify->confirmMessage('NOTIFY_VAL_PROPAL',$object->socid); } - $formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate','',0,1); + if (! $error) $formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate','',0,1); } if (! $formconfirm) @@ -1094,7 +1101,7 @@ if ($id > 0 || ! empty($ref)) // Ref client print ''; - print '"; diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index a9a45f3c432..1db7e2c9b96 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -253,11 +253,12 @@ if ( $societe->fetch($socid) ) { $i = 0 ; $num = $db->num_rows($resql); - print '
'; + print ''; if ($action != 'refclient' && $object->brouillon) print ''; @@ -1817,7 +1824,7 @@ else print ''; - print '
'; print $langs->trans('RefCustomer').''; print ''.img_edit($langs->trans('Modify')).''; print ''; print ''; + print ''; print $langs->trans('Month').': '; print ' '.$langs->trans('Year').': '; $syear = $year; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index e553641f54c..62591e8251c 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -495,14 +495,14 @@ class Propal extends CommonObject $staticline=new PropaleLigne($this->db); $staticline->fetch($rowid); $this->line->oldline = $staticline; - + // Reorder if fk_parent_line change if (! empty($fk_parent_line) && ! empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line) { $rangmax = $this->line_max($fk_parent_line); $this->line->rang = $rangmax + 1; } - + $this->line->rowid = $rowid; $this->line->desc = $desc; $this->line->qty = $qty; @@ -530,7 +530,7 @@ class Propal extends CommonObject { // Reorder if child line if (! empty($fk_parent_line)) $this->line_order(true,'DESC'); - + $this->update_price(1); $this->fk_propal = $this->id; @@ -2265,10 +2265,11 @@ class Propal extends CommonObject /** - * \brief Renvoie la reference de propale suivante non utilisee en fonction du module - * de numerotation actif defini dans PROPALE_ADDON - * \param soc objet societe - * \return string reference libre pour la propale + * Renvoie la reference de propale suivante non utilisee en fonction du module + * de numerotation actif defini dans PROPALE_ADDON + * + * @param Societe $soc Object thirdparty + * @return string Reference libre pour la propale */ function getNextNumRef($soc) { @@ -2296,7 +2297,8 @@ class Propal extends CommonObject } else { - dol_print_error($db,"Propale::getNextNumRef ".$obj->error); + $this->error=$obj->error; + //dol_print_error($db,"Propale::getNextNumRef ".$obj->error); return ""; } } diff --git a/htdocs/comm/prospect/fiche.php b/htdocs/comm/prospect/fiche.php index 3e99e1addef..c581aab6fa0 100644 --- a/htdocs/comm/prospect/fiche.php +++ b/htdocs/comm/prospect/fiche.php @@ -37,7 +37,7 @@ $langs->load('projects'); $langs->load('propal'); // Security check -$socid = isset($_GET["socid"])?$_GET["socid"]:''; +$socid = GETPOST("socid"); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'societe',$socid,''); @@ -226,7 +226,6 @@ if ($socid > 0) { $propal_static=new Propal($db); - print ''; $sql = "SELECT s.nom, s.rowid as socid, p.rowid as propalid, p.fk_statut, p.total_ht, p.ref, p.remise, "; $sql.= " p.datep as dp, p.fin_validite as datelimite,"; $sql.= " c.label as statut, c.id as statutid"; @@ -248,7 +247,8 @@ if ($socid > 0) if ($num > 0) { - print ''; + print '
'; + print ''; print ''; @@ -273,13 +273,14 @@ if ($socid > 0) $i++; } $db->free(); + + if ($num > 0) print "
'; print ''; print '
'.$langs->trans("LastPropals",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllPropals").' ('.$num.')'.img_picto($langs->trans("Statistics"),'stats').'
"; } else { dol_print_error($db); } - print "
"; } print "
'; if ($num > 0) { - print ''; + print '
'; + + print ''; print '
'; print ''; print ''; @@ -288,7 +289,8 @@ if ( $societe->fetch($socid) ) $i++; } $db->free($resql); - print "
'.$langs->trans("LastOrders",($num<$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllOrders").' ('.$num.')
"; + + if ($num >0) print "
"; } else { @@ -318,10 +320,11 @@ if ( $societe->fetch($socid) ) { $i = 0 ; $num = $db->num_rows($resql); - print ''; if ($num > 0) { - print ''; + print '
'; + + print ''; print '
'; print ''; print ''; @@ -345,7 +348,7 @@ if ( $societe->fetch($socid) ) $i++; } $db->free($resql); - print '
'.$langs->trans('LastSuppliersBills',($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans('AllBills').' ('.$num.')'.img_picto($langs->trans("Statistics"),'stats').'
'; + if ($num > 0) print '
'; } else { diff --git a/htdocs/index.php b/htdocs/index.php index 9a0fd731a5f..42ce536bccb 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -98,7 +98,7 @@ print '
'; */ print ''; -print ''; +print ''; print ''; print ''; print ''; @@ -123,8 +123,8 @@ if ($user->societe_id == 0) print '
'; print '
'.$langs->trans("Informations").'
'.$langs->trans("Informations").'
'.$langs->trans("User").''.$user->getNomUrl(0).'
'; print ''; - print ''; - print ''; + print ''; + print ''; print ''; $var=true; @@ -266,12 +266,12 @@ $dashboardlines=array(); print '
'.$langs->trans("DolibarrStateBoard").' '.$langs->trans("DolibarrStateBoard").' 
'; print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -if ($showweather) print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +if ($showweather) print ''; print ''; diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index f692a2edf29..6efc3f1e058 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -38,6 +38,9 @@ $socid=0; if ($user->societe_id > 0) $socid=$user->societe_id; if (!$user->rights->projet->lire) accessforbidden(); +$sortfield = GETPOST("sortfield",'alpha'); +$sortorder = GETPOST("sortorder",'alpha'); + /* * View diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index 6afcd465ec5..bbd9938994d 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -62,7 +62,7 @@ print ''; print ''; print '
'.$langs->trans("DolibarrWorkBoard").''.$langs->trans("Number").''.$langs->trans("Late").'   '.$langs->trans("DolibarrWorkBoard").''.$langs->trans("Number").''.$langs->trans("Late").'   
'; print ""; -print ''; +print ''; print "'; print ''; @@ -103,7 +103,7 @@ if ($result) else dol_print_error($db); print '
'.$langs->trans("Search").'
'.$langs->trans("Search").'
"; print $langs->trans("Name").':
'; -print ''; +print ''; if ($conf->use_javascript_ajax && ((round($third['prospect'])?1:0)+(round($third['customer'])?1:0)+(round($third['supplier'])?1:0) >= 2)) { print '
'.$langs->trans("Statistics").'
'.$langs->trans("Statistics").'
'; @@ -176,9 +176,9 @@ if ($result) print ''; - print ''; - print ''; - print ''; + print ''; $var=True; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index e0908f3d37f..2b13d8ea4d2 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1147,8 +1147,8 @@ border-left: 1px solid #000000; table.noborder { width: 100%; -border-collapse: collapse; -border-top-color: #FEFEFE; +border-collapse: separate !important; +border-spacing: 0px; border-right-width: 1px; border-right-color: #BBBBBB; @@ -1163,10 +1163,15 @@ border-bottom-color: #BBBBBB; border-bottom-style: solid; margin: 0px 0px 2px 0px; +/*padding: 1px 2px 1px 2px;*/ -moz-box-shadow: 4px 4px 4px #CCC; -webkit-box-shadow: 4px 4px 4px #CCC; box-shadow: 4px 4px 4px #CCC; + +-moz-border-radius: 0.2em; +-webkit-border-radius: 0.2em; +border-radius: 0.2em; } table.noborder tr { @@ -1182,20 +1187,20 @@ border-left-style: solid; height: 18px; } -table.noborder td { -padding: 1px 2px 1px 1px; /* t r b l */ +table.noborder th, table.noborder td { +padding: 1px 2px 1px 3px; /* t r b l */ } table.nobordernopadding { -border-collapse: collapse; +border-collapse: collapse !important; border: 0px; } table.nobordernopadding tr { -border: 0px; +border: 0px !important; padding: 0px 0px; } table.nobordernopadding td { -border: 0px; +border: 0px !important; padding: 0px 0px; } @@ -1225,60 +1230,58 @@ table.liste td { padding-right: 2px; } -tr.liste_titre +tr.liste_titre, tr.liste_titre_sel { height: 20px !important; - background: #7699A9; - background-image: url(); background-repeat: repeat-x; - color: #334444; + background: -moz-radial-gradient(circle, #e4e6e6, #f0f0f0); + background: -webkit-radial-gradient(circle, #e4e6e6, #f0f0f0); + background-image: url() !important; + color: #234046; font-family: ; + font-weight: normal; border-bottom: 1px solid #FDFFFF; white-space: nowrap; text-align: ; } -th.liste_titre, td.liste_titre +tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre { - background: #7699A9; - background-image: url(); - background-repeat: repeat-x; - color: #334444; + /*border-top: 1px solid #DDDDDD;*/ font-family: ; font-weight: normal; border-bottom: 1px solid #FDFFFF; white-space: nowrap; } -th.liste_titre_sel, td.liste_titre_sel +tr.liste_titre_sel th, th.liste_titre_sel, tr.liste_titre_sel td, td.liste_titre_sel { - background: #7699A9; - background-image: url(); - background-repeat: repeat-x; - color: #F5FFFF; + color: #FFFFFF !important; font-family: ; font-weight: normal; border-bottom: 1px solid #FDFFFF; white-space: nowrap; } input.liste_titre { -background: #7699A9; -background-image: url(); -background-repeat: repeat-x; -border: 0px; + /*background: #7699A9;*/ + /*background-image: url();*/ + /*background-repeat: repeat-x;*/ + background: transparent; + border: 0px; } +tr.liste_total { + background: #F0F0F0; +} tr.liste_total td { -border-top: 1px solid #DDDDDD; -background: #F0F0F0; -background-repeat: repeat-x; -color: #332266; -font-weight: normal; -white-space: nowrap; + border-top: 1px solid #DDDDDD; + color: #332266; + font-weight: normal; + white-space: nowrap; } - .impair { /* background: #d0d4d7; */ background: #f6f6f6; +background: -moz-linear-gradient(top, #f2f2f2, #f8f8f8); font-family: ; border: 0px; margin-bottom: 1px; @@ -1293,6 +1296,7 @@ border: 0px; .pair { /* background: #e6ebed; */ background: #ffffff; +background: -moz-linear-gradient(top, #ffffff, #ffffff); font-family: ; border: 0px; margin-bottom: 1px; @@ -1336,13 +1340,15 @@ white-space: nowrap; tr.box_impair { /* background: #e6ebed; */ -background: #eaeaea; +background: #f6f6f6; +background: -moz-linear-gradient(top, #f2f2f2, #f8f8f8); font-family: ; } tr.box_pair { /* background: #d0d4d7; */ -background: #f4f4f4; +background: #ffffff; +background: -moz-linear-gradient(top, #ffffff, #ffffff); font-family: ; } @@ -1390,14 +1396,14 @@ div.error { /* Info admin */ div.info { - color: #A0A050; + color: #807050; padding: 0.2em 0.2em 0.2em 0.2em; margin: 0.5em 0em 0.5em 0em; border: 1px solid #DFDFA0; -moz-border-radius:6px; -webkit-border-radius: 6px; border-radius:6px; - background: #EFEFD4; + background: #EFEFDA; }
'.$transRecordedType.' '.$langs->trans('Status').'
'.$transRecordedType.''; + print ' '; + print ''.$langs->trans('Status').''; print '