{% macro renderPager(pager, max, orderedBy, order) %} {{ pagerfanta( pager, 'twitter_bootstrap_translated', { 'proximity' : 1, 'routeName': 'claro_contact_show_all_my_contacts', 'routeParams': { 'max': max, 'orderedBy': orderedBy, 'order': order } } ) }} {% endmacro %} {% macro sortUrl(max, orderedBy, order) %} {% if order == 'ASC' %} {% set newOrder = 'DESC' %} {% else %} {% set newOrder = 'ASC' %} {% endif %} {{ path( 'claro_contact_show_all_my_contacts', { 'max': max, 'orderedBy': orderedBy, 'order': newOrder } ) }} {% endmacro %} {% from _self import renderPager %} {% from _self import sortUrl %} {% from "ClarolineCoreBundle::macros.html.twig" import maxResultsSelectBox %} {% if contacts|length > 0 %}
{% if contacts.getNbPages() > 1 %} {{ renderPager(contacts, max, orderedBy, order) }} {% endif %}
{{ maxResultsSelectBox(max, "$('#max-results-button').trigger('click');", 'contacts_per_page') }}
{% if options['show_picture'] is not defined or options['show_picture'] %} {% endif %} {% if options['show_username'] is not defined or options['show_username'] %} {% endif %} {% if options['show_mail'] is not defined or options['show_mail'] %} {% endif %} {% if options['show_phone'] is not defined or options['show_phone'] %} {% endif %} {% for contact in contacts %} {% if options['show_picture'] is not defined or options['show_picture'] %} {% endif %} {% if options['show_username'] is not defined or options['show_username'] %} {% endif %} {% if options['show_mail'] is not defined or options['show_mail'] %} {% endif %} {% if options['show_phone'] is not defined or options['show_phone'] %} {% endif %} {% endfor %}
{{ 'picture'|trans({}, 'platform') }} {{ 'firstName'|trans({}, 'platform') }} {{ 'lastName'|trans({}, 'platform') }} {{ 'username'|trans({}, 'platform') }} {{ 'mail'|trans({}, 'platform') }} {{ 'phone'|trans({}, 'platform') }} {{ 'actions'|trans({}, 'platform') }}
{% if contact.getPicture() != '' %} {{ contact.getLastName() ~ ' ' ~ contact.getFirstName() }} {% else %}

{% endif %}
{{ contact.getFirstName() }} {{ contact.getLastName() }}{{ contact.getUsername() }}{{ contact.getMail() }}{{ contact.getPhone() }}
{% set menu = knp_menu_get('ClarolineCoreBundle:Builder:contactActionsMenu', [], {'user': contact} ) %} {{ knp_menu_render(menu, {}, 'contact_additional_actions') }}
{% if contacts.getNbPages() > 1 %} {{ renderPager(contacts, max, orderedBy, order) }} {% endif %} {% else %}
{{ 'no_contact'|trans({}, 'platform') }}
{% endif %}