|
|
{% extends 'base.html' %}
|
|
|
|
|
|
{% block content %}
|
|
|
<div class="container-xl">
|
|
|
|
|
|
<div class="row g-3 mb-4 align-items-center justify-content-between">
|
|
|
<div class="col-auto">
|
|
|
<h1 class="app-page-title mb-0">Libros</h1>
|
|
|
</div>
|
|
|
</div><!--//row-->
|
|
|
|
|
|
|
|
|
<nav id="orders-table-tab" class="orders-table-tab app-nav-tabs nav shadow-sm flex-column flex-sm-row mb-4">
|
|
|
<a class="flex-sm-fill text-sm-center nav-link active" id="libros-tab" data-bs-toggle="tab" href="#libros" role="tab" aria-controls="libros" aria-selected="true">Libros</a>
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
<div class="tab-content" id="orders-table-tab-content">
|
|
|
<div class="tab-pane fade show active" id="libros" role="tabpanel" aria-labelledby="libros-tab">
|
|
|
<div class="app-card app-card-orders-table shadow-sm mb-5">
|
|
|
<div class="app-card-body">
|
|
|
<div class="table-responsive">
|
|
|
<table class="table app-table-hover mb-0 text-left">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th class="cell">#</th>
|
|
|
<th class="cell">anno</th>
|
|
|
<th class="cell">Título</th>
|
|
|
<th class="cell">Autor</th>
|
|
|
<th class="cell">Portada</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
{% for libro in libros %}
|
|
|
<tr>
|
|
|
<td class="cell">{{ libro.id }}</td>
|
|
|
<td class="cell">{{ libro.anno }}</td>
|
|
|
<td class="cell">{{ libro.titulo }}</td>
|
|
|
<td class="cell">{{ libro.autores.apellido }}, {{ libro.autores.nombre }}</td>
|
|
|
{% if libro.portada %}
|
|
|
<td class="cell"><img src="{{ url_for('paginas.uploaded_file', filename=libro.portada) }}" alt="Sin imagen" style="width:200px;height:200px;"></td>
|
|
|
{% else %}
|
|
|
<p>Sin imagen</p>
|
|
|
{% endif %}
|
|
|
<td><a class="dropdown-item" href="{{ url_for('paginas.uploaded_file', filename=libro.epub) }}"><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-download me-2" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
|
<path fill-rule="evenodd" d="M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z"/>
|
|
|
<path fill-rule="evenodd" d="M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z"/>
|
|
|
</svg>Descargar</a></td>
|
|
|
</tr>
|
|
|
{% endfor %}
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div><!--//table-responsive-->
|
|
|
</div><!--//app-card-body-->
|
|
|
</div><!--//app-card-->
|
|
|
</div><!--//tab-pane-->
|
|
|
</div><!--//tab-content-->
|
|
|
</div><!--//container-fluid-->
|
|
|
{% endblock %}
|