This repository has been archived on 2025-06-21. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
suitedesk/themes/zuitedesk/templates/print.tpl.php

72 lines
2.3 KiB
PHP

<?php
/**
* @file
* Default print module template
*
* @ingroup print
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $print['language']; ?>" xml:lang="<?php print $print['language']; ?>">
<head>
<?php print $print['head']; ?>
<?php print $print['base_href']; ?>
<title><?php print $print['title']; ?></title>
<?php print $print['scripts']; ?>
<?php print $print['sendtoprinter']; ?>
<?php print $print['robots_meta']; ?>
<?php print $print['favicon']; ?>
<?php print $print['css']; ?>
</head>
<body class="print-body suitedesk">
<?php if (!empty($print['message'])) {
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>'; ?>
</div>
<hr class="print-hr print-source-and-links" />
<div class="print-source_url"><?php print $print['source_url']; ?></div>
<div class="print-links"><?php print $print['pfp_links']; ?></div>
</body>
</html>