Browse Source

Más avances

politica
Celestino Rey 1 year ago
parent
commit
ce70aaf401
22 changed files with 16 additions and 387 deletions
  1. BIN
      JugarAlPadel/gestion_reservas/db.sqlite3
  2. +0
    -1
      JugarAlPadel/gestion_reservas/eventos/templates/eventos/index.html
  3. +0
    -7
      JugarAlPadel/gestion_reservas/eventos/templates/eventos/lista_eventos.html
  4. +1
    -7
      JugarAlPadel/gestion_reservas/gestion_reservas/settings.py
  5. +12
    -2
      JugarAlPadel/gestion_reservas/gestion_reservas/urls.py
  6. BIN
      JugarAlPadel/gestion_reservas/mediafiles/vehiculos/bmw.jpg
  7. BIN
      JugarAlPadel/gestion_reservas/mediafiles/vehiculos/bmw.png
  8. BIN
      JugarAlPadel/gestion_reservas/mediafiles/vehiculos/bmw_PMjCK7Q.png
  9. BIN
      JugarAlPadel/gestion_reservas/mediafiles/vehiculos/bmw_cSbhRuf.png
  10. BIN
      JugarAlPadel/gestion_reservas/mediafiles/vehiculos/bmw_x00n9W7.png
  11. BIN
      JugarAlPadel/gestion_reservas/mediafiles/vehiculos/bmw_yVyuq4g.jpg
  12. +1
    -1
      JugarAlPadel/gestion_reservas/templates/_branding.html
  13. +1
    -3
      JugarAlPadel/gestion_reservas/templates/base.html
  14. +1
    -1
      JugarAlPadel/gestion_reservas/templates/index.html
  15. +0
    -21
      JugarAlPadel/gestion_reservas/templates/libros/_menu-libros.html
  16. +0
    -73
      JugarAlPadel/gestion_reservas/templates/libros/detalle_autor.html
  17. +0
    -39
      JugarAlPadel/gestion_reservas/templates/libros/detalle_libro.html
  18. +0
    -23
      JugarAlPadel/gestion_reservas/templates/libros/form_autor.html
  19. +0
    -22
      JugarAlPadel/gestion_reservas/templates/libros/form_libro.html
  20. +0
    -33
      JugarAlPadel/gestion_reservas/templates/libros/index.html
  21. +0
    -77
      JugarAlPadel/gestion_reservas/templates/libros/lista_autores.html
  22. +0
    -77
      JugarAlPadel/gestion_reservas/templates/libros/lista_libros.html

BIN
JugarAlPadel/gestion_reservas/db.sqlite3 View File


+ 0
- 1
JugarAlPadel/gestion_reservas/eventos/templates/eventos/index.html View File

@ -1 +0,0 @@
hola

+ 0
- 7
JugarAlPadel/gestion_reservas/eventos/templates/eventos/lista_eventos.html View File

@ -1,7 +0,0 @@
{% for evento in eventos %}
<h2>{{ evento.nombre }}</h2>
<p>{{ evento.descripcion }}</p>
<p>Fecha: {{ evento.fecha }}</p>
<p>Plazas restantes: {{ evento.plazas_restantes }}</p>
<a href="{% url 'reservar_evento' evento.id %}">Reservar</a>
{% endfor %}

+ 1
- 7
JugarAlPadel/gestion_reservas/gestion_reservas/settings.py View File

@ -126,6 +126,7 @@ L10N = True
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = '.'
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/5.1/howto/static-files/ # https://docs.djangoproject.com/en/5.1/howto/static-files/
@ -143,12 +144,6 @@ LOGOUT_REDIRECT_URL = 'principal'
AUTH_USER_MODEL = "reymotausers.ReyMotaUser" AUTH_USER_MODEL = "reymotausers.ReyMotaUser"
AACCOUNT_AUTHENTICATION_METHOD = 'email'
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_UNIQUE_EMAIL = True
ACCOUNT_USER_MODEL_USERNAME_FIELD = None
ACCOUNT_USERNAME_REQUIRED = False
MEDIA_ROOT = BASE_DIR / "mediafiles" MEDIA_ROOT = BASE_DIR / "mediafiles"
MEDIA_URL = '/media/' MEDIA_URL = '/media/'
@ -156,4 +151,3 @@ if DEBUG is False:
CSRF_TRUSTED_ORIGINS = os.environ.get("CSRF_TRUSTED_ORIGINS").split(" ") CSRF_TRUSTED_ORIGINS = os.environ.get("CSRF_TRUSTED_ORIGINS").split(" ")
CSRF_TRUSTED_ORIGINS = os.environ.get("CSRF_TRUSTED_ORIGINS").split(" ") CSRF_TRUSTED_ORIGINS = os.environ.get("CSRF_TRUSTED_ORIGINS").split(" ")

+ 12
- 2
JugarAlPadel/gestion_reservas/gestion_reservas/urls.py View File

@ -16,9 +16,19 @@ Including another URLconf
""" """
from django.contrib import admin from django.contrib import admin
from django.urls import path, include from django.urls import path, include
from django.conf.urls.static import static
from django.conf import settings
from django.views.generic.base import TemplateView # new
urlpatterns = [ urlpatterns = [
path('obreros/', admin.site.urls), path('obreros/', admin.site.urls),
path("", include('eventos.urls')), # new
]
path("eventos/", include('eventos.urls')),
path("accounts/", include("accounts.urls")), # new
path("accounts/", include("django.contrib.auth.urls")),
path("", TemplateView.as_view(template_name="index.html"),
name="principal"), # new
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

BIN
JugarAlPadel/gestion_reservas/mediafiles/vehiculos/bmw.jpg View File

Before After
Width: 500  |  Height: 500  |  Size: 18 KiB

BIN
JugarAlPadel/gestion_reservas/mediafiles/vehiculos/bmw.png View File

Before After
Width: 360  |  Height: 225  |  Size: 9.5 KiB

BIN
JugarAlPadel/gestion_reservas/mediafiles/vehiculos/bmw_PMjCK7Q.png View File

Before After
Width: 360  |  Height: 225  |  Size: 9.5 KiB

BIN
JugarAlPadel/gestion_reservas/mediafiles/vehiculos/bmw_cSbhRuf.png View File

Before After
Width: 360  |  Height: 225  |  Size: 9.5 KiB

BIN
JugarAlPadel/gestion_reservas/mediafiles/vehiculos/bmw_x00n9W7.png View File

Before After
Width: 360  |  Height: 225  |  Size: 9.5 KiB

BIN
JugarAlPadel/gestion_reservas/mediafiles/vehiculos/bmw_yVyuq4g.jpg View File

Before After
Width: 500  |  Height: 500  |  Size: 18 KiB

+ 1
- 1
JugarAlPadel/gestion_reservas/templates/_branding.html View File

@ -3,6 +3,6 @@
{% load filtros_de_entorno %} {% load filtros_de_entorno %}
<div class="app-branding"> <div class="app-branding">
<a class="app-logo" href="{% url 'principal' %}"><img class="logo-icon me-2" src="{% static 'images/reymota-logo.svg' %}" alt="logo"><span class="logo-text">REYMOTA</span><span style="color: blue; font-size: 14px;"> v {{ "VERSION"|muestra_version }}</span></a>
<a class="app-logo" href="{% url 'eventos:lista_eventos' %}"><img class="logo-icon me-2" src="{% static 'images/reymota-logo.svg' %}" alt="logo"><span class="logo-text">REYMOTA</span><span style="color: blue; font-size: 14px;"> v {{ "VERSION"|muestra_version }}</span></a>
</div><!--//app-branding--> </div><!--//app-branding-->

+ 1
- 3
JugarAlPadel/gestion_reservas/templates/base.html View File

@ -106,9 +106,7 @@
</a><!--//nav-link--> </a><!--//nav-link-->
<div id="submenu-1" class="collapse submenu submenu-1" data-bs-parent="#menu-accordion"> <div id="submenu-1" class="collapse submenu submenu-1" data-bs-parent="#menu-accordion">
<ul class="submenu-list list-unstyled"> <ul class="submenu-list list-unstyled">
<li class="submenu-item"><a class="submenu-link" href="{% url 'libros:principal' %}">Libros</a></li>
<li class="submenu-item"><a class="submenu-link" href="{% url 'repostajes:principal' %}">Vehículos</a></li>
<li class="submenu-item"><a class="submenu-link" href="{% url 'lyrics:principal' %}">Letras</a></li>
<li class="submenu-item"><a class="submenu-link" href="{% url 'eventos:principal' %}">Libros</a></li>
</ul> </ul>
</div> </div>
</li><!--//nav-item--> </li><!--//nav-item-->


+ 1
- 1
JugarAlPadel/gestion_reservas/templates/index.html View File

@ -9,7 +9,7 @@
<div class="app-card alert alert-dismissible shadow-sm mb-4 border-left-decoration" role="alert"> <div class="app-card alert alert-dismissible shadow-sm mb-4 border-left-decoration" role="alert">
<div class="inner"> <div class="inner">
<div class="app-card-body p-3 p-lg-4"> <div class="app-card-body p-3 p-lg-4">
<h3 class="mb-3">¡Bienvenido a sitio REYMOTA.ES!</h3>
<h3 class="mb-3">¡Bienvenido a Jugar al padel entre amigos!</h3>
<div class="row gx-5 gy-3"> <div class="row gx-5 gy-3">
<!-- <!--
<div class="col-12 col-lg-9"> <div class="col-12 col-lg-9">


+ 0
- 21
JugarAlPadel/gestion_reservas/templates/libros/_menu-libros.html View File

@ -1,21 +0,0 @@
<div class="app-utility-item app-user-dropdown dropdown">
<a class="dropdown-toggle" id="user-dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Autores</a>
<ul class="dropdown-menu" aria-labelledby="user-dropdown-toggle">
<li>
<a class="dropdown-item" href="{% url 'libros:lista_autores' %}">Ver</a>
</li>
</ul>
</div><!--//app-utility-item-->
<div class="app-utility-item app-user-dropdown dropdown">
<a class="dropdown-toggle" id="user-dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Libros</a>
<ul class="dropdown-menu" aria-labelledby="user-dropdown-toggle">
<li>
<a class="dropdown-item" href="{% url 'libros:lista_libros' %}">Ver</a>
</li>
</ul>
</div><!--//app-utility-item-->

+ 0
- 73
JugarAlPadel/gestion_reservas/templates/libros/detalle_autor.html View File

@ -1,73 +0,0 @@
{% extends 'base.html' %}
{% block menuapp %}
{% include 'libros/_menu-libros.html' %}
{% endblock menuapp %}
{% block content %}
<div class="container-xl">
<div class="app-card app-card-notification shadow-sm mb-4">
<div class="app-card-header px-4 py-3">
<div class="row g-3 align-items-center">
<div class="col-12 col-lg-auto text-center text-lg-start">
{% if autor.foto %}
<p><img src="{{ autor.foto.url }}" alt="{{ autor.nombre}}" style="width:200px;height:200px;"></p>
{% else %}
<p>No hay imágen disponible</p>
{% endif %}
</div>
<div class="col-12 col-lg-auto text-center text-lg-start">
<h4>{{ autor.nombre }}</h4>
<ul class="notification-meta list-inline mb-0">
<li class="list-inline-item">{{ autor.nombre }}</li>
</ul>
</div>
</div>
</div>
<div class="app-card-body p-4">
{% if libros %}
<table class="table app-table-hover mb-0 text-left">
<thead>
<tr>
<th class="cell">Título</th>
<th class="cell">Portada</th>
</tr>
</thead>
<tbody>
{% for libro in libros %}
<tr>
<td class="cell"><a href="{% url 'libros:detalle_libro' libro.id %}">{{ libro.titulo }}</a></td>
{% if libro.portada %}
<td class="cell"><img src="{{ libro.portada.url }}" alt="Portada del libro" width="200"></td>
{% else %}
<td>Sin imagen</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>No se han encontrado libros para este autor</p>
{% endif %}
</div>
</div>
<div class="row g-3 mb-4 align-items-center justify-content-between">
<div class="col-auto">
<a class="btn app-btn-secondary" href="{% url 'libros:lista_libros' %}">Volver al inicio</a>
</div>
<div class="col-auto">
<a class="btn app-btn-primary" href="{% url 'libros:nuevo_libro' %}">Añadir libro</a> <!-- Faltaría poner el id del autor-->
</div>
</div>
</div>
{% endblock %}

+ 0
- 39
JugarAlPadel/gestion_reservas/templates/libros/detalle_libro.html View File

@ -1,39 +0,0 @@
{% extends 'base.html' %}
{% block menuapp %}
{% include 'libros/_menu-libros.html' %}
{% endblock menuapp %}
{% block content %}
<div class="container-xl">
<div class="app-card app-card-notification shadow-sm mb-4">
<div class="app-card-header px-4 py-3">
<div class="row g-3 align-items-center">
<div class="col-12 col-lg-auto text-center text-lg-start">
{% if libro.portada %}
<p><img src="{{ libro.portada.url }}" alt="{{ libro.titulo }}" style="width:200px;height:200px;"></p>
{% else %}
<p>No hay imágen disponible</p>
{% endif %}
{% if libro.archivo %}
<p><a href="{{ libro.archivo.url }}">Descargar</a></p>
{% endif %}
</div><!--//col-->
<div class="col-12 col-lg-auto text-center text-lg-start">
<h4 class="notification-title mb-1">{{ libro.titulo }}</h4>
<ul class="notification-meta list-inline mb-0">
<li class="list-inline-item">{{ libro.autor.nombre }}</li>
<li class="list-inline-item">|</li>
<li class="list-inline-item">{{ libro.fecha_publicacion }}</li>
<li class="list-inline-item">|</li>
<li class="list-inline-item"><a href="{% url 'libros:detalle_autor' libro.autor_id %}">{{ libro.autor.nombre }}</a></li>
</ul>
</div><!--//col-->
</tr>
</div><!--//row-->
</div><!--//app-card-header-->
</div><!--//app-card-->
{% endblock %}

+ 0
- 23
JugarAlPadel/gestion_reservas/templates/libros/form_autor.html View File

@ -1,23 +0,0 @@
{% extends 'base.html' %}
{% block menuapp %}
{% include 'libros/_menu-libros.html' %}
{% endblock menuapp %}
{% block content %}
<div class="column is-4 is-offset-4">
<h3>{% if form.instance.pk %}Editar Autor{% else %}Nuevo Autor{% endif %}</h3>
<div class="box">
<form method="POST" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="text mb-3">
<button type="submit" class="btn app-btn-primary w-100 theme-btn mx-auto">Guardar</button>
</div>
</form>
</div>
</div>
{% endblock %}

+ 0
- 22
JugarAlPadel/gestion_reservas/templates/libros/form_libro.html View File

@ -1,22 +0,0 @@
{% extends 'base.html' %}
{% block menuapp %}
{% include 'libros/_menu-libros.html' %}
{% endblock menuapp %}
{% block content %}
<div class="column is-4 is-offset-4">
<h3>{% if form.instance.pk %}Editar Libro{% else %}Nuevo Libro{% endif %}</h3>
<div class="box">
<form method="POST" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="text mb-3">
<button type="submit" class="btn app-btn-primary w-100 theme-btn mx-auto">Guardar</button>
</div>
</form>
</div>
</div>
{% endblock %}

+ 0
- 33
JugarAlPadel/gestion_reservas/templates/libros/index.html View File

@ -1,33 +0,0 @@
{% extends 'base.html' %}
{% block menuapp %}
{% include 'libros/_menu-libros.html' %}
{% endblock menuapp %}
{% block content %}
<div class="container-xl">
<h1 class="app-page-title">Introducción</h1>
<div class="app-card alert alert-dismissible shadow-sm mb-4 border-left-decoration" role="alert">
<div class="inner">
<div class="app-card-body p-3 p-lg-4">
<h3 class="mb-3">¡Bienvenido a la gestión de libros!</h3>
<div class="row gx-5 gy-3">
<!--
<div class="col-12 col-lg-9">
<div>Pensado inicialmente para guardar las letras de las canciones de Bruce Springsteen.</div>
</div>--><!--//col-->
</div><!--//row-->
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div><!--//app-card-body-->
</div><!--//inner-->
</div><!--//app-card-->
</div><!--//container-fluid-->
{% endblock %}

+ 0
- 77
JugarAlPadel/gestion_reservas/templates/libros/lista_autores.html View File

@ -1,77 +0,0 @@
{% extends 'base.html' %}
{% block menuapp %}
{% include 'libros/_menu-libros.html' %}
{% endblock menuapp %}
{% 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">Autores</h1>
</div>
</div><!--//row-->
<div class="col-auto">
<div class="page-utilities">
<div class="row g-4 justify-content-start justify-content-md-end align-items-center">
<div class="col-auto">
<a class="btn app-btn-primary" href="{% url 'libros:nuevo_autor' %}">Añadir autor</a>
</div>
</div><!--//row-->
</div><!--//table-utilities-->
</div><!--//col-auto-->
<div class="row g-4">
{% for autor in autores %}
<div class="col-6 col-md-4 col-xl-3 col-xxl-2">
<div class="app-card app-card-doc shadow-sm h-100">
<div class="app-card-body p-3 has-card-actions">
{% if autor.foto %}
<img src="{{ autor.foto.url }}" alt="Foto del autor" style="width:200px;height:200px;">
{% else %}
Sin imágen
{% endif %}
<h4 class="app-doc-title truncate mb-0"><a href="{% url 'libros:detalle_autor' autor.id %}">{{ autor.nombre}}</a></h4>
<div class="app-card-actions">
<div class="dropdown">
<div class="dropdown-toggle no-toggle-arrow" data-bs-toggle="dropdown" aria-expanded="false">
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-three-dots-vertical" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/>
</svg>
</div><!--//dropdown-toggle-->
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="{% url 'libros:detalle_autor' autor.id %}"><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-eye me-2" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.134 13.134 0 0 0 1.66 2.043C4.12 11.332 5.88 12.5 8 12.5c2.12 0 3.879-1.168 5.168-2.457A13.134 13.134 0 0 0 14.828 8a13.133 13.133 0 0 0-1.66-2.043C11.879 4.668 10.119 3.5 8 3.5c-2.12 0-3.879 1.168-5.168 2.457A13.133 13.133 0 0 0 1.172 8z"/>
<path fill-rule="evenodd" d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>Ver</a></li>
<li><a class="dropdown-item" href="{% url 'libros:editar_autor' autor.id %}"><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-pencil me-2" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168l10-10zM11.207 2.5L13.5 4.793 14.793 3.5 12.5 1.207 11.207 2.5zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293l6.5-6.5zm-9.761 5.175l-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325z"/>
</svg>Editar</a></li>
<li><a class="dropdown-item" href="{% url 'libros:eliminar_autor' autor.id %}"><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>Eliminar</a></li>
<!--
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#"><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-trash me-2" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"/>
<path fill-rule="evenodd" d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"/>
</svg>Delete</a></li>
-->
</ul>
</div><!--//dropdown-->
</div><!--//app-card-actions-->
</div><!--//app-card-body-->
</div>
</div>
{% endfor %}
</div>
</div><!--//container-fluid-->
{% endblock %}

+ 0
- 77
JugarAlPadel/gestion_reservas/templates/libros/lista_libros.html View File

@ -1,77 +0,0 @@
{% extends 'base.html' %}
{% block menuapp %}
{% include 'libros/_menu-libros.html' %}
{% endblock menuapp %}
{% 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-->
<div class="col-auto">
<div class="page-utilities">
<div class="row g-4 justify-content-start justify-content-md-end align-items-center">
<div class="col-auto">
<a class="btn app-btn-primary" href="{% url 'libros:nuevo_libro' %}">Añadir libro</a>
</div>
</div><!--//row-->
</div><!--//table-utilities-->
</div><!--//col-auto-->
<div class="row g-4">
{% for libro in libros %}
<div class="col-6 col-md-4 col-xl-3 col-xxl-2">
<div class="app-card app-card-doc shadow-sm h-100">
<div class="app-card-body p-3 has-card-actions">
{% if libro.portada %}
<a><img src="{{ libro.portada.url }}" alt="{{ libro.titulo }}," style="width:50px;height:50px;"></a>
{% else %}
Sin imágen
{% endif %}
<h4 class="app-doc-title truncate mb-0"><a href="{% url 'libros:detalle_libro' libro.id %}">{{ libro.titulo }}</a></h4>
<div class="app-doc-meta">
<ul class="list-unstyled mb-0">
<li><span class="text-muted">Autor: </span><a href="{% url 'libros:detalle_autor' libro.autor.id %}">{{ libro.autor.nombre }}</a></li>
</ul>
</div><!--//app-doc-meta-->
<div class="app-card-actions">
<div class="dropdown">
<div class="dropdown-toggle no-toggle-arrow" data-bs-toggle="dropdown" aria-expanded="false">
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-three-dots-vertical" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/>
</svg>
</div><!--//dropdown-toggle-->
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="{% url 'libros:editar_libro' libro.id %}"><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-pencil me-2" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168l10-10zM11.207 2.5L13.5 4.793 14.793 3.5 12.5 1.207 11.207 2.5zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293l6.5-6.5zm-9.761 5.175l-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325z"/>
</svg>Editar</a></li>
<li><a class="dropdown-item" href="{{ libro.archivo.url }}"><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></li>
<!--
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#"><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-trash me-2" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"/>
<path fill-rule="evenodd" d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"/>
</svg>Delete</a></li>
-->
</ul>
</div><!--//dropdown-->
</div><!--//app-card-actions-->
</div><!--//app-card-body-->
</div>
</div>
{% endfor %}
</div>
</div><!--//container-fluid-->
{% endblock %}

Loading…
Cancel
Save