
{% if elements|length %}
  {% if not app.request.isXmlHttpRequest %}<ul class="elements">{% endif %}
    {% for element in elements %} 
      <li class="element 

{% if loop.index0 is even %}
  {% if invertcolor is not defined %}
    even
  {% elseif invertcolor %}
    odd
  {% else %}
    even
  {% endif %}
{% else %}
  {% if invertcolor is not defined %}
    odd
  {% elseif invertcolor %}
    even
  {% else %}
    odd
  {% endif %}
{% endif %}" id="element_{{ element.id }}">
             
        {% include "MuzichCoreBundle:SearchElement:element.html.twig" %}

      </li>
    {% endfor %} 
  {% if not app.request.isXmlHttpRequest %}</ul>{% endif %}

{% else %}

  <ul class="elements"></ul>

  <div class="no_elements">
    {% if noelements_filter is defined %}
      <p class="no-elements">
        {% autoescape false %}
          {{ 'noelements.sentence_filter'|trans({
            '%link_string%': 'noelements.sentence_filter_link_string'|trans({}, 'elements')
          }, 'elements') }}
        {% endautoescape %}
      </p>
    {% else %}
      <p class="no-elements">{{ 'noelements.sentence'|trans({}, 'elements') }}</p>
    {% endif %}
  </div>

{% endif %}