{% extends "layout.html" %} {% block body %}
{% if entries|length < 1 %}

{{_('No Results for:')}} {{searchterm}}

{{_('Please try a different search')}}

{% else %}

{{entries|length}} {{_('Results for:')}} {{searchterm}}

{%endif%} {% if g.user.is_authenticated %} {% if g.user.shelf.all() or g.public_shelfes %} {% endif %} {% endif %}
{% for entry in entries %}
{% if entry.has_cover is defined %} {{ entry.title }} {% endif %}

{{entry.title|shortentitle}}

{% for author in entry.authors %} {{author.name.replace('|',',')}} {% if not loop.last %} & {% endif %} {% endfor %}

{% if entry.ratings.__len__() > 0 %}
{% for number in range((entry.ratings[0].rating/2)|int(2)) %} {% if loop.last and loop.index < 5 %} {% for numer in range(5 - loop.index) %} {% endfor %} {% endif %} {% endfor %}
{% endif %}
{% endfor %}
{% endblock %}