2
0
forked from Wavyzz/dolibarr

Support of preview for pdf with several pages

This commit is contained in:
Laurent Destailleur
2017-04-12 12:13:38 +02:00
parent 26a9999fbf
commit d78f3923ee
4 changed files with 17 additions and 16 deletions

View File

@@ -3692,8 +3692,6 @@ else if ($id > 0 || ! empty($ref))
print '<td class="liste_titre" width="18">&nbsp;</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 {

View File

@@ -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.'&amp;file='.urlencode($preview).'"><p>';
$phototoshow.= '</div></div>';
}
}
}
}
else if (! $phototoshow)
{
$phototoshow = $form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos);

View File

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

View File

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