Commits

Alejandro Villanueva committed 65a6704

Fixing typo in paginator, and restoring deleted file

  • Participants
  • Parent commits a4eb56a

Comments (0)

Files changed (2)

File apps/ventas/views.py

 @login_required
 def ventas(request):
     ventas = Ventas.objects.all().order_by('serie').order_by('-num_contrato')
-    paginator = Paginator(ventas, 6) 
+    paginator = Paginator(ventas, 20) 
     
      # Make sure page request is an int. If not, deliver first page.
     try:
     finalizadas = finalizadas.order_by('serie')
     finalizadas = finalizadas.order_by('-num_contrato')
     
-    paginator = Paginator(finalizadas, 60) 
+    paginator = Paginator(finalizadas, 20) 
     
      # Make sure page request is an int. If not, deliver first page.
     try:
     pendientes = pendientes.order_by('serie')
     pendientes = pendientes.order_by('-num_contrato')
     
-    paginator = Paginator(pendientes, 60) 
+    paginator = Paginator(pendientes, 20) 
     
      # Make sure page request is an int. If not, deliver first page.
     try:

File templates/autos/autos_list.html

+{% extends 'default.html' %}
+
+{% block content %}
+
+    <div class="box">
+        <div>
+            <h2>Autos</h2>
+        </div>
+        <div class="table table-striped  table-condensed table-bordered">
+            <table width="100%" border="0" cellspacing="0" cellpadding="0">
+                <tr>
+                    <th>Codigo</th>
+                    <th>Marca</th>
+                    <th>Modelo</th>
+                    <th>Año</th>
+                    <th>Placas</th>
+                    <th></th>
+                    <th></th>
+                </tr>
+                {% for auto in object_list %}
+                    <tr>
+                        <td>{{ auto.codigo }}</td>
+                        <td>{{ auto.marca }}</td>
+                        <td>{{ auto.modelo }}</td>
+                        <td>{{ auto.anio }}</td>
+                        <td>{{ auto.placas }}</td>
+                        {% if perms.autos.add_reparaciones %}
+                            <td><a class="btn btn-primary btn-mini" href="{% url apps.autos.views.add_reparacion auto.id %}"><i class="icon-plus icon-white"></i> Agregar</a></td>
+                        {% endif %}
+                        {% if perms.autos.add_reparaciones %}
+                            <td><a class="btn btn-info btn-mini" href="{% url apps.autos.views.detalle_reparacion auto.id %}"><i class="icon-zoom-in icon-white"></i> Ver</a></td>
+                        {% endif %}
+                    </tr>
+                {% endfor %}
+            </table>
+        </div>
+    </div>
+{% endblock %}