Happy New Year
[squirrelmail.git] / templates / default / read_recipient_list.tpl
index f0c79fee3552f06be6c66cfb1928576f9f34d65f..e6a65ed93e7a7e99511c893d6d7c54cabba75e75 100644 (file)
@@ -17,7 +17,7 @@
  *         $r['Email'] - Email address of the recipient
  *         $a['Full']  - Full name + email
  *
  *         $r['Email'] - Email address of the recipient
  *         $a['Full']  - Full name + email
  *
- * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @copyright 1999-2020 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -31,24 +31,33 @@ extract($t);
 
 /** Begin template **/
 $count = 0;
 
 /** Begin template **/
 $count = 0;
+echo "<span class=\"recpt_head\">";
+
 foreach ($recipients as $r) {
     $count++;
 foreach ($recipients as $r) {
     $count++;
-    if ($count > 1 && !$show_more)
-        continue;
+
     echo $r['Full'];
     echo $r['Full'];
-    if ($show_more && $count != count($recipients)) {
-        echo '<br />';
+    if ($count != count($recipients)) {
+        echo ", \n   ";
+    }
+    if (!$show_more && $count == 3) {
+        echo "</span><span id=\"recpt_tail_" . $which_field . "\">";
     }
 }
     }
 }
+echo "</span>\n";
+
 
 
-if (count($recipients) > 1) {
-    if ($show_more) {
-        ?>
-&nbsp;<small>(<a href="<?php echo $more_less_toggle_href; ?>"><?php echo _("less"); ?></a>)</small>
-        <?php
+if (count($recipients) > 3) {
+    if ( checkForJavascript() ) {
+        $url = "javascript:void(0)";
+        $onclick = ' onclick="showhide(\'' . $which_field . "','" . _("more") . "','" . _("less") . "')\"";
     } else {
     } else {
-        ?>
-&nbsp;<small>(<a href="<?php echo $more_less_toggle_href; ?>"><?php echo _("more"); ?></a>)</small>
-        <?php
+        $url = $more_less_toggle_href;
+        $onlclick = '';
     }
     }
-}
\ No newline at end of file
+
+    echo "&nbsp;(<a href=\"" . $url . "\"" . $onclick . " id=\"toggle_" . $which_field . "\">" .
+        ($show_more ? _("less") : _("more") ) .
+        "</a>)";
+}
+