From 644486b4a0549ec4b7af8a4aacb305f822a7802e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Fri, 14 Jul 2017 13:28:21 +0200 Subject: [PATCH] Fix css --- htdocs/fourn/card.php | 25 ++++++++++++------------- htdocs/theme/eldy/style.css.php | 2 +- htdocs/theme/md/style.css.php | 2 +- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index e5e42042015..36910458aa3 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -375,12 +375,6 @@ if ($object->id > 0) if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { $langs->load("products"); - print '<table class="noborder" width="100%">'; - print '<tr class="liste_titre">'; - print '<td colspan="3">'.$langs->trans("ProductsAndServices").'</td><td align="right">'; - print '<a class="notasortlink" href="'.DOL_URL_ROOT.'/fourn/product/list.php?fourn_id='.$object->id.'">'.$langs->trans("AllProductServicePrices").' <span class="badge">'.$object->nbOfProductRefs().'</span>'; - print '</a></td></tr>'; - //Query from product/liste.php $sql = 'SELECT p.rowid, p.ref, p.label, p.fk_product_type, p.entity,'; $sql.= ' pfp.tms, pfp.ref_fourn as supplier_ref, pfp.price, pfp.quantity, pfp.unitprice'; @@ -394,16 +388,21 @@ if ($object->id > 0) $query = $db->query($sql); if (! $query) dol_print_error($db); - $return = array(); + $num = $db->num_rows($query); - if ($db->num_rows($query)) { + print '<table class="noborder" width="100%">'; + print '<tr class="liste_titre'.(($num == 0) ? ' nobottom':'').'">'; + print '<td colspan="3">'.$langs->trans("ProductsAndServices").'</td><td align="right">'; + print '<a class="notasortlink" href="'.DOL_URL_ROOT.'/fourn/product/list.php?fourn_id='.$object->id.'">'.$langs->trans("AllProductServicePrices").' <span class="badge">'.$object->nbOfProductRefs().'</span>'; + print '</a></td></tr>'; + $return = array(); + if ($num > 0) + { $productstatic = new Product($db); - while ($objp = $db->fetch_object($query)) { - - - + while ($objp = $db->fetch_object($query)) + { $productstatic->id = $objp->rowid; $productstatic->ref = $objp->ref; $productstatic->label = $objp->label; @@ -467,7 +466,7 @@ if ($object->id > 0) print '<tr class="liste_titre">'; print '<td colspan="3">'; - print '<table class="nobordernopadding" width="100%"><tr><td>'.$langs->trans("LastSupplierProposals",($num<$MAXLIST?"":$MAXLIST)).'</td>'; + print '<table class="nobordernopadding centpercent"><tr><td>'.$langs->trans("LastSupplierProposals",($num<$MAXLIST?"":$MAXLIST)).'</td>'; print '<td align="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/supplier_proposal/list.php?socid='.$object->id.'">'.$langs->trans("AllPriceRequests").' <span class="badge">'.$num.'</span></td>'; print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/supplier_proposal/stats/index.php?mode=supplier&socid='.$object->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>'; print '</tr></table>'; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 1136e1c1fc4..b82fd096cfe 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2607,7 +2607,7 @@ form.tagtr:last-of-type div.tagtd, tr.pair:last-of-type td, tr.impair:last-of-ty tr.pair td .nobordernopadding tr td, tr.impair td .nobordernopadding tr td { border-bottom: 0px !important; } -td.nobottom, td.nobottom { +tr.nobottom td, tr.nobottom , td.nobottom { border-bottom: 0px !important; } div.liste_titre .tagtd { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 978b093fc9d..fb774e8793b 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2684,7 +2684,7 @@ tr.pair:last-of-type td, tr.impair:last-of-type td { tr.pair td .nobordernopadding tr td, tr.impair td .nobordernopadding tr td { border-bottom: 0px !important; } -td.nobottom, td.nobottom { +tr.nobottom td, tr.nobottom , td.nobottom { border-bottom: 0px !important; } div.liste_titre .tagtd { -- GitLab