Merge pull request 'Creando plantilla base con menú #21' (#22) from make_menu_and_base_template_#21 into main

Reviewed-on: OneTeam/don_confiao#22
This commit is contained in:
mono 2024-08-17 19:35:24 -05:00
commit e84c45b238
9 changed files with 83 additions and 4 deletions

View File

@ -0,0 +1,33 @@
nav#main_menu ul {
list-style: none;
margin: 0;
padding: 0;
display: flex;
justify-content: space-between;
padding-bottom: 1em;
}
nav#main_menu li {
margin-right: 20px;
}
nav#main_menu a {
text-decoration: none;
color: #333;
background-color: #f0f0f0;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
}
nav#main_menu a:hover {
background-color: #ccc;
color: #666;
}
nav#main_menu a:active {
background-color: #aaa;
color: #444;
}

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>Don Confiao - Tienda la Ilusión</title>
</head>
<body>
<div id="menu">
{% include 'don_confiao/menu.html' %}
</div>
<div id="content">
{% block content %} {% endblock %}
</div>
</body>
</html>

View File

@ -1,3 +1,5 @@
{% extends 'don_confiao/base.html' %}
{% block content %}
{% if form.is_multipart %}
<form enctype="multipart/form-data" method="post">
{% else %}
@ -8,3 +10,4 @@
{{ form }}
<input type="submit" value="Importar">
</form>
{% endblock %}

View File

@ -0,0 +1,12 @@
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'css/main_menu.css' %}">
<nav id="main_menu">
<ul>
<li><a href='/don_confiao/comprar'>Comprar</a></li>
<li><a href='/don_confiao/compras'>Compras</a></li>
<li><a href='/don_confiao/lista_productos'>Productos</a></li>
<li><a href='/don_confiao/importar_productos'>Importar Productos</a></li>
<li><a href='/don_confiao/cuadrar_tarro'>Cuadrar tarro</a></li>
</ul>
</nav>

View File

@ -1,9 +1,10 @@
{% extends 'don_confiao/base.html' %}
{% block content %}
<form action="" method="get">
<label>Filtro por nombre:</label>
<input type="text" name="name" value="{{ request.GET.name }}">
<button type="submit">Filtrar</button>
</form>
{% block content %}
<h1>Lista de productos</h1>
<ul>
{% for obj in object_list %}

View File

@ -1,4 +1,5 @@
<!doctype html>
{% extends 'don_confiao/base.html' %}
{% block content %}
{% load static %}
<form id="complete_form_purchase" method="POST">
{% csrf_token %}
@ -20,3 +21,4 @@
<script src="{% static 'js/sale_summary.js' %}"></script>
<script src="{% static 'js/calculate_subtotal_line.js' %}"></script>
</form>
{% endblock %}

View File

@ -1,3 +1,6 @@
{% extends 'don_confiao/base.html' %}
{% block content %}
<h1>Resumen de compra</h1>
<dl>
<dt>Date</dt> <dd>{{ purchase.date }}</dd>
@ -5,3 +8,5 @@
<dt>Customer</dt> <dd>{{ purchase.customer.name }}</dd>
<dt>Total</dt> <dd>{{ purchase.get_total }}</dd>
</dl>
{% endblock %}

View File

@ -1,9 +1,14 @@
{% extends 'don_confiao/base.html' %}
{% block content %}
{% if purchases %}
<ul>
{% for purchase in purchases %}
<li><a href="/don_confiao/{{ purchase.id }}/">{{ purchase.date }}, {{ purchase.customer }}</a></li>
<li><a href="/don_confiao/resumen_compra/{{ purchase.id }}">{{ purchase.date }}, {{ purchase.customer }}</a></li>
{% endfor %}
</ul>
{% else %}
<p>No hay Compras</p>
{% endif %}
{% endblock %}

View File

@ -1,4 +1,6 @@
<!doctype html>
{% extends 'don_confiao/base.html' %}
{% block content %}
{% if summary.total %}
<div class="reconciliate_jar summary" style="border: solid 1px brown; margin: 10px">
<h2>Pagos No reconciliados</h2>
@ -28,3 +30,5 @@
<h2>No hay pagos registrados.</h2>
</div>
{% endif %}
{% endblock %}