Changeset 3573 for branches/2.2/mobile/inc/class.ui_mobilecc.inc.php
- Timestamp:
- 12/10/10 11:09:39 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/mobile/inc/class.ui_mobilecc.inc.php
r3268 r3573 460 460 } 461 461 462 static function print_contacts($contacts) { 463 $functions = CreateObject('mobile.common_functions'); 464 $p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']); 465 $p->set_file( 466 Array( 467 'cc_t' => 'contacts_list.tpl' 468 ) 469 ); 470 $p->set_block('cc_t', 'rows_contacts'); 471 $p->set_block('cc_t', 'row_contacts'); 472 $p->set_block('cc_t', 'no_contacts'); 473 474 $bg = "par"; 475 if(!empty($contacts)) { 476 foreach($contacts as $id => $contact) { 477 478 $p->set_var('bg',$bg=="par"?$bg="reset-dt":$bg="par"); 479 $p->set_var('lang_tel',lang("tel")); 480 $p->set_var('show_tel',$contact["connections"]["connection2"]["connection_value"]!=null?"inline":"none"); 481 $p->set_var('lang_see_details',strtoupper(lang("see details"))); 482 $p->set_var('contact_name',$functions->strach_string(is_array($contact["names_ordered"])? 483 $contact["names_ordered"][0]:$contact["names_ordered"],20)); 484 $p->set_var('email', 485 $functions->strach_string( 486 ($contact["connections"]["connection1"]["connection_value"]!=null && 487 $contact["connections"]["connection1"]["id_type"]==="1")? 488 $contact["connections"]["connection1"]["connection_value"]:" ",20)); 489 $p->set_var('tel',$functions->strach_string($contact["connections"]["connection1"]["id_type"]==="2"? 490 $contact["connections"]["connection1"]["connection_value"]: 491 $contact["connections"]["connection2"]["connection_value"],19)); 492 493 $p->fp('rows','row_contacts',True); 494 } 495 } 496 else { 497 $p->set_var("lang_no_results",lang("no results found")); 498 $p->parse("rows","no_contacts"); 499 } 500 return $p->fp('out','rows_contacts'); 501 } 502 462 503 } 504 505 506 507 463 508 ?>
Note: See TracChangeset
for help on using the changeset viewer.