Magazine UI (#54)

* Work in progress to implement magazines and issues UI

* Fully implement UI for magazines
This commit is contained in:
2025-12-10 22:58:39 +01:00
committed by GitHub
parent 6b10051bc4
commit 39b0a9378b
14 changed files with 646 additions and 23 deletions

View File

@@ -89,7 +89,30 @@
</tr>
<tr>
<th class="w-33" scope="row">Publisher</th>
<td>{{ book.publisher }}</td>
<td>
<img src="{{ book.publisher.country.flag }}" alt="{{ book.publisher.country }}"> {{ book.publisher }}
{% if book.publisher.website %} <a href="{{ book.publisher.website }}" target="_blank"><i class="bi bi-box-arrow-up-right"></i></a>{% endif %}
</td>
</tr>
{% elif type == "magazineissue" %}
<tr>
<th class="w-33" scope="row">Magazine</th>
<td><a href="{% url 'magazine' book.magazine.pk %}">{{ book.magazine }}</a></td>
</tr>
<tr>
<th class="w-33" scope="row">Publisher</th>
<td>
<img src="{{ book.publisher.country.flag }}" alt="{{ book.publisher.country }}"> {{ book.publisher }}
{% if book.publisher.website %} <a href="{{ book.publisher.website }}" target="_blank"><i class="bi bi-box-arrow-up-right"></i></a>{% endif %}
</td>
</tr>
<tr>
<th class="w-33" scope="row">Issue</th>
<td>{{ book.issue_number }}</td>
</tr>
<tr>
<th class="w-33" scope="row">Date</th>
<td>{{ book.publication_year|default:"-" }} / {{ book.publication_month|default:"-" }}</td>
</tr>
{% endif %}
<tr>
@@ -104,10 +127,12 @@
<th scope="row">Number of pages</th>
<td>{{ book.number_of_pages|default:"-" }}</td>
</tr>
{% if type == "boook" or type == "catalog" %}
<tr>
<th scope="row">Publication year</th>
<td>{{ book.publication_year|default:"-" }}</td>
</tr>
{% endif %}
{% if book.description %}
<tr>
<th class="w-33" scope="row">Description</th>

View File

@@ -10,6 +10,9 @@
{% if catalogs_menu %}
<li><a class="dropdown-item" href="{% url 'catalogs' %}">Catalogs</a></li>
{% endif %}
{% if magazines_menu %}
<li><a class="dropdown-item" href="{% url 'magazines' %}">Magazines</a></li>
{% endif %}
</ul>
</li>
{% endif %}