{% extends "base.html" %} {% load staticfiles %} {% block content %}
{% if messages %} {% for message in messages %}{{ message }}
{% endfor %} {% endif %} {% if context %}# | Book Title | Author(s) | Total Books | {% if user.is_authenticated %}Available Books | Action | {% endif %}|
---|---|---|---|---|---|---|
{{ forloop.counter0|add:context.start_index }} | {{ book.title }} | {% for author in book.author.all %} {{ author }}{% if not forloop.last %}, {% endif %}{% endfor %} | {{ book.total_quantity }} | {% if user.is_authenticated %}{{ book.quantity }} | {% endif %} {% if user.is_authenticated %} {% if user.groups.all.0.name == 'Readers' %}{% if book.status == 'l' %} {% elif book.id in book_ids %} {% else %} {% endif %} | {% else %}{% if book.quantity > 0 %} Lend Book {% endif %} Add Copy | {% endif %} {% endif %}
No such record found!
{% endif %}