also show printer friendly link when javascript off
[squirrelmail.git] / templates / default / printer_friendly_bottom.tpl
1 <?php
2 /**
3 * printer_friendly_bottom.tpl
4 *
5 * Display the printer friendly version of an email. This is called "_bottom"
6 * because when javaascript is enabled, the printer friendly view is a window
7 * with two frames.
8 *
9 * The following variables are available in this template:
10 * $headers - array containing the headers to be displayed for this email.
11 * Each element in the array represents a separate header.
12 * The index of each element is the field name; the value is
13 * the value of that field.
14 * $message_body - formatted, scrubbed body of the email.
15 * $attachments - array containing info for all message attachments. Each
16 * element in the array represents a separate attachment and
17 * contains the following elements:
18 * $el['Name'] - The name of the attachment
19 * $el['Description'] - Description of the attachment
20 * $el['DefaultHREF'] - URL to the action that should occur when the name is clicked
21 * $el['DownloadHREF'] - URL to download the attachment
22 * $el['ViewHREF'] - URL to view the attachment. Empty if not available.
23 * $el['Size'] - Size of attachment in bytes.
24 * $el['ContentType'] - Content-Type of the attachment
25 * $el['OtherLinks'] - array containing links to any other actions
26 * available for this attachment that might be
27 * provided by plugins, for example. Each element represents
28 * a different action and contains the following elements:
29 * $link['HREF'] - URL to access the functionality
30 * $link['Text'] - Text representing the functionality.
31 *
32 *
33 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
34 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
35 * @version $Id$
36 * @package squirrelmail
37 * @subpackage templates
38 */
39
40 /** add required includes **/
41 include_once(SM_PATH . 'templates/util_global.php');
42
43 /** extract template variables **/
44 extract($t);
45
46 /** Begin template **/
47 ?>
48 <div class="printerFriendly">
49 <table cellspacing="0" class="table_blank">
50 <?php
51 foreach ($headers as $field=>$value) {
52 # If the value is empty, skip the entry.
53 if (empty($value))
54 continue;
55 ?>
56 <tr>
57 <td class="fieldName">
58 <?php echo $field; ?>:
59 </td>
60 <td class="fieldValue">
61 <?php echo $value; ?>
62 </td>
63 </tr>
64 <?php
65 }
66 ?>
67 </table>
68 <hr />
69 <?php echo $message_body; ?>
70 <?php
71 if (count($attachments) > 0) {
72 ?>
73 <hr />
74 <b>Attachments:</b>
75 <?php
76 foreach ($attachments as $attachment) {
77 ?>
78 <table cellspacing="0" border="1" class="attach">
79 <tr>
80 <td colspan="2" class="attachName">
81 <?php echo $attachment['Name']; ?>
82 </td>
83 </tr>
84 <tr>
85 <td class="attachField">
86 <?php echo _("Size"); ?>:
87 </td>
88 <td class="attachFieldValue">
89 <?php echo humanReadableSize($attachment['Size']); ?>
90 </td>
91 </tr>
92 <tr>
93 <td class="attachField">
94 <?php echo _("Type"); ?>:
95 </td>
96 <td class="attachFieldValue">
97 <?php echo $attachment['ContentType']; ?>
98 </td>
99 </tr>
100 <tr>
101 <td class="attachField">
102 <?php echo _("Info"); ?>:
103 </td>
104 <td class="attachFieldValue">
105 <?php echo $attachment['Description']; ?>
106 </td>
107 </tr>
108 </table>
109 <?php
110 }
111 }
112 ?>
113 </div>