Implement printer friendly through CSS also for non-javascript. This
[squirrelmail.git] / templates / default / read_toolbar.tpl
index 2bcbb76f421b7fe3e616a044c4a556e84cc49f76..45c57c447bf21caa8114f2c79b223f0e46df55be 100644 (file)
@@ -11,6 +11,7 @@
  *               following elements:
  *          $link['URL']  - URL needed to access the action
  *          $link['Text'] - Text to be displayed for the action.
  *               following elements:
  *          $link['URL']  - URL needed to access the action
  *          $link['Text'] - Text to be displayed for the action.
+ *          $link['Target'] - Optional link target
  *
  * @copyright © 1999-2006 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  *
  * @copyright © 1999-2006 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
@@ -33,31 +34,9 @@ extract($t);
         if (empty($link['Text']))
             continue;
             
         if (empty($link['Text']))
             continue;
             
-        # Printer firendly link must be handled a little differently
-        if ($link['Text'] == _("View Printable Version")) {
-            if ($javascript_on) {
-                ?>
- <script type="text/javascript">
- <!--
- function printFormat () {
-     var print_win = window.open("../src/printer_friendly_main.php<?php echo $link['URL']; ?>", "Print", "width=800; height=600");
-     print_win.focus();
- }
- // -->
- </script>
- <a href="javascript:printFormat()"><?php echo $link['Text']; ?></a>
-                <?php
-            } else {
-                # everything else follows this format...
-                ?>
- <a href="../src/printer_friendly_bottom.php<?php echo $link['URL']; ?>" target="_blank"><?php echo $link['Text']; ?></a>
-               <?php
-            }
-        } else {
             ?>
             ?>
- <a href="<?php echo $link['URL']; ?>"><?php echo $link['Text']; ?></a>
+ <a href="<?php echo $link['URL']; ?>"<?php echo (empty($link['Target'])?'':' target="' . $link['Target'] . '"')?>><?php echo $link['Text']; ?></a>
             <?php
             <?php
-        }
         
         # Spit out a divider between each element
         if ($count < count($links)-1) {
         
         # Spit out a divider between each element
         if ($count < count($links)-1) {