{{ knp_pagination_render(results) }}
{% for message in app.flashes('success') %}
{{ message }}
{% endfor %}
{{ knp_pagination_sortable(results, 'ID', 'c.id') }}
{{ knp_pagination_sortable(results, 'First Name', 'c.firstName') }}
{{ knp_pagination_sortable(results, 'Last Name', 'c.lastName') }}
{{ knp_pagination_sortable(results, 'Company', 'co.company') }}
{{ knp_pagination_sortable(results, 'Position', 'c.position') }}
{{ knp_pagination_sortable(results, 'Direct line', 'c.directPhone') }}
{{ knp_pagination_sortable(results, 'Mobile', 'c.mobile') }}
{{ knp_pagination_sortable(results, 'Added by', 'c.source') }}
{% if slug is defined %}
{% set toPopup = slug %}
{% endif %}
{% for candidate in results %}
{% set isContactType = candidate.contactType %}
{{ candidate.id }}
{{ candidate.firstName }}
{{ candidate.lastName }}
{{ candidate.company }}
{{ candidate.position }}
{% if isContactType == 1 and (is_granted('ROLE_ADMIN')or is_granted('ROLE_SUPERVISOR') or is_granted('ROLE_USER') ) %}{{candidate.directPhone|replace({" ":""})}}{% elseif isContactType == 0 %} {{ candidate.directPhone }} {% else %}(only admin){% endif %}
{% if isContactType == 1 and (is_granted('ROLE_ADMIN') or is_granted('ROLE_SUPERVISOR') or is_granted('ROLE_USER') ) %}{{ candidate.mobile }} {% elseif isContactType == 0 %} {{ candidate.mobile }} {% else %} (only admin) {% endif %}
{{ candidate.source }}
{% endfor %}
{# Commented out AngularJS code
{% verbatim %}
...
{% endverbatim %}
#}
{# set paginator for employees tabs #}
{% if paginator is defined and paginator == true %}
{{ knp_pagination_render(results) }}
{% endif %}
{% if toPopup is defined and toPopup is not null %}
{% include 'include/inline_editable.html.twig' with {
'editId': toPopup ,
'editURL': path('candidates_update', { 'id': toPopup }),
'container': '#CandidateCtrl' }
%}
{% endif %}