53bfb400c0e0aa1a22f38c1c50e78f05216e091a
6 * The following functions are utility functions for templates. Do not
7 * echo output in these functions.
9 * @copyright © 2005-2008 The SquirrelMail Project Team
10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
12 * @package squirrelmail
17 * Display a column header with sort buttons
19 * @param string $field Which field to display
20 * @param int $backend The abook backend to be shown when
21 * sort link is clicked
26 function addAbookSort ($field, $backend) {
27 global $abook_sort_order, $nbsp;
32 $alt = _("Sort by nickname");
39 $alt = _("Sort by name");
46 $alt = _("Sort by email");
53 $alt = _("Sort by info");
59 return 'BAD SORT FIELD GIVEN: "'.$field.'"';
62 // show_abook_sort_button() creates a hyperlink (using hyperlink.tpl) that encompases an image, using a getImage() call
63 return $str . ($has_sort ?
$nbsp . show_abook_sort_button($abook_sort_order, $alt, $down, $up, array('new_bnum' => $backend)) : '');