forked from Wavyzz/dolibarr
Support of preview for pdf with several pages
This commit is contained in:
@@ -3692,8 +3692,6 @@ else if ($id > 0 || ! empty($ref))
|
||||
print '<td class="liste_titre" width="18"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
$var = true;
|
||||
|
||||
// Payments already done (from payment on this invoice)
|
||||
$sql = 'SELECT p.datep as dp, p.ref, p.num_paiement, p.rowid, p.fk_bank,';
|
||||
$sql .= ' c.code as payment_code, c.libelle as payment_label,';
|
||||
@@ -3715,8 +3713,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
if ($num > 0) {
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object($result);
|
||||
$var = ! $var;
|
||||
print '<tr ' . $bc[$var] . '><td>';
|
||||
print '<tr class="oddeven"><td>';
|
||||
$paymentstatic->id = $objp->rowid;
|
||||
$paymentstatic->datepaye = $db->jdate($objp->dp);
|
||||
$paymentstatic->ref = $objp->ref;
|
||||
@@ -3741,9 +3738,10 @@ else if ($id > 0 || ! empty($ref))
|
||||
print '</tr>';
|
||||
$i ++;
|
||||
}
|
||||
} else {
|
||||
print '<tr ' . $bc[false] . '><td colspan="' . $nbcols . '" class="opacitymedium">' . $langs->trans("None") . '</td><td></td><td></td></tr>';
|
||||
}
|
||||
/*else {
|
||||
print '<tr class="oddeven"><td colspan="' . $nbcols . '" class="opacitymedium">' . $langs->trans("None") . '</td><td></td><td></td></tr>';
|
||||
}*/
|
||||
// }
|
||||
$db->free($result);
|
||||
} else {
|
||||
|
||||
@@ -1090,16 +1090,13 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
// Si fichier png PDF de plus d'1 page trouve
|
||||
elseif (file_exists($fileimagebis))
|
||||
{
|
||||
$preview = preg_replace('/\.png/','',$relativepath) . "-0.png";
|
||||
if (file_exists($dir_output.$preview))
|
||||
{
|
||||
$preview = preg_replace('/\.png/','',$relativepathimage) . "-0.png";
|
||||
$phototoshow = '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref">';
|
||||
$phototoshow.= '<img height="70" class="photo photowithmargin" src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercu'.$modulepart.'&file='.urlencode($preview).'"><p>';
|
||||
$phototoshow.= '</div></div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (! $phototoshow)
|
||||
{
|
||||
$phototoshow = $form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos);
|
||||
|
||||
@@ -56,7 +56,7 @@ if (in_array($object->element,array('propal', 'supplier_proposal','facture','fac
|
||||
$nolinesbefore=(count($this->lines) == 0 || $forcetoshowtitlelines);
|
||||
if ($nolinesbefore) {
|
||||
?>
|
||||
<tr class="liste_titre<?php echo (($nolinesbefore || $object->element=='contrat')?'':' liste_titre_add') ?> nodrag nodrop">
|
||||
<tr class="liste_titre<?php echo (($nolinesbefore || $object->element=='contrat')?'':' liste_titre_add_') ?> nodrag nodrop">
|
||||
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
||||
<td class="linecolnum" align="center"></td>
|
||||
<?php } ?>
|
||||
@@ -114,7 +114,7 @@ if ($nolinesbefore) {
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr class="pair nodrag nodrop nohoverpair<?php echo ($nolinesbefore || $object->element=='contrat')?'':' liste_titre_add'; ?>">
|
||||
<tr class="pair nodrag nodrop nohoverpair<?php echo ($nolinesbefore || $object->element=='contrat')?'':' liste_titre_create'; ?>">
|
||||
<?php
|
||||
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
||||
$coldisplay=2;
|
||||
|
||||
@@ -2281,6 +2281,12 @@ table.paddingtopbottomonly tr td {
|
||||
tr.liste_titre_filter td.liste_titre {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
.liste_titre_create td, .liste_titre_create th, .liste_titre_create .tagtd
|
||||
{
|
||||
/*border-top-width: 1px;
|
||||
border-top-color: rgb(<?php echo $colortopbordertitle1 ?>);
|
||||
border-top-style: solid;*/
|
||||
}
|
||||
.liste_titre_add td, .liste_titre_add th, .liste_titre_add .tagtd
|
||||
{
|
||||
border-top-width: 2px;
|
||||
|
||||
Reference in New Issue
Block a user