| 1 | <?php |
| 2 | /** |
| 3 | * read_recipient_list.tpl |
| 4 | * |
| 5 | * Template to generate the listing of recipeients for the To, CC and BCC fields. |
| 6 | * |
| 7 | * The following variables are available in this template: |
| 8 | * $which_field - The field that is currently being displayed. Will be 'to', |
| 9 | * 'cc' or 'bcc' |
| 10 | * $more_less_toggle_href - URL to toggle more/less addresses for this field |
| 11 | * $show_more - boolean TRUE if we want to show all addresses for this field. |
| 12 | * $recipients - array containing all receipients for this field. Each element |
| 13 | * is an array representing a recipient and contains the following |
| 14 | * elements: |
| 15 | * $r['Name'] - The name attached to the receipient. Will contain the email |
| 16 | * if no name is provided. |
| 17 | * $r['Email'] - Email address of the recipient |
| 18 | * $a['Full'] - Full name + email |
| 19 | * |
| 20 | * @copyright © 1999-2006 The SquirrelMail Project Team |
| 21 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
| 22 | * @version $Id$ |
| 23 | * @package squirrelmail |
| 24 | * @subpackage templates |
| 25 | */ |
| 26 | |
| 27 | /** add required includes **/ |
| 28 | |
| 29 | /** extract template variables **/ |
| 30 | extract($t); |
| 31 | |
| 32 | /** Begin template **/ |
| 33 | $count = 0; |
| 34 | foreach ($recipients as $r) { |
| 35 | $count++; |
| 36 | if ($count > 1 && !$show_more) |
| 37 | continue; |
| 38 | echo $r['Full']; |
| 39 | if ($show_more && $count != count($recipients)) { |
| 40 | echo '<br />'; |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | if (count($recipients) > 1) { |
| 45 | if ($show_more) { |
| 46 | ?> |
| 47 | <small>(<a href="<?php echo $more_less_toggle_href; ?>"><?php echo _("less"); ?></a>)</small> |
| 48 | <?php |
| 49 | } else { |
| 50 | ?> |
| 51 | <small>(<a href="<?php echo $more_less_toggle_href; ?>"><?php echo _("more"); ?></a>)</small> |
| 52 | <?php |
| 53 | } |
| 54 | } |