other part of r12925
[squirrelmail.git] / templates / default / read_recipient_list.tpl
CommitLineData
3cb5a0bb 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 &copy; 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 **/
30extract($t);
31
32/** Begin template **/
33$count = 0;
34foreach ($recipients as $r) {
35 $count++;
5d26624e 36 if ($count > 3 && !$show_more)
3cb5a0bb 37 continue;
38 echo $r['Full'];
5d26624e 39 if ($count != count($recipients)) {
40 echo ", \n ";
3cb5a0bb 41 }
42}
43
0ce793dc 44if (count($recipients) > 3) {
3cb5a0bb 45 if ($show_more) {
46 ?>
47&nbsp;<small>(<a href="<?php echo $more_less_toggle_href; ?>"><?php echo _("less"); ?></a>)</small>
48 <?php
49 } else {
50 ?>
51&nbsp;<small>(<a href="<?php echo $more_less_toggle_href; ?>"><?php echo _("more"); ?></a>)</small>
52 <?php
53 }
5d26624e 54}
55