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

{{_('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}}

{% if entries[0] %} {% for entry in entries %}

{{entry.title|truncate(60)}}

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