assign('details',$details); $tmpl->assign('id',$id); $tmpl->assign('property_types',$property_types); $tmpl->assign('adr_types',$adr_types); $tmpl->assign('phone_types',$phone_types); $page = $tmpl->fetchPage(); OC_JSON::success(array('data' => array( 'id' => $id, 'name' => $name, 'page' => $page ))); } /** * @return array of vcard prop => label */ public static function getAddPropertyOptions($l10n){ return array( 'ADR' => $l10n->t('Address'), 'TEL' => $l10n->t('Telephone'), 'EMAIL' => $l10n->t('Email'), 'ORG' => $l10n->t('Organization'), ); } /** * @return types for property $prop */ public static function getTypesOfProperty($l, $prop){ switch($prop){ case 'ADR': return array( 'WORK' => $l->t('Work'), 'HOME' => $l->t('Home'), ); case 'TEL': return array( 'HOME' => $l->t('Home'), 'CELL' => $l->t('Mobile'), 'WORK' => $l->t('Work'), 'TEXT' => $l->t('Text'), 'VOICE' => $l->t('Voice'), 'FAX' => $l->t('Fax'), 'VIDEO' => $l->t('Video'), 'PAGER' => $l->t('Pager'), ); } } }