diff --git a/config/default/default.settings.php b/config/default/default.settings.php index 6941518..b704880 100644 --- a/config/default/default.settings.php +++ b/config/default/default.settings.php @@ -68,6 +68,9 @@ $conf = array( # 'social_linkedin' => 'http://linkedin.com/in/username', # 'social_contact' => 'http://www.example.com/contact', +// Use project or organization logo image for printing: +# 'print_logo_aux' => 1, + // Reverse proxy: # 'reverse_proxy' => TRUE, # 'reverse_proxy_addresses' => array('a.b.c.d', ...), diff --git a/themes/zuitedesk/css/print.css b/themes/zuitedesk/css/print.css index 826808e..83c572a 100644 --- a/themes/zuitedesk/css/print.css +++ b/themes/zuitedesk/css/print.css @@ -9,6 +9,9 @@ /* * Global styles. */ +img.print-logo { + max-height: 120px; +} body.print-body .form-control { border: 0; box-shadow: none; diff --git a/themes/zuitedesk/templates/print.tpl.php b/themes/zuitedesk/templates/print.tpl.php index de599de..c4913ef 100644 --- a/themes/zuitedesk/templates/print.tpl.php +++ b/themes/zuitedesk/templates/print.tpl.php @@ -28,6 +28,31 @@ print '
'; } ?> +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'] = '