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

books borrowed: {{booksBorrowed|length}}

{% for borrowedBook in booksBorrowed %} {% endfor %}
  Book Borrowed from  
{% if borrowedBook.book.book.coverUrl %} {% endif %}
{{borrowedBook.book.book.author}}
{{borrowedBook.book.owner}}
I've returned this book
{%else%} You haven't borrowed any books at the moment {% endif %}
{% if booksLent %}

Books lent: {{booksLent|length}}

{% for borrowedBook in booksLent %} {%if borrowedBook.book.returnNotified %} {%else%} {% endif %} {% endfor %}
  Book Lent to  
{% if borrowedBook.book.book.coverUrl %} {% endif %}
{{borrowedBook.book.book.author}}
{%if borrowedBook.book.currentLocation.actualUser %}
{{borrowedBook.book.currentLocation.actualUser.username}}
has had this book for {{borrowedBook.daysLent}} days {%else%}
{{borrowedBook.book.currentLocation.name}}
has had this book for {{borrowedBook.daysLent}} days {%endif%} {%if borrowedBook.book.returnNotified%}

{{borrowedBook.book.currentLocation.getSensibleName}} notified you they returned this book.

{%endif %}
{{borrowedBook.book.currentLocation.getSensibleName}} returned this book
{%else%} you haven't lent any books at the moment {% endif %}
{%endblock%}