{% extends "ldt/ldt_base.html" %}
{% load i18n %}

{% block css_import %}
    {{ block.super }}
    <link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/workspace.css" />
{% endblock %}


{% block content %}

{% if msg %}
{{ msg }}
{% else %}

	{% trans "Results for " %} <b> {{ search }}</b> :
	
	{% autoescape off %}
	<ul>
	{% for res in results.object_list %}
		<li>
			<a href="{% url ldt.ldt_utils.views.display_highlighted_seg res.project_id res.iri_id res.ensemble_id res.decoupage_id res.element_id%}">{{ res.segment_title }}</a><br />
			{{ res.context }}<br />	
		</li>
	{% endfor %}
	</ul>
	{% endautoescape %}


<div class="pagination">
    <span class="step-links">
        {% if results.has_previous %}
            <a href="{% url ldt.ldt_utils.views.search_listing %}?page={{ results.previous_page_number }}">{% trans "previous" %}</a>
        {% endif %}

		{% if results.paginator.num_pages > 1 %}
        <span class="current">
           {% blocktrans with number=results.number num_pages=results.paginator.num_pages%}Page {{number}} of  {{num_pages}}{% endblocktrans %}
        </span>
        {% endif %}

        {% if results.has_next %}
            <a href="{% url ldt.ldt_utils.views.search_listing %}?page={{ results.next_page_number }}">{% trans "next" %}</a>
        {% endif %}
    </span>
</div>

{% endif %}

{% endblock %}