Optional logo in printed pages

This commit is contained in:
Manuel Cillero 2017-10-01 14:43:18 +02:00
parent a6559e5149
commit 2ff42976cb
2 changed files with 2 additions and 33 deletions

View file

@ -28,35 +28,6 @@
print '<div class="print-message">'. $print['message'] .'</div>';
} ?>
<?php
global $conf;
if (!empty($conf['print_logo_aux']) && $conf['print_logo_aux']) {
if ($print['node']->type == 'stormorganization' || $print['node']->type == 'stormproject') {
$nid = $print['node']->nid;
} elseif (!empty($print['node']->project_nid)) {
$nid = $print['node']->project_nid;
} elseif (!empty($print['node']->organization_nid)) {
$nid = $print['node']->organization_nid;
}
if (!empty($nid)) {
$node = node_load($nid);
if ($node->type == 'stormorganization' && !empty($node->field_stormorganization_image[0]['filename'])) {
$img = 'organizations/' . $node->field_stormorganization_image[0]['filename'];
}
elseif (!empty($node->field_stormproject_image[0]['filename'])) {
$img = 'projects/' . $node->field_stormproject_image[0]['filename'];
}
if (!empty($img)) {
$lang = $print['language'] != 'es' ? '/' . $print['language'] : '';
$print['logo'] = '<img src="' . "$lang/system/files/$img" . '" alt="' . $node->title . '" class="print-logo" id="logo" />';
}
}
} ?>
<div class="print-logo"><?php print $print['logo']; ?></div>
<hr class="print-hr" />
<h1 class="print-title"><?php print $print['title']; ?></h1>
<div class="print-content">
<?php print '<div class="node-type-' . $print['node']->type . '">' . $print['content'] . '</div>'; ?>