{% macro renderPager(pager, cursus, search, orderedBy, order, max) %} {{ pagerfanta( pager, 'twitter_bootstrap_translated', { 'proximity' : 1, 'routeName': 'claro_cursus_registration_unregistered_groups_list', 'routeParams': { 'cursus': cursus.getId(), 'search': search, 'orderedBy': orderedBy, 'order': order, 'max': max } } ) }} {% endmacro %} {% macro sortUrl(cursus, search, orderedBy, order, max) %} {% if order == 'ASC' %} {% set newOrder = 'DESC' %} {% else %} {% set newOrder = 'ASC' %} {% endif %} {{ path( 'claro_cursus_registration_unregistered_groups_list', { 'cursus': cursus.getId(), 'search': search, 'orderedBy': orderedBy, 'order': newOrder, 'max': max } ) }} {% endmacro %} {% from _self import renderPager %} {% from _self import sortUrl %} {% if search != '' %}
{{ 'results_for_search_on'|trans({}, 'platform') }} : "{{ search }}"
{% endif %}



{% if groups|length == 0 %}
{{ 'no_group'|trans({}, 'platform') }}
{% else %}
{% for group in groups %} {% endfor %}
{{ 'name'|trans({}, 'platform') }}
{{ group.getName() }} {{ 'register'|trans({}, 'cursus') }}
{% if groups.getNbPages() > 1 %} {{ renderPager(groups, cursus, search, orderedBy, order, max) }} {% endif %} {% endif %}