{% extends "layout.html" %} {% block body %} {% if g.user.show_random_books() %}

{{_('Discover (Random Books)')}}

{% for entry in random %}

{{entry.title|shortentitle}}

{{entry.authors[0].name}}

{% 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 %}
{% endif %}

{{title}}

{% for entry in entries %}

{{entry.title|shortentitle}}

{% for author in entry.authors %} {{author.name}} {% 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 %}