{% load static %}
{% load front_tags %}
{% load spel_tags %}
{% if chapter_annots %}
<p class="btn-info info">Annotations correspondant aux chapitres :</p>
{% endif %}
<div class="row">
  <div class="col-md-8">
	<ul class="list-inline annot-tag-list">
	    {% if q != "" %}<li class="small searched-tag"><span class="glyphicon glyphicon-search small"></span> : {{ q }} <span class="glyphicon glyphicon-remove small"></span></li>{% endif %}
	    {% for t in searched_tags %}{% if t != "" %}<li class="small searched-tag">{{ t }} <span class="glyphicon glyphicon-remove small"></span></li>{% endif %}{% endfor %}
	</ul>
	<p><span class="nb-annotations-found">{{ nb_annotations }}</span> annotation(s) trouvée(s) sur {{ nb_contents }} vidéo(s)</p>
  </div>
  {% if not chapter_annots %}
  <div class="col-md-4">
    <button class="annot-to-chapter btn btn-primary multiline btn-xs">Chapitres correspondant aux annotations</button>
  </div>
  {% endif %}
</div>
{% for res in results %}
  {% for s in res.list %}
  {% with s.tags|get_tags:"type_inter" as tag_list %}
<div class="searched-annot" data-type-inter="{{ tag_list|join:', ' }}" data-start="{{ s.start_ts }}" data-content="{{ s.iri_id }}">
<p>{{ res.content.title }} / {{ s.start_ts|str_duration }} - {{ s.start_ts|add:s.duration|str_duration }} / {{ s.cutting_id }}</p>
<p class="small">{{ s.tags|get_tags:"modscen_and_perso"|join:', ' }}</p>
<hr/>
<p>{{ s.tags|get_tags:"ref_text"|join:', ' }}</p>
<p>{% if s.title != "" %}{{ s.title }}&nbsp;: {% endif %}{{ s.abstract }}</p>
<ul class="list-inline">
    {% for t in tag_list %}
    <li class="annot-tag small">{{ t }}</li>
    {% endfor %}
</ul>
</div>
  {% endwith %}
  {% endfor %}
{% endfor %}
