{% macro renderPager(pager, cursus, search, orderedBy, order, max) %} {{ pagerfanta( pager, 'twitter_bootstrap_translated', { 'proximity' : 1, 'routeName': 'claro_cursus_add_courses_users_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_add_courses_users_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 courses|length == 0 %}
{{ 'no_course'|trans({}, 'cursus') }}
{% else %}
{% for course in courses %} {% endfor %}
{{ 'title'|trans({}, 'platform') }} {{ 'code'|trans({}, 'platform') }} {{ 'description'|trans({}, 'platform') }} {{ 'public_registration'|trans({}, 'platform') }}
{{ course.getTitle() }} {{ course.getCode() }} {% if course.getDescription() is not empty %} {% else %} - {% endif %} {% if course.getPublicRegistration() %} {% else %} {% endif %} {{ 'add_course'|trans({}, 'cursus') }}
{% if courses.getNbPages() > 1 %} {{ renderPager(courses, cursus, search, orderedBy, order, max) }} {% endif %} {% endif %} {% block javascripts %} {% endblock %}