{% extends '_layout.html' %}

{% block breadcrumb %}
	<li><a href="{% url 'index' %}">Accueil</a></li>
	<li><a>Résultat de la recherche</a></li>
{% endblock %}

{% block main %}

	<ul class="alt">
	{% for r in results %}
		<li>
			<span style="display: inline-block; width: 50px;"><b>{{ r.model_name|title }}</b></span>
			{% if r.model_name == 'epic'|lower %}
				<a href="{% url 'epic_details' epic_id=r.id %}">  {{ r.name }}</a>
			{% else %}
				<a href="{% url 'story_details' story_id=r.id %}">{{ r.name }}</a>
			{% endif %}
		</li>
	{% endfor %}
	</ul>

	<div class="pagination">
    	{% for numpage in pages %}
    		{% if numpage == stories.number %}
    			<a style="color: grey;">{{ numpage }}</a>
    		{% else %}
    			<a href="?page={{ numpage }}">{{ numpage }}</a>
    		{% endif %}
    	{% endfor %}
	</div>
	 
{% endblock %}