Look: Enhancements into themes.

This commit is contained in:
Laurent Destailleur 2011-11-03 01:59:13 +01:00
parent 9444e8d63d
commit 7f0cca8fb9
9 changed files with 118 additions and 91 deletions

View File

@ -471,8 +471,6 @@ if ($socid > 0)
//var_dump($proposals);
print '<table class="noborder" width="100%">';
$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 '<tr class="liste_titre">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastPropals",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/comm/propal.php?socid='.$objsoc->id.'">'.$langs->trans("AllPropals").' ('.$num.')</a></td>';
print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?socid='.$objsoc->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>';
print '</tr></table></td>';
@ -512,12 +512,13 @@ if ($socid > 0)
$i++;
}
$db->free($resql);
if ($num > 0) print "</table>";
}
else
{
dol_print_error($db);
}
print "</table>";
}
/*
@ -527,8 +528,6 @@ if ($socid > 0)
{
$commande_static=new Commande($db);
print '<table class="noborder" width="100%">';
$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 '<tr class="liste_titre">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastOrders",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/commande/liste.php?socid='.$objsoc->id.'">'.$langs->trans("AllOrders").' ('.$num.')</a></td>';
print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/commande/stats/index.php?socid='.$objsoc->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>';
print '</tr></table></td>';
@ -565,12 +566,13 @@ if ($socid > 0)
$i++;
}
$db->free($resql);
if ($num >0) print "</table>";
}
else
{
dol_print_error($db);
}
print "</table>";
}
/*
@ -580,8 +582,6 @@ if ($socid > 0)
{
$contratstatic=new Contrat($db);
print '<table class="noborder" width="100%">';
$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 '<tr class="liste_titre">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastContracts",($num<=$MAXLIST?"":$MAXLIST)).'</td>';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/contrat/liste.php?socid='.$objsoc->id.'">'.$langs->trans("AllContracts").' ('.$num.')</a></td></tr></table></td>';
print '</tr>';
@ -623,12 +625,13 @@ if ($socid > 0)
$i++;
}
$db->free($resql);
if ($num > 0) print "</table>";
}
else
{
dol_print_error($db);
}
print "</table>";
}
/*
@ -636,8 +639,6 @@ if ($socid > 0)
*/
if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire)
{
print '<table class="noborder" width="100%">';
$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 '<tr class="liste_titre">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastInterventions",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/fichinter/list.php?socid='.$objsoc->id.'">'.$langs->trans("AllInterventions").' ('.$num.')</td></tr></table></td>';
print '</tr>';
$var=!$var;
@ -674,12 +677,13 @@ if ($socid > 0)
$i++;
}
$db->free($resql);
if ($num > 0) print "</table>";
}
else
{
dol_print_error($db);
}
print "</table>";
}
/*
@ -689,8 +693,6 @@ if ($socid > 0)
{
$facturestatic = new Facture($db);
print '<table class="noborder" width="100%">';
$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 '<table class="noborder" width="100%">';
$tableaushown=1;
print '<tr class="liste_titre">';
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastCustomersBills",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/compta/facture.php?socid='.$objsoc->id.'">'.$langs->trans("AllBills").' ('.$num.')</a></td>';
print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?socid='.$objsoc->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>';
@ -745,12 +749,13 @@ if ($socid > 0)
$i++;
}
$db->free($resql);
if ($num > 0) print "</table>";
}
else
{
dol_print_error($db);
}
print "</table>";
}
print "</td></tr>";

View File

@ -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 '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>';
print '<table class="nobordernopadding" width="100%"><tr><td nowrap="nowrap">';
print $langs->trans('RefCustomer').'</td><td align="left">';
print '</td>';
if ($action != 'refclient' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=refclient&amp;id='.$object->id.'">'.img_edit($langs->trans('Modify')).'</a></td>';
@ -1817,7 +1824,7 @@ else
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" size="16" name="search_societe" value="'.GETPOST('search_societe').'">';
print '</td>';
print '<td class="liste_titre" colspan="1" align="right">';
print '<td class="liste_titre" colspan="1" align="center">';
print $langs->trans('Month').': <input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
print '&nbsp;'.$langs->trans('Year').': ';
$syear = $year;

View File

@ -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 "";
}
}

View File

@ -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 '<table class="noborder" width="100%">';
$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 '<tr class="liste_titre">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastPropals",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/comm/propal.php?socid='.$societe->id.'">'.$langs->trans("AllPropals").' ('.$num.')</a></td>';
print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?socid='.$societe->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>';
print '</tr></table></td>';
@ -273,13 +273,14 @@ if ($socid > 0)
$i++;
}
$db->free();
if ($num > 0) print "</table>";
}
else
{
dol_print_error($db);
}
print "</table>";
}
print "</td></tr>";

View File

@ -253,11 +253,12 @@ if ( $societe->fetch($socid) )
{
$i = 0 ;
$num = $db->num_rows($resql);
print '<table class="noborder" width="100%">';
if ($num > 0)
{
print '<tr class="liste_titre">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="3">';
print '<table class="nobordernopadding" width="100%"><tr><td>'.$langs->trans("LastOrders",($num<$MAXLIST?"":$MAXLIST)).'</td>';
print '<td align="right"><a href="commande/liste.php?socid='.$societe->id.'">'.$langs->trans("AllOrders").' ('.$num.')</td>';
@ -288,7 +289,8 @@ if ( $societe->fetch($socid) )
$i++;
}
$db->free($resql);
print "</table>";
if ($num >0) print "</table>";
}
else
{
@ -318,10 +320,11 @@ if ( $societe->fetch($socid) )
{
$i = 0 ;
$num = $db->num_rows($resql);
print '<table class="noborder" width="100%">';
if ($num > 0)
{
print '<tr class="liste_titre">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="4">';
print '<table class="nobordernopadding" width="100%"><tr><td>'.$langs->trans('LastSuppliersBills',($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="facture/index.php?socid='.$societe->id.'">'.$langs->trans('AllBills').' ('.$num.')</td>';
print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?mode=supplier&socid='.$societe->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>';
@ -345,7 +348,7 @@ if ( $societe->fetch($socid) )
$i++;
}
$db->free($resql);
print '</table>';
if ($num > 0) print '</table>';
}
else
{

View File

@ -98,7 +98,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
*/
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Informations").'</td></tr>';
print '<tr class="liste_titre"><th class="liste_titre" colspan="2">'.$langs->trans("Informations").'</th></tr>';
print '<tr '.$bc[false].'>';
print '<td nowrap="nowrap">'.$langs->trans("User").'</td><td>'.$user->getNomUrl(0).'</td></tr>';
print '<tr '.$bc[true].'>';
@ -123,8 +123,8 @@ if ($user->societe_id == 0)
print '<br>';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("DolibarrStateBoard").'</td>';
print '<td align="right">&nbsp;</td>';
print '<th class="liste_titre" colspan="2">'.$langs->trans("DolibarrStateBoard").'</th>';
print '<th class="liste_titre" align="right">&nbsp;</th>';
print '</tr>';
$var=true;
@ -266,12 +266,12 @@ $dashboardlines=array();
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("DolibarrWorkBoard").'</td>';
print '<td align="right">'.$langs->trans("Number").'</td>';
print '<td align="right">'.$langs->trans("Late").'</td>';
print '<td>&nbsp;</td>';
print '<td width="20">&nbsp;</td>';
if ($showweather) print '<td width="80">&nbsp;</td>';
print '<th class="liste_titre"colspan="2">'.$langs->trans("DolibarrWorkBoard").'</th>';
print '<th class="liste_titre"align="right">'.$langs->trans("Number").'</th>';
print '<th class="liste_titre"align="right">'.$langs->trans("Late").'</th>';
print '<th class="liste_titre">&nbsp;</th>';
print '<th class="liste_titre"width="20">&nbsp;</th>';
if ($showweather) print '<th class="liste_titre" width="80">&nbsp;</th>';
print '</tr>';

View File

@ -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

View File

@ -62,7 +62,7 @@ print '<form method="post" action="'.DOL_URL_ROOT.'/societe/societe.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\">";
print '<td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<th colspan="3">'.$langs->trans("Search").'</th></tr>';
print "<tr $bc[0]><td>";
print $langs->trans("Name").':</td><td><input class="flat" type="text" size="14" name="search_nom_only"></td>';
print '<td rowspan="'.$rowspan.'"><input type="submit" class="button" value="'.$langs->trans("Search").'"></td></tr>';
@ -103,7 +103,7 @@ if ($result)
else dol_print_error($db);
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").'</td></tr>';
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").'</th></tr>';
if ($conf->use_javascript_ajax && ((round($third['prospect'])?1:0)+(round($third['customer'])?1:0)+(round($third['supplier'])?1:0) >= 2))
{
print '<tr><td align="center">';
@ -176,9 +176,9 @@ if ($result)
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$transRecordedType.'</td>';
print '<td>&nbsp;</td>';
print '<td align="right">'.$langs->trans('Status').'</td>';
print '<tr class="liste_titre"><th colspan="2">'.$transRecordedType.'</td>';
print '<th>&nbsp;</td>';
print '<th align="right">'.$langs->trans('Status').'</td>';
print '</tr>';
$var=True;

View File

@ -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(<?php echo $img_liste_titre ?>);
background-repeat: repeat-x;
color: #334444;
background: -moz-radial-gradient(circle, #e4e6e6, #f0f0f0);
background: -webkit-radial-gradient(circle, #e4e6e6, #f0f0f0);
background-image: url(<?php echo $img_liste_titre ?>) !important;
color: #234046;
font-family: <?php print $fontlist ?>;
font-weight: normal;
border-bottom: 1px solid #FDFFFF;
white-space: nowrap;
text-align: <?php echo $left; ?>;
}
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(<?php echo $img_liste_titre ?>);
background-repeat: repeat-x;
color: #334444;
/*border-top: 1px solid #DDDDDD;*/
font-family: <?php print $fontlist ?>;
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(<?php echo $img_liste_titre ?>);
background-repeat: repeat-x;
color: #F5FFFF;
color: #FFFFFF !important;
font-family: <?php print $fontlist ?>;
font-weight: normal;
border-bottom: 1px solid #FDFFFF;
white-space: nowrap;
}
input.liste_titre {
background: #7699A9;
background-image: url(<?php echo $img_liste_titre ?>);
background-repeat: repeat-x;
border: 0px;
/*background: #7699A9;*/
/*background-image: url(<?php echo $img_liste_titre ?>);*/
/*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: <?php print $fontlist ?>;
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: <?php print $fontlist ?>;
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: <?php print $fontlist ?>;
}
tr.box_pair {
/* background: #d0d4d7; */
background: #f4f4f4;
background: #ffffff;
background: -moz-linear-gradient(top, #ffffff, #ffffff);
font-family: <?php print $fontlist ?>;
}
@ -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;
}