Skip to content
Snippets Groups Projects

Add function to quick open a copy. Closes #8.

Merged Tom Teichler requested to merge issue8 into master
Files
6
{% extends "core/base.html" %}
{% load bootstrap4 font_awesome i18n staticfiles %}
{% load render_table from django_tables2 %}
{% block bootstrap4_extra_head %}
{{ block.super }}
<link rel="stylesheet" href="{% static 'css/exlibris/books.css' %}" />
{% endblock %}
{% block content %}
<div class="d-flex justify-content-between">
<div>
<h1>{{ book_copy.book.title }}</h1>
</div>
<div class="btn-group" role="group" aria-label="Book actions">
<a href="{% url 'edit_book_copy_by_id' id_=book_copy.id %}" class="btn btn-secondary">
{% fa 'pencil' %}
</a>
</div>
</div>
<table class="table table-responsive-xl table-border table-striped">
<tr>
<td rowspan="4">
{% if book_copy.book.cover %}
<img class="book-img" src="{{ book_copy.book.cover.url }}" alt="{{ book_copy.book.title }}" />
{% else %}
<img class="book-img" src="{% static 'exlibris/img/fallback.png' %}" alt="{{ book_copy.book.title }}" />
{% endif %}
</td>
<td>{% fa 'book' %}</td>
<td colspan="3">{{ book_copy.book.title }}</td>
</tr>
<tr>
<td>{% fa 'pencil' %}</td>
<td colspan="3">{{ book_copy.book.author }}</td>
</tr>
<tr>
<td>{% fa 'building' %}</td>
<td colspan="3">{{ book_copy.book.publisher }}</td>
</tr>
<tr>
<td>{% fa 'hashtag' %}</td>
<td>{{ book_copy.book.edition }}</td>
<td>{% fa 'calendar-edit' %}</td>
<td>{{ book_copy.book.year }}</td>
</tr>
</table>
<h3>{% blocktrans %}Information about the borrower{% endblocktrans %}</h3>
<table class="table table-responsive-xl table-border table-striped">
<tr>
<td>{% fa 'user' %}</td>
<td colspan="3">{{ book_copy.borrower.Person.first_name }} {{ book_copy.borrower.Person.last_name }}</td>
</tr>
<tr>
<td>{% fa 'medal' %}</td>
<td colspan="3">{{ book_copy.get_condition_display }}</td>
</tr>
</table>
{% endblock %}
Loading