Changeset 5104


Ignore:
Timestamp:
09/27/11 15:50:14 (12 years ago)
Author:
alexandrecorreia
Message:

Ticket #2185 - Corrigido o salvamento das preferências do catalogo para seguir padrão do expresso

Location:
branches/2.2/contactcenter
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/contactcenter/inc/class.ui_preferences.inc.php

    r3707 r5104  
    2020                        'set_preferences' => true, 
    2121                ); 
    22                  
    23                 function index() 
    24                 { 
    25                         $GLOBALS['phpgw_info']['flags']['app_header'] = lang('ContactCenter').' - '.lang('Preferences'); 
    26                         $GLOBALS['phpgw']->common->phpgw_header(); 
    27                         echo parse_navbar(); 
    2822 
    29                         $GLOBALS['phpgw']->template->set_file(array('pref' => 'preferences.tpl')); 
    30  
    31                         /* Get Saved Preferences */ 
    32                         $actual = $this->get_preferences(); 
    33                          
    34                         /* Get the catalog options */ 
    35                         $pCatalog = CreateObject('contactcenter.bo_people_catalog'); 
    36                         $types = $pCatalog->get_all_connections_types(); 
    37                          
    38                         if (is_array($types)) 
    39                         { 
    40                                 $options_email = ''; 
    41                                 foreach($types as $id => $name) 
    42                                 { 
    43                                         $options_email .= '<option value="'.$id.'"'; 
    44                                          
    45                                         if ($actual['personCardEmail'] == $id) 
    46                                         { 
    47                                                 $options_email .= ' selected '; 
    48                                         } 
    49                                  
    50                                         $options_email .= '>'.$name."</option>\n"; 
    51                                 } 
    52                          
    53                                 $options_phone = ''; 
    54                                 foreach($types as $id => $name) 
    55                                 { 
    56                                         $options_phone .= '<option value="'.$id.'"'; 
    57                                          
    58                                         if ($actual['personCardPhone'] == $id) 
    59                                         { 
    60                                                 $options_phone .= ' selected '; 
    61                                         } 
    62                                  
    63                                         $options_phone .= '>'.$name."</option>\n"; 
    64                                 } 
    65                         } 
    66                         else 
    67                         { 
    68                                 $options_email = ''; 
    69                                 $options_phone = ''; 
    70                         } 
    71                          
    72                         if ($actual['displayConnector'] or !$actual['displayConnectorDefault']) 
    73                         { 
    74                                 $GLOBALS['phpgw']->template->set_var('displayConnector', 'checked'); 
    75                         } 
    76                         else 
    77                         { 
    78                                 $GLOBALS['phpgw']->template->set_var('displayConnector', ''); 
    79                         } 
    80                          
    81                         if ($actual['empNum']) 
    82                         { 
    83                                 $GLOBALS['phpgw']->template->set_var('empNum', 'checked'); 
    84                         } 
    85                         else 
    86                         { 
    87                                 $GLOBALS['phpgw']->template->set_var('empNum', ''); 
    88                         } 
    89  
    90                         if ($actual['cell']) 
    91                         { 
    92                                 $GLOBALS['phpgw']->template->set_var('cell', 'checked'); 
    93                         } 
    94                         else 
    95                         { 
    96                                 $GLOBALS['phpgw']->template->set_var('cell', ''); 
    97                         } 
    98  
    99                         if ($actual['department']) 
    100                         { 
    101                                 $GLOBALS['phpgw']->template->set_var('department', 'checked'); 
    102                         } 
    103                         else 
    104                         { 
    105                                 $GLOBALS['phpgw']->template->set_var('department', ''); 
    106                         } 
    107  
    108                         $GLOBALS['phpgw']->template->set_var('personCardEmail', $options_email); 
    109                         $GLOBALS['phpgw']->template->set_var('personCardPhone', $options_phone); 
    110  
    111                         /* Translate the fields */ 
    112                         $this->translate('pref'); 
    113  
    114                         $GLOBALS['phpgw']->template->set_var('form_action', $GLOBALS['phpgw']->link('/index.php', 'menuaction=contactcenter.ui_preferences.set_preferences')); 
    115  
    116                         $GLOBALS['phpgw']->template->pparse('out', 'pref'); 
    117                 } 
    118                  
    11923                function translate($handle) 
    12024                { 
  • branches/2.2/contactcenter/inc/hook_preferences.inc.php

    r1409 r5104  
    1717        $title = $appname; 
    1818        $file = Array( 
    19                 'Preferences'   => $GLOBALS['phpgw']->link('/index.php','menuaction=contactcenter.ui_preferences.index'), 
    20                 'Grant Access'  => $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname), 
     19                'Preferences'   => $GLOBALS['phpgw']->link('/preferences/preferences.php','appname='.$appname), 
     20                'Grant Access'  => $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname), 
    2121                //'Edit Categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app='.$appname . '&cats_level=True&global_cats=True') 
    2222        ); 
  • branches/2.2/contactcenter/setup/setup.inc.php

    r4350 r5104  
    3838        $setup_info['contactcenter']['hooks'][] = 'config_validate'; 
    3939        $setup_info['contactcenter']['hooks'][] = 'sidebox_menu'; 
     40        $setup_info['contactcenter']['hooks'][] = 'settings'; 
    4041         
    4142        /* ContactCenter Tables */ 
Note: See TracChangeset for help on using the changeset viewer.