{% extends 'base.html' %} {% load nepali %} {% load datefilters %} {% load group_filters %} {% load bookFilters %} {% block content %}
{% if book.is_discarded == False and user.is_authenticated == True and user|hasPerm:"head.change_book" and user|hasPerm:"head.delete_book" %} {{ globals.text.discard_book }} {{ globals.text.add_new_field }} {{ globals.text.see_all_new_fields }} {{ globals.text.edit_book }} {% elif book.is_discarded == False and user.is_authenticated == True and user|hasPerm:"head.change_book" and user|hasPerm:"head.delete_book" == 0 %} {{ globals.text.edit_book }} {% elif book.is_discarded == False and user.is_authenticated == True and user|hasPerm:"head.change_book" == 0 and user|hasPerm:"head.delete_book" %} {{ globals.text.discard_book }} {% elif book.is_discarded == True and user.is_authenticated == True %} Revive Book {% endif %}

{% if book.get_authors %}{{ book.get_pretty_authors|title }}को {% endif %} {{ book.get_pretty_title|title }}

{% if book.is_borrowed %}
{{ globals.text.borrowed_by }} {{ book.get_borrower.get_name }}
{% endif %} {% for each in book.get_all_attr_for_spreadsheet %} {% if each.0 == "Author" %} {% else %} {% endif %} {% endfor %} {% for field in genericFields %} {% endfor %}
{{ each.0|nepali }}{{ each.1|title }}{{each.1}}
{{ field.0 }} {{ field.1 }}
{{globals.text.is_book_available }} {% if book.is_borrowed == False %} {{globals.text.yes}} {% else %} {{globals.text.no}} {% endif %}
Is there any late fees? {% if book.is_borrowed == False %} {{globals.text.no}} {% elif late_fees != 0 %} {{globals.text.yes}}, {{ globals.text.late_fees }} :{{ late_fees }} {% elif late_fees == 0 %} {{globals.text.no}} {% endif %}
{% if request.user.is_staff and book.saved_by.all|length > 0 %}

किताब दर्ताको इतिहास

{% for booksaver in book.saved_by.all %} {% endfor %}
{{ globals.text.name }} {{globals.text.date_and_time}}
{{booksaver.user.get_name}} {{booksaver.date|date:"d M Y"|nepali}}, {{ booksaver.date|date:"H:i A" }}
{% endif %}
{% endblock %}