| 1 | <?php |
| 2 | /** |
| 3 | * read_toolbar.tpl |
| 4 | * |
| 5 | * This template generates the "Options" toolbar while reading a message. |
| 6 | * |
| 7 | * The following variables are available in this template: |
| 8 | * |
| 9 | * $links - array containing various elements to be displayed in the toolbar. |
| 10 | * Each element is an array representing an option that contains the |
| 11 | * following elements: |
| 12 | * $link['URL'] - URL needed to access the action |
| 13 | * $link['Text'] - Text to be displayed for the action. |
| 14 | * |
| 15 | * @copyright © 1999-2006 The SquirrelMail Project Team |
| 16 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
| 17 | * @version $Id$ |
| 18 | * @package squirrelmail |
| 19 | * @subpackage templates |
| 20 | */ |
| 21 | |
| 22 | /** add required includes **/ |
| 23 | |
| 24 | /** extract template variables **/ |
| 25 | extract($t); |
| 26 | |
| 27 | /** Begin template **/ |
| 28 | ?> |
| 29 | <small> |
| 30 | <?php |
| 31 | foreach ($links as $count=>$link) { |
| 32 | # Skip empty links |
| 33 | if (empty($link['Text'])) |
| 34 | continue; |
| 35 | |
| 36 | # Printer firendly link must be handled a little differently |
| 37 | if ($link['Text'] == _("View Printable Version")) { |
| 38 | if ($javascript_on) { |
| 39 | ?> |
| 40 | <script type="text/javascript"> |
| 41 | <!-- |
| 42 | function printFormat () { |
| 43 | print_win = window.open("../src/printer_friendly_main.php<?php echo $link['URL']; ?>", "Print", "width=800; height=600"); |
| 44 | print_win.focus(); |
| 45 | } |
| 46 | // --> |
| 47 | </script> |
| 48 | <a href="javascript:printFormat()"><?php echo $link['Text']; ?></a> |
| 49 | <?php |
| 50 | } else { |
| 51 | # everything else follows this format... |
| 52 | ?> |
| 53 | <a href="../src/printer_friendly_bottom.php<?php echo $link['URL']; ?>" target="_blank"><?php echo $link['Text']; ?></a> |
| 54 | <?php |
| 55 | } |
| 56 | } else { |
| 57 | ?> |
| 58 | <a href="<?php echo $link['URL']; ?>"><?php echo $link['Text']; ?></a> |
| 59 | <?php |
| 60 | } |
| 61 | |
| 62 | # Spit out a divider between each element |
| 63 | if ($count < count($links)-1) { |
| 64 | ?> |
| 65 | | |
| 66 | <?php |
| 67 | } |
| 68 | } |
| 69 | ?> |
| 70 | </small> |