{% extends "profile/myprofile.html" %} {% load smart_if %} {% block profileContent %}
{% if booksOwned %}

My Books:

Add books {% if booksOwned %} Edit book list {%endif%}

{% for bookOwned in booksOwned.object_list %} {% endfor %}
  Title Author Status  
{% if bookOwned.book.book.coverUrl %} {% endif %} {{bookOwned.book.book.title}} {{bookOwned.book.book.author}} {% ifequal bookOwned.status 'lent'%} {%if bookOwned.book.currentLocation.actualUser %}
{{bookOwned.book.currentLocation.actualUser.username}}
has had this book for {{bookOwned.daysLent}} days {%else%}
{{bookOwned.book.currentLocation.name}}
has had this book for {{bookOwned.daysLent}} days {%endif%} {% endifequal %}
{% if booksOwned.has_previous %} Previous page {% endif %} {% if booksOwned.has_next %} Next page {% endif %} {% else %}

You have no books - go find some more!

{% endif %}
{%endblock%}