From 2cb44c3b7d3fbd4031418d9b3ff346d2b776028f Mon Sep 17 00:00:00 2001 From: Len Date: Tue, 9 Jul 2019 21:09:14 -0400 Subject: [PATCH] Create directory.xml (#4338) --- .../provision/yealink/t53w/directory.xml | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 resources/templates/provision/yealink/t53w/directory.xml diff --git a/resources/templates/provision/yealink/t53w/directory.xml b/resources/templates/provision/yealink/t53w/directory.xml new file mode 100644 index 0000000000..085b2a191f --- /dev/null +++ b/resources/templates/provision/yealink/t53w/directory.xml @@ -0,0 +1,87 @@ + +{foreach $contacts as $row} +{if $smarty.get.contacts == "users" && $row.category == "users"} + + {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} + {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.effective_caller_id_name} + {/if} + + {foreach $row.numbers as $number} + {if $number.phone_number != ""} + {$number.phone_number} + {else} + {$number.phone_extension} + {/if} + {/foreach} + +{elseif $smarty.get.contacts == "groups" && $row.category == "groups"} + + {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} + {else} + {$row.effective_caller_id_name} + {/if} + + {foreach $row.numbers as $number} + {if $number.phone_number != ""} + {$number.phone_number} + {else} + {$number.phone_extension} + {/if} + {/foreach} + +{elseif $smarty.get.contacts == "extensions" && $row.category == "extensions"} + + {if $row.contact_name_given != ""} + {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.effective_caller_id_name} + {/if} + {if $row.phone_number != ""} + {$row.phone_number} + {else} + {$row.phone_extension} + {/if} + +{elseif $smarty.get.contacts == "all"} + + {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} + {else} + {$row.effective_caller_id_name} + {/if} + + {if $row.category == "extensions"} + {if $row.phone_number != ""} + {$row.phone_number} + {else} + {$row.phone_extension} + {/if} + {else} + {foreach $row.numbers as $number} + {if $number.phone_number != ""} + {$number.phone_number} + {else} + {$number.phone_extension} + {/if} + {/foreach} + {/if} + +{/if} +{/foreach} +