{% extends "base.html.twig" %} {% block BeforeAnyCSSFile %} {% for file in encore_entry_css_files('select2__init') %} {% endfor %} {% endblock %} {% block ExtraCSSFiles %} {% endblock %} {% block pageLabel %} {{ 'Library Sections' | trans }} {% endblock %} {% block recordLength %} {{ library_book_lis |length }} {% endblock %} {#{% block ContentHead %} {% endblock %}#} {% block MainContent %}

{{ 'Library Sections'|trans }}

{% for book in library_book_lis %} {# list of books which is in the library. #} {# if this book has multiple copies #} {% if book.getLibraryBookCopies.toArray() %} {# visible book copies.#} {% for book_copy in book.getLibraryBookCopies.toArray() %} {# get the list of the user that use this library book copy#} {% if book_copy.libraryAssigneds.toArray() %} {# show the list of all user that used this books #} {% for book_use in book_copy.libraryAssigneds.toArray() %} {% endfor %} {% endif %} {% endfor %} {% endif %} {% endfor %}
{{ 'Book name'|trans }} {{ 'Book Auth'|trans }} {{ 'Book Cost'|trans }} {{ 'Book Fine per hour'|trans }}
{{ book.getBookName }} {{ book.getBookAuth.getAuthName }} {{ book.getBookCost }} {{ book.getBookFinePerHour }}
{{ 'Copy Number'|trans }} {{ 'Condition'|trans }} {{ 'Occupied?'|trans }}
{{ book_copy.getBcNo }} {{ book_copy.getBcConditionRating }} {{ book_copy.getIsOccpuied ? 'Yes' : 'No' }}
{{ 'Student Name'|trans }} {{ 'Issue Date'|trans }} {{ 'Issue end date'|trans }} {{ 'Return date'|trans }} {{ 'Action'|trans }}
{{ book_use.getBookAssignedTo.getfName }} {{ book_use.getBookAssignedTo.getlName }} {{ date_format(book_use.getIssueDate) }} {{ date_format(book_use.getIssusedEndDatetime) }} {{ date_format(book_use.getReturnDate) }}
{% endblock %} {% block ExtraJsFIles %} {% for file in encore_entry_js_files('book_library') %} {% endfor %} {% endblock %}