{% macro renderPager(pager, search, orderedBy, order, max) %} {{ pagerfanta( pager, 'twitter_bootstrap_translated', { 'proximity' : 1, 'routeName': 'claro_cursus_tool_course_index', 'routeParams': { 'search': search, 'orderedBy': orderedBy, 'order': order, 'max': max } } ) }} {% endmacro %} {% macro sortUrl(search, orderedBy, order, max) %} {% if order == 'ASC' %} {% set newOrder = 'DESC' %} {% else %} {% set newOrder = 'ASC' %} {% endif %} {{ path( 'claro_cursus_tool_course_index', { 'search': search, 'orderedBy': orderedBy, 'order': newOrder , 'max': max } ) }} {% endmacro %} {% from _self import renderPager %} {% from _self import sortUrl %} {% extends "ClarolineCoreBundle:Administration:layout.html.twig" %} {% block title %} {{ parent() ~ ' - ' ~ 'claroline_cursus_tool' | trans({}, 'tools') | striptags | raw ~ ' - ' ~ displayedWords['course'] }} {% endblock %} {% block breadcrumb %} {{ macros.breadcrumbs([ { 'icon': 'fa fa-cog', 'name': 'administration'|trans({}, 'platform'), 'href': path('claro_admin_index') }, { 'name': 'claroline_cursus_tool'|trans({}, 'tools'), 'href': path('claro_cursus_tool_index') }, { 'name': displayedWords['course'], 'href': '' } ]) }} {% endblock %} {% block section_content %}

{{ displayedWords['course'] }}

{{ macros.flashBox() }} {% include 'ClarolineCursusBundle:Cursus:toolMenuIndexTabs.html.twig'%}
{% if search != '' %}
{{ 'results_for_search_on'|trans({}, 'platform') }} : "{{ search }}"
{% endif %} {{ 'create_course'|trans({}, 'cursus') }} {% if search != '' or courses|length > 0 %}



{% endif %} {% if courses|length > 0 %}
{% for course in courses %} {% set courseId = course.getId() %} {% endfor %}
{{ 'title'|trans({}, 'platform') }} {{ 'code'|trans({}, 'platform') }} {{ 'description'|trans({}, 'platform') }} {{ 'actions'|trans({}, 'platform') }}
{{ course.getTitle() }} {{ course.getCode() }} {% if course.getDescription() is not empty %} {% else %} - {% endif %} {% if course.getPublicRegistration() %} {% else %} {% endif %} {% if course.getPublicUnregistration() %} {% else %} {% endif %} {% if course.getRegistrationValidation() %} {% else %} {% endif %}
{% if courses.getNbPages() > 1 %} {{ renderPager(courses, search, orderedBy, order, max) }} {% endif %} {% else %}
{{ 'no_course'|trans({}, 'cursus') }}
{% endif %}
{% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}