phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: addressbook/inc class.boaddressbook.inc.php,1.2


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: addressbook/inc class.boaddressbook.inc.php,1.24,1.24.2.1 class.uiaddressbook.inc.php,1.49.2.3,1.49.2.4 class.uifields.inc.php,1.7,1.7.2.1
Date: Sun, 06 Apr 2003 11:20:25 -0400

Update of /cvsroot/phpgroupware/addressbook/inc
In directory subversions:/tmp/cvs-serv6549

Modified Files:
      Tag: eTemplate
        class.boaddressbook.inc.php class.uiaddressbook.inc.php 
        class.uifields.inc.php 
Log Message:
fixed default-filter in the prefs and custom-field-display


Index: class.boaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.boaddressbook.inc.php,v
retrieving revision 1.24
retrieving revision 1.24.2.1
diff -C2 -r1.24 -r1.24.2.1
*** class.boaddressbook.inc.php 13 May 2002 00:43:35 -0000      1.24
--- class.boaddressbook.inc.php 6 Apr 2003 15:20:22 -0000       1.24.2.1
***************
*** 370,374 ****
                                if($other['default_filter'])
                                {
!                                       
$GLOBALS['phpgw']->preferences->add('addressbook','default_filter',True);
                                }
  
--- 370,374 ----
                                if($other['default_filter'])
                                {
!                                       
$GLOBALS['phpgw']->preferences->add('addressbook','default_filter',$other['default_filter']);
                                }
  

Index: class.uiaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uiaddressbook.inc.php,v
retrieving revision 1.49.2.3
retrieving revision 1.49.2.4
diff -C2 -r1.49.2.3 -r1.49.2.4
*** class.uiaddressbook.inc.php 27 Oct 2002 16:47:10 -0000      1.49.2.3
--- class.uiaddressbook.inc.php 6 Apr 2003 15:20:22 -0000       1.49.2.4
***************
*** 489,493 ****
                        $search_filter = 
$GLOBALS['phpgw']->nextmatchs->show_tpl('/index.php',
                                $this->start, 
$total_records,'&menuaction=addressbook.uiaddressbook.index&fcat_id='.$this->cat_id,'75%',
!                               
$GLOBALS['phpgw_info']['theme']['th_bg'],1,1,1,1,$this->cat_id);
  
                        $lang_showing = 
$GLOBALS['phpgw']->nextmatchs->show_hits($total_records,$this->start);
--- 489,494 ----
                        $search_filter = 
$GLOBALS['phpgw']->nextmatchs->show_tpl('/index.php',
                                $this->start, 
$total_records,'&menuaction=addressbook.uiaddressbook.index&fcat_id='.$this->cat_id,'75%',
!                               
$GLOBALS['phpgw_info']['theme']['th_bg'],1,1,1,array('filter'=>$this->filter,'yours'=>1),
!                               $this->cat_id);
  
                        $lang_showing = 
$GLOBALS['phpgw']->nextmatchs->show_hits($total_records,$this->start);
***************
*** 899,921 ****
                        }
  
-                       /* No prefs? */
-                       if(!$columns_to_display )
-                       {
-                               $columns_to_display = array(
-                                       'n_given'    => 'n_given',
-                                       'n_family'   => 'n_family',
-                                       'org_name'   => 'org_name',
-                                       'tel_work'   => 'tel_work',
-                                       'tel_home'   => 'tel_home',
-                                       'email'      => 'email',
-                                       'email_home' => 'email_home'
-                               );
-                               while($column = each($columns_to_display))
-                               {
-                                       $colname[$column[0]] = $column[1];
-                               }
-                               $noprefs = ' - ' . lang('Please set your 
preferences for this application');
-                       }
- 
                        /* merge in extra fields */
                        $qfields = $this->contacts->stock_contact_fields + 
$this->extrafields + $customfields;
--- 900,903 ----
***************
*** 934,938 ****
                        }
  
!                       
$GLOBALS['phpgw']->template->set_var('lang_viewpref',lang('Address book - 
view') . $noprefs);
  
                        @reset($qfields);
--- 916,923 ----
                        }
  
!                       $this->template->set_var('lang_viewpref',lang('Address 
book - view'));
! 
!                       unset($qfields['email_type']);          // noone is 
useing that any more
!                       unset($qfields['privat_email_type']);
  
                        @reset($qfields);
***************
*** 1182,1199 ****
                                $custom_var = '
    <tr>
!     <td><font color="#000000" face="">'.lang('Custom').' 
'.lang('Fields').':</font></td>
!     <td></td>
!     <td></td>
    </tr>
  ';
!                               while(list($cf) = each($customfields))
                                {
!                                       $tr_color = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
!                                       $custom_var .= "\n" . '<tr bgcolor="' . 
$tr_color . '">' . "\n";
                                        $custom_var .= '    <td><input 
type="checkbox" name="prefs['
                                                . strtolower($cf) . ']"'
                                                . ($this->prefs[$cf] ? ' 
checked' : '')
!                                               . '>' . $cf . '</option></td>' 
. "\n"
!                                               . '</tr>' . "\n";
                                }
                                
$GLOBALS['phpgw']->template->set_var('custom_fields',$custom_var);
--- 1167,1194 ----
                                $custom_var = '
    <tr>
!     <td class="'.$tr_color.'" colspan="6"><font color="#000000" 
face="">'.lang('Custom Fields').':</font></td>
    </tr>
  ';
!                               $tr_color = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
!                               $i = 0;
!                               while( list($cf) = each($customfields) )
                                {
!                                       if (!($i % 6))
!                                       {
!                                               $custom_var .= "\n  <tr 
class='$tr_color'>\n";
!                                       }
                                        $custom_var .= '    <td><input 
type="checkbox" name="prefs['
                                                . strtolower($cf) . ']"'
                                                . ($this->prefs[$cf] ? ' 
checked' : '')
!                                               . '>' . str_replace('_',' 
',$cf) . '</option></td>' . "\n";
!                                       
!                                       if (!(++$i % 6))
!                                       {
!                                               echo "</tr>\n";
!                                       }
!                               }
!                               if ($i = 6 - ($i % 6))
!                               {
!                                       $custom_var .= "    <td 
colspan=$i>&nbsp;</td>\n  </tr>\n";
                                }
                                
$GLOBALS['phpgw']->template->set_var('custom_fields',$custom_var);
***************
*** 1218,1224 ****
  
                        $list = array(
!                               ''        => lang('All'),
!                               'private' => lang('Private'),
!                               'blank'   => lang('Blank')
                        );
                        
$GLOBALS['phpgw']->template->set_var('lang_default_filter',lang('Default 
Filter'));
--- 1213,1220 ----
  
                        $list = array(
!                               'none'    => lang('Show all'),
!                               'yours'   => lang('Only yours'),
!                               'private' => lang('Private') /*,
!                               'blank'   => lang('Blank') */
                        );
                        
$GLOBALS['phpgw']->template->set_var('lang_default_filter',lang('Default 
Filter'));

Index: class.uifields.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uifields.inc.php,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C2 -r1.7 -r1.7.2.1
*** class.uifields.inc.php      31 May 2002 18:13:07 -0000      1.7
--- class.uifields.inc.php      6 Apr 2003 15:20:22 -0000       1.7.2.1
***************
*** 26,30 ****
                {
  //                    $GLOBALS['phpgw']->template = 
CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
! //                    $GLOBALS['phpgw']->nextmatchs = 
CreateObject('phpgwapi.nextmatchs');
                        $this->config = 
CreateObject('phpgwapi.config','addressbook');
                }
--- 26,30 ----
                {
  //                    $GLOBALS['phpgw']->template = 
CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
!                       $GLOBALS['phpgw']->nextmatchs = 
CreateObject('phpgwapi.nextmatchs');
                        $this->config = 
CreateObject('phpgwapi.config','addressbook');
                }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]