diff --git a/addressbook/index.php b/addressbook/index.php index 14477ed371..3fb0183e2d 100755 --- a/addressbook/index.php +++ b/addressbook/index.php @@ -76,21 +76,45 @@ ?> - "> - - + "> + '; + echo ''; + echo $phpgw->nextmatchs->show_sort_order($sort,"company",$order,"index.php", + lang("Company Name")); + echo ''; + } + if ( $phpgw_info["user"]["preferences"]["addressbook_view_lastname"] == "True" ) { + echo ''; + } + if ( $phpgw_info["user"]["preferences"]["addressbook_view_firstname"] == "True" ) { + echo ''; + } + if ( $phpgw_info["user"]["preferences"]["addressbook_view_email"] == "True" ) { + echo ''; + } + if ( $phpgw_info["user"]["preferences"]["addressbook_view_wphone"] == "True" ) { + echo ''; + } + ?> + + db->query("SELECT * FROM addressbook WHERE $filtermethod AND (lastname like '" @@ -121,32 +146,51 @@ $firstname = $phpgw->db->f("firstname"); $lastname = $phpgw->db->f("lastname"); + $email = $phpgw->db->f("email"); + $company = $phpgw->db->f("company"); + $wphone = $phpgw->db->f("wphone"); $con = $phpgw->db->f("con"); - /* This for for just showing the company name stored in lastname. */ - if (($lastname) && (! $firstname)) - $t_colspan = " colspan=2"; - else { - $t_colspan = ""; - if ($firstname == "") $firstname = " "; - if ($lastname == "") $lastname = " "; - } + if($firstname == "") $firstname = " "; + if($lastname == "") $lastname = " "; + if($email == "") $email = " "; + if($company == "") $company = " "; + if($wphone == "") $wphone = " "; ?> - > - - - - $firstname - - "; - ?> + '; + if ( $phpgw_info["user"]["preferences"]["addressbook_view_company"] == 'True' ) { + echo ''; + }; + if ( $phpgw_info["user"]["preferences"]["addressbook_view_lastname"] == 'True' ) { + echo ''; + }; + if ( $phpgw_info["user"]["preferences"]["addressbook_view_firstname"] == 'True' ) { + echo ''; + }; + if ( $phpgw_info["user"]["preferences"]["addressbook_view_email"] == 'True' ) { + echo ''; + }; + if ( $phpgw_info["user"]["preferences"]["addressbook_view_wphone"] == 'True' ) { + echo ''; + }; + ?> @@ -226,6 +230,13 @@ "; + $abc = get_abc(); # AddressBook Columns + while (list($col, $descr) = each($abc)) { + display_option($descr,"addressbook","addressbook_view_".$col,1); + } + } if ($phpgw_info["user"]["apps"]["headlines"]) { ?> @@ -303,6 +314,10 @@ if ($mainscreen_showbirthdays) { $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"mainscreen_showbirthdays"); } + $abc = get_abc(); # AddressBook Columns + while (list($col, $descr) = each($abc)) { + $phpgw->common->preferences_add($phpgw_info["user"]["userid"],"addressbook_view_".$col); + } } if ($phpgw_info["user"]["apps"]["calendar"]) {
- - nextmatchs->show_sort_order($sort,"lastname",$order,"index.php", - lang("Last Name")); - ?> - - "> - - nextmatchs->show_sort_order($sort,"firstname",$order,"index.php", - lang("First Name")); - ?> - -
'; + echo ''; + echo $phpgw->nextmatchs->show_sort_order($sort,"lastname",$order,"index.php", + lang("Last Name")); + echo ''; + echo ''; + echo $phpgw->nextmatchs->show_sort_order($sort,"firstname",$order,"index.php", + lang("First Name")); + echo ''; + echo ''; + echo $phpgw->nextmatchs->show_sort_order($sort,"email",$order,"index.php", + lang("Email")); + echo ''; + echo ''; + echo $phpgw->nextmatchs->show_sort_order($sort,"wphone",$order,"index.php", + lang("Work Phone")); + echo ' @@ -104,6 +128,7 @@
> - - - - '; + echo ''; + echo $company; + echo ''; + echo ''; + echo $lastname; + echo ''; + echo ''; + echo $firstname; + echo ''; + echo ''; + echo $email; + echo ''; + echo ''; + echo $wphone; + echo ' common->preferences_add($n_loginid,"dateformat","m/d/Y"); $phpgw->common->preferences_add($n_loginid,"timeformat","12"); $phpgw->common->preferences_add($n_loginid,"lang","en"); + $phpgw->common->preferences_add($n_loginid,"addressbook_view_company","True"); + $phpgw->common->preferences_add($n_loginid,"addressbook_view_lastname","True"); + $phpgw->common->preferences_add($n_loginid,"addressbook_view_firstname","True"); // Even if they don't have access to the calendar, we will add these. // Its better then the calendar being all messed up, they will be deleted diff --git a/preferences/settings.php b/preferences/settings.php index a1c9017d7b..49211e5865 100755 --- a/preferences/settings.php +++ b/preferences/settings.php @@ -24,13 +24,17 @@ $phpgw->common->navbar(); } - function display_option($text,$check,$option) { + function display_option($text,$check,$option,$indent) { global $phpgw, $phpgw_info; if ($phpgw_info["user"]["apps"][$check]) { ?>
- ? + ') {}; + echo lang($text); + for ($i=0; $i < $indent; $i++, print '') {}; + ?> > @@ -143,9 +147,9 @@
Addressbook columns :