Browse Source

Quito referencias a vehiculos, repostajes, etc

main
Celestino Rey 8 months ago
parent
commit
63056a3538
4 changed files with 7 additions and 138 deletions
  1. +2
    -14
      src/templates/macrociclos/detalle_deportista.html
  2. +3
    -45
      src/templates/macrociclos/detalle_entrenador.html
  3. +0
    -31
      src/templates/macrociclos/lista_deportistas.html
  4. +2
    -48
      src/templates/macrociclos/lista_entrenadores.html

+ 2
- 14
src/templates/macrociclos/detalle_deportista.html View File

@ -12,22 +12,10 @@
<div class="app-card-header px-4 py-3"> <div class="app-card-header px-4 py-3">
<div class="row g-3 align-items-center"> <div class="row g-3 align-items-center">
<div class="col-12 col-lg-auto text-center text-lg-start"> <div class="col-12 col-lg-auto text-center text-lg-start">
<h4 class="notification-title mb-1">{{ repostaje.fecha }}</h4>
<h4 class="notification-title mb-1">{{ deportista.nombre }}</h4>
<ul class="notification-meta list-inline mb-0"> <ul class="notification-meta list-inline mb-0">
<li class="list-inline-item"><a href="{% url 'macrociclos:detalle_vehiculo' repostaje.vehiculo_id %}">{{ repostaje.vehiculo.matricula }}</a></li>
<li class="list-inline-item">|</li>
<li class="list-inline-item">{{ repostaje.kms }} kms</li>
<li class="list-inline-item">|</li>
<li class="list-inline-item">{{ repostaje.litros }} litros</li>
<li class="list-inline-item">|</li>
<li class="list-inline-item">{{ repostaje.importe }} €</li>
<li class="list-inline-item">|</li>
<li class="list-inline-item">{{ repostaje.kmsrecorridos }} kms. recorridos</li>
<li class="list-inline-item">|</li>
<li class="list-inline-item">{{ repostaje.consumo }} litros/100 kms</li>
<li class="list-inline-item">|</li>
<li class="list-inline-item">{{ repostaje.precioxlitro }} €/litros</li>
<li class="list-inline-item"><a Aquí hay que meter el detalle del deportista ></li>
</ul> </ul>
</div><!--//col--> </div><!--//col-->
</tr> </tr>


+ 3
- 45
src/templates/macrociclos/detalle_entrenador.html View File

@ -12,56 +12,14 @@
<div class="app-card-header px-4 py-3"> <div class="app-card-header px-4 py-3">
<div class="row g-3 align-items-center"> <div class="row g-3 align-items-center">
<div class="col-12 col-lg-auto text-center text-lg-start"> <div class="col-12 col-lg-auto text-center text-lg-start">
{% if vehiculo.foto %}
<p><img src="{{ vehiculo.foto.url }}" alt="{{ vehiculo.matricula}}" width="187" height="115"></p>
{% else %}
<p>No hay imágen disponible</p>
{% endif %}
</div>
<div class="col-12 col-lg-auto text-center text-lg-start">
<h4>{{ vehiculo.matricula }}</h4>
<h4>{{ entrenador.nombre }}</h4>
<ul class="notification-meta list-inline mb-0"> <ul class="notification-meta list-inline mb-0">
<li class="list-inline-item">{{ vehiculo.matricula }}</li>
<li class="list-inline-item">{{ entrenador.nombre }}</li>
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
<div class="app-card-body p-4">
{% if macrociclos %}
<table class="table app-table-hover mb-0 text-left">
<thead>
<tr>
<th class="cell">Fecha</th>
<th class="cell">Kilómetros</th>
<th class="cell">Litros</th>
<th class="cell">Importe</th>
<th class="cell">Descuento</th>
<th class="cell">Precio por litro</th>
<th class="cell">Kms recorridos</th>
<th class="cell">Consumo/100 kms</th>
</tr>
</thead>
<tbody>
{% for macrociclo in macrociclos %}
<tr>
<td class="cell"><a href="{% url 'macrociclos:detalle_macrociclo' macrociclo.id %}">{{ macrociclo.fecha }}</a></td>
<td class="cell">{{ macrociclo.kms }}</td>
<td class="cell">{{ macrociclo.litros }}</td>
<td class="cell">{{ macrociclo.importe }}</td>
<td class="cell">{{ macrociclo.descuento }}</td>
<td class="cell">{{ macrociclo.precioxlitro }}</td>
<td class="cell">{{ macrociclo.kmsrecorridos }}</td>
<td class="cell">{{ macrociclo.consumo }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>No se han encontrado macrociclos para este vehiculo</p>
{% endif %}
</div>
</div> </div>
<div class="row g-3 mb-4 align-items-center justify-content-between"> <div class="row g-3 mb-4 align-items-center justify-content-between">
@ -70,7 +28,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<a class="btn app-btn-primary" href="{% url 'macrociclos:nuevo_macrociclo' %}">Añadir macrociclo</a> <!-- Faltaría poner el id del vehiculo-->
<a class="btn app-btn-primary" href="{% url 'macrociclos:nuevo_macrociclo' %}">Añadir macrociclo</a>
</div> </div>
</div> </div>
</div> </div>


+ 0
- 31
src/templates/macrociclos/lista_deportistas.html View File

@ -25,38 +25,7 @@
<div class="app-card app-card-notification shadow-sm mb-4"> <div class="app-card app-card-notification shadow-sm mb-4">
<div class="app-card-body p-4">
<table class="table app-table-hover mb-0 text-left">
<thead>
<tr>
<th class="cell">Fecha</th>
<th class="cell">Vehículo</th>
<th class="cell">Kilómetros</th>
<th class="cell">Litros</th>
<th class="cell">Importe</th>
<th class="cell">Descuento</th>
<th class="cell">Precio por litro</th>
<th class="cell">Kms recorridos</th>
<th class="cell">Consumo/100 kms</th>
</tr>
</thead>
{% for macrociclo in macrociclos %}
<tbody>
<tr>
<td class="cell"><a href="{% url 'macrociclos:detalle_macrociclo' macrociclo.id %}">{{ macrociclo.fecha }}</a></td>
<td class="cell"><a href="{% url 'macrociclos:detalle_vehiculo' macrociclo.vehiculo.id %}">{{ macrociclo.vehiculo.matricula }}</a></td>
<td class="cell">{{ macrociclo.kms }}</td>
<td class="cell">{{ macrociclo.litros }}</td>
<td class="cell">{{ macrociclo.importe }} €</td>
<td class="cell">{{ macrociclo.descuento }} €</td>
<td class="cell">{{ macrociclo.precioxlitro }} €</td>
<td class="cell">{{ macrociclo.kmsrecorridos }}</td>
<td class="cell">{{ macrociclo.consumo }}</td>
</tr>
</tbody>
{% endfor %}
</table>
</div> </div>
</div><!--//container-fluid--> </div><!--//container-fluid-->
{% endblock %} {% endblock %}

+ 2
- 48
src/templates/macrociclos/lista_entrenadores.html View File

@ -18,60 +18,14 @@
<div class="page-utilities"> <div class="page-utilities">
<div class="row g-4 justify-content-start justify-content-md-end align-items-center"> <div class="row g-4 justify-content-start justify-content-md-end align-items-center">
<div class="col-auto"> <div class="col-auto">
<a class="btn app-btn-primary" href="{% url 'macrociclos:nuevo_vehiculo' %}">Añadir vehiculo</a>
<a class="btn app-btn-primary" href="{% url 'macrociclos:nuevo_entrenador' %}">Añadir entrenador</a>
</div> </div>
</div><!--//row--> </div><!--//row-->
</div><!--//table-utilities--> </div><!--//table-utilities-->
</div><!--//col-auto--> </div><!--//col-auto-->
<div class="row g-4"> <div class="row g-4">
{% for vehiculo in vehiculos %}
<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 vehiculo.foto %}
<img src="{{ vehiculo.foto.url }}" alt="Foto del vehiculo" width="187px" height="115px">
{% else %}
Sin imágen
{% endif %}
<h4 class="app-doc-title truncate mb-0"><a href="{% url 'macrociclos:detalle_vehiculo' vehiculo.id %}">{{ vehiculo.matricula}}</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 'macrociclos:detalle_vehiculo' vehiculo.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 'macrociclos:editar_vehiculo' vehiculo.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 'macrociclos:eliminar_vehiculo' vehiculo.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>
</div><!--//container-fluid--> </div><!--//container-fluid-->
{% endblock %} {% endblock %}

Loading…
Cancel
Save