{% for k, v in app.request.query %} {% if k|lower not in ['search', 'page', 'asset_filter', 'author', 'genre'] %} {% endif %} {% endfor %}
Displaying {{ (borrowed_assets.getCurrentPageNumber()-1) * borrowed_assets.getItemNumberPerPage() + 1 }} to {{ ((borrowed_assets.getCurrentPageNumber()-1) * borrowed_assets.getItemNumberPerPage()) + (borrowed_assets.getItems()|length) }} of {{ borrowed_assets.getTotalItemCount() }} {% trans %}Library Asset{% endtrans %} records
{% for entity in borrowed_assets %} {% endfor %}
{{ knp_pagination_sortable(borrowed_assets, 'ISBN', 'b.isbn') }} {{ knp_pagination_sortable(borrowed_assets, 'Title', 'b.title') }} {{ knp_pagination_sortable(borrowed_assets, 'Author', 'b.author') }} {{ knp_pagination_sortable(borrowed_assets, 'Genre', 'b.genre') }} Status
{{ entity.isbn|trim }} {{ entity.title|trim }} {{ entity.author|trim }} {{ entity.genre|trim }} {% set current_loan = null %} {% if entity.getLoans|length > 0 %} Loaned to {% for item in entity.getLoans %} {% if loop.first %} {% set current_loan = item %} {% endif %} {% if item.customer is not null %}{{ item.customer.firstname }} {{ item.customer.lastname }}{% endif %}.
{% endfor %} {% else %} Available.
{% endif %} {% if entity.scheduledLoans|length > 0 %} There are {{ entity.scheduledLoans|length }} people waiting to loan this book.
{% endif %} {% set loan_pos = null %} {% for item in entity.scheduledLoans %} {% if item.customer.id == customer.id %} {% set loan_pos = loop.index %} {% endif %} {% endfor %} {% if loan_pos is not null %} You are number {{ loan_pos }} in the list. {% endif %}
{% if current_loan is null or current_loan.customer != customer%} {% if loan_pos is null %} Request Loan {% else %} Unlist Me {% endif %} {% endif %}
{% set current_dt = "now" %} {% for entity in cust_borrowed_assets %} {% endfor %}
ISBN Title Author Genre Status Loan Date Return Date
{{ entity.isbn|trim }} {{ entity.title|trim }} {{ entity.author|trim }} {{ entity.genre|trim }} {% set current_loan = null %} {% if entity.getLoans|length > 0 %} Loaned to {% for item in entity.getLoans %} {% if loop.first %} {% set current_loan = item %} {% endif %} {% if item.customer is not null %}{{ item.customer.firstname }} {{ item.customer.lastname }}{% endif %}.
{% endfor %} {% endif %} {% if current_loan is not null and current_loan.customer == customer and current_dt > current_loan.returnDate %}Your loan is overdue!
{% endif %} {% if entity.scheduledLoans|length > 0 %} There are {{ entity.scheduledLoans|length }} people waiting to loan this book.
{% endif %} {% set loan_pos = null %} {% for item in entity.scheduledLoans %} {% if item.customer.id == customer.id %} {% set loan_pos = loop.index %} {% endif %} {% endfor %} {% if loan_pos is not null %} You are number {{ loan_pos }} in the list. {% endif %}
{% if current_loan is not null and current_loan.customer == customer%}{{ current_loan.loanDate|date("Y-m-d") }}{% endif %} {% if current_loan is not null and current_loan.customer == customer%}{{ current_loan.returnDate|date("Y-m-d") }}{% endif %} {% if current_loan is null or current_loan.customer != customer %} {% if loan_pos is null %} Request Loan {% else %} Unlist Me {% endif %} {% endif %}