Update dp750/phonebook.xml (#7151)
Fixes phonebook.xml to work with current contacts. Sets contact_organization to FirstName if contact_name_given and contact_name_family are not set but contact_organization is sets Phone type for home and mobile, sets all others to work Loads category == "extensions" as well
This commit is contained in:
parent
40f78c3c28
commit
8f8caaede7
|
|
@ -1,26 +1,46 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<AddressBook>
|
||||
<version>1</version>
|
||||
{$i=0}
|
||||
{foreach $contacts as $contact}
|
||||
{if $contact.contact_name_given != "" && $contact.contact_type == "contact"}
|
||||
{foreach $contacts as $contact}
|
||||
{if $contact.contact_name_given != "" || $contact.contact_name_family != "" || $contact.contact_organization != ""}
|
||||
<Contact>
|
||||
{if $contact.contact_name_given == "" && $contact.contact_name_family == "" && $contact.contact_organization != ""}
|
||||
<FirstName>{$contact.contact_organization}</FirstName>
|
||||
{else}
|
||||
<FirstName>{$contact.contact_name_given}</FirstName>
|
||||
<LastName>{$contact.contact_name_family}</LastName>
|
||||
<Phone type="Work">
|
||||
<phonenumber>{$contact.contact_work}</phonenumber>
|
||||
</Phone>
|
||||
{if $contact.contact_home != "" }
|
||||
<Phone type="Home">
|
||||
<phonenumber>{$contact.contact_home}</phonenumber>
|
||||
{/if}
|
||||
{if $contact.category == "extensions"}
|
||||
<Phone type="Other">
|
||||
<phonenumber>{$contact.phone_extension}</phonenumber>
|
||||
</Phone>
|
||||
{/if}
|
||||
{if $contact.contact_cell != "" }
|
||||
{if $contact.phone_label == "work"}
|
||||
<Phone type="Work">
|
||||
<phonenumber>{$contact.phone_number}</phonenumber>
|
||||
</Phone>
|
||||
|
||||
{elseif $contact.phone_label == "main"}
|
||||
<Phone type="Work">
|
||||
<phonenumber>{$contact.phone_number}</phonenumber>
|
||||
</Phone>
|
||||
|
||||
{elseif $contact.phone_label == "home"}
|
||||
<Phone type="Home">
|
||||
<phonenumber>{$contact.phone_number}</phonenumber>
|
||||
</Phone>
|
||||
|
||||
{elseif $contact.phone_label == "mobile"}
|
||||
<Phone type="Mobile">
|
||||
<phonenumber>{$contact.contact_cell}</phonenumber>
|
||||
<phonenumber>{$contact.phone_number}</phonenumber>
|
||||
</Phone>
|
||||
|
||||
{else}
|
||||
<Phone type="Work">
|
||||
<phonenumber>{$contact.phone_number}</phonenumber>
|
||||
</Phone>
|
||||
{/if}
|
||||
</Contact>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</AddressBook>
|
||||
</AddressBook>
|
||||
Loading…
Reference in New Issue