Ignore:
Timestamp:
10/01/09 10:11:24 (15 years ago)
Author:
eduardoalex
Message:

Ticket #675 - Adicionadas as funcionalidades e o template add_recipients.tpl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mobile/inc/class.ui_mobilecc.inc.php

    r623 r1474  
    33                 
    44                var $nextmatchs; 
    5                 var $bo;                 
     5                var $bo; 
    66                var $page_info = array ( 
    77                                'actual_catalog' => false, 
     
    195195                        if(!$from_calendar) 
    196196                                $p->set_file(Array('entries' => 'cc_main.tpl')); 
    197                         else 
     197                        else if($from_calendar =='mobilecalendar') 
    198198                                $p->set_file(Array('entries' => 'add_participants.tpl')); 
    199  
     199                        else     
     200                                $p->set_file(Array('entries' => 'add_recipients.tpl')); 
     201                                 
    200202                        $p->set_block('entries','body'); 
    201203                        $p->set_block('entries','people_header'); 
     
    213215                                'lang_name' => lang("Name"), 
    214216                                'lang_catalog' => lang("Catalog"), 
    215                                 'lang_buscar' => lang("Search") 
     217                                'lang_search' => lang("Search") 
    216218                                ); 
    217219                        $p->set_var($texts); 
     
    219221                        $p->set_var('lang_already_addeds:',lang('already_addeds:')); 
    220222 
    221                         if($from_calendar) 
     223                        if($from_calendar == 'mobilecalendar') 
    222224                                $p->set_var('lang_continue_scheduling',lang('continue scheduling')); 
     225                        else if($from_calendar == 'mobilemail'){ 
     226                                $p->set_var('lang_continue',lang('continue')); 
     227                        } 
    223228 
    224229                        /////////// Preenche o combo de catálogos 
     
    227232                        $branchs = $bo_cc->get_catalog_tree(); 
    228233                         
    229                         if(!$from_calendar) { 
     234                        if(!$from_calendar || $from_calendar == 'mobilemail') { 
    230235                                foreach($branchs as $branch) { //Pego apenas a estrutura dos ramos vindos do banco, pois as do ldap estão confusas e com dados aparentemente inconsistentes. 
    231236                                        if($branch['class']!="bo_global_ldap_catalog" && $branch['class']!="bo_catalog_group_catalog") { 
     
    260265                        } 
    261266                         
    262                         if(!$from_calendar) { 
     267                        if(!$from_calendar  || $from_calendar == 'mobilemail') { 
    263268                                $branchs = $bo_ldap_manager->get_external_ldap_sources(); 
    264269                                if(is_array($branchs)) foreach($branchs as $id=>$branch) { //Ldaps externos 
     
    366371                                                } 
    367372                                                if(!$from_calendar) 
    368                                                         $var['form_action'] = "index.php?menuaction=mobile.ui_mobilemail.new_msg"; 
    369                                                 else { 
     373                                                        $var['form_action'] = "index.php?menuaction=mobile.mobilemail.new_msg"; 
     374                                                else if($from_calendar == 'mobilecalendar'){ 
    370375                                                        $var['id_contact'] = $entry['uidnumber'][0].'U'; 
    371376                                                        $var['form_action'] = "index.php?menuaction=mobile.ui_mobilecalendar.add_participant"; 
     377                                                }else{ 
     378                                                        $var['id_contact'] = $entry['uidnumber'][0].'U'; 
     379                                                        $var['form_action'] = "index.php?menuaction=mobile.ui_mobilemail.add_recipient"; 
    372380                                                } 
    373381                                                $var['lang_select'] = lang("select"); 
     
    378386                        } 
    379387                         
    380                         if($from_calendar) { 
    381                                 $p->set_var('lang_choose_the_participants',lang("choose the participants")); 
    382                                 $participants = $_SESSION['mobile_calendar']; 
    383                                 @reset($participants); 
    384                                 if(count($participants)) while (($participant = current($participants))!==false) { 
     388                        if($from_calendar == 'mobilemail') { 
     389                                $p->set_var('lang_choose_the_recipients',lang("choose the recipients")); 
     390                                $participants = $_SESSION['mobile_mail']; 
     391                                reset($participants); 
     392                                while (($participant = current($participants))!==false) { 
    385393                                        $p->set_var('row_contact_name',$participant); 
    386394                                        if(next($participants)!==false) 
     
    390398                                        $p->parse('rows_addeds','row_addeds',True); 
    391399                                } 
     400                        }else if($from_calendar == 'mobilecalendar'){ 
     401                                $p->set_var('lang_choose_the_participants',lang("choose the participants")); 
     402                                $participants = $_SESSION['mobile_calendar']; 
     403                                reset($participants); 
     404                                while (($participant = current($participants))!==false) { 
     405                                        $p->set_var('row_contact_name',$participant); 
     406                                        if(next($participants)!==false) 
     407                                                $p->set_var('row_separate',','); 
     408                                        else 
     409                                                $p->set_var('row_separate','.'); 
     410                                        $p->parse('rows_addeds','row_addeds',True); 
     411                                }                                
    392412                        } 
    393413                         
Note: See TracChangeset for help on using the changeset viewer.