Optional logo in printed pages
This commit is contained in:
parent
a6559e5149
commit
2ff42976cb
2 changed files with 2 additions and 33 deletions
|
@ -9,9 +9,6 @@
|
||||||
/*
|
/*
|
||||||
* Global styles.
|
* Global styles.
|
||||||
*/
|
*/
|
||||||
img.print-logo {
|
|
||||||
max-height: 120px;
|
|
||||||
}
|
|
||||||
body.print-body .form-control {
|
body.print-body .form-control {
|
||||||
border: 0;
|
border: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
@ -36,7 +33,8 @@ body.print-body button.form-submit {
|
||||||
*/
|
*/
|
||||||
html.js body.print-body fieldset {
|
html.js body.print-body fieldset {
|
||||||
border: 0;
|
border: 0;
|
||||||
padding: .5em 1em;
|
padding: 0;
|
||||||
|
margin: 0 0 .5em;
|
||||||
}
|
}
|
||||||
html.js body.print-body fieldset.collapsed * {
|
html.js body.print-body fieldset.collapsed * {
|
||||||
display: initial;
|
display: initial;
|
||||||
|
|
|
@ -28,35 +28,6 @@
|
||||||
print '<div class="print-message">'. $print['message'] .'</div>';
|
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>
|
<h1 class="print-title"><?php print $print['title']; ?></h1>
|
||||||
<div class="print-content">
|
<div class="print-content">
|
||||||
<?php print '<div class="node-type-' . $print['node']->type . '">' . $print['content'] . '</div>'; ?>
|
<?php print '<div class="node-type-' . $print['node']->type . '">' . $print['content'] . '</div>'; ?>
|
||||||
|
|
Reference in a new issue