<?xml version="1.0" encoding="UTF-8" ?>
<FanvilIPPhoneDirectory>
{% for result in results -%}
 <MenuItem>
  <Prompt>{{ result.name|e }}</Prompt>
  <URI>{{ result.number|e }}</URI>
 </MenuItem>
{% else -%}
 <MenuItem>
  <Prompt>{{ gettext('No entries') }}</Prompt>
  <URI></URI>
 </MenuItem>
{% endfor -%}

{% if offset_next is not none or offset_previous is not none -%}
<SoftKey>
<Name>{{ gettext('Dial') }}</Name>
<URI>SoftKey:Dial</URI>
</SoftKey>

{% if offset_previous is not none -%}
<SoftKey>
<Name>{{ gettext('PrevPage') }}</Name>
<URI>{{ base_url|e }}?xivo_user_uuid={{ user_uuid|e }}&amp;term={{ term|e }}&amp;limit={{ limit|e }}&amp;offset={{ offset_previous|e }}</URI>
</SoftKey>
{% endif -%}

<SoftKey>
<Name>{{ gettext('Exit') }}</Name>
<URI>SoftKey:Exit</URI>
</SoftKey>

{% if offset_next is not none -%}
<SoftKey>
<Name>{{ gettext('NextPage') }}</Name>
<URI>{{ base_url|e }}?xivo_user_uuid={{ user_uuid|e }}&amp;term={{ term|e }}&amp;limit={{ limit|e }}&amp;offset={{ offset_next|e }}</URI>
</SoftKey>
{% endif -%}
{% endif -%}
</FanvilIPPhoneDirectory>
