Last active
December 22, 2015 13:59
-
-
Save philangist/ea30643343a3dab09202 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base.html" %} | |
{% block content %} | |
<h2>Dry Cleaning Orders</h2> | |
{% url 'dry_cleaning_add' as add_dry_cleaning_url %} | |
<div class="btn-toolbar"> | |
<a href="{{ add_dry_cleaning_url }}"> | |
<button class="btn btn-primary">New Order</button> | |
</a> | |
</div> | |
{% if object_list %} | |
<div class="well"> | |
<table class="table"> | |
<thead> | |
<tr> | |
<th>Order number</th> | |
<th>Name</th> | |
<th>Phone number</th> | |
<th>Address</th> | |
<th>Total Cost</th> | |
<th style="width: 36px;"></th> | |
</tr> | |
</thead> | |
<tbody> | |
{% for order in object_list %} | |
<tr> | |
<td><a href="/dry_cleaning/{{order.id}}">{{ order.id }}</a></td> | |
<td><a href="/customers/{{ order.first_name }}-{{ order.last_name }}">{{ order.first_name }} {{ order.last_name }}</a></td> | |
<td>{{ order.phone_number }}</td> | |
<td>{{ order.address }}</td> | |
<td>${{ order.total_cost }}</td> | |
<td> | |
<a href="/dry_cleaning/add/{{order.id}}"><i class="icon-pencil"></i></a> | |
</td> | |
</tr> | |
{% endfor %} | |
</tbody> | |
</table> | |
</div> | |
{% if is_paginated %} | |
<div class="pagination"> | |
<ul> | |
{% url 'dry_cleaning_list' as dry_cleaning_url %} | |
{% if page_obj.has_previous %} | |
<li> | |
<a href="{{ dry_cleaning_url}}?page={{ page_obj.previous_page_number }}">Prev</a> | |
</li> | |
{%else%} | |
<li> | |
<a href="#" style="color:#808080">Prev</a> | |
</li> | |
{% endif %} | |
<li> | |
<a href="#">{{ page_obj.number }}</a> | |
</li> | |
{% if page_obj.has_next %} | |
<li> | |
<a href="{{ dry_cleaning_url}}?page={{ page_obj.next_page_number }}">Next</a> | |
</li> | |
{%else%} | |
<li> | |
<a href="#" style="color:#808080">Next</a> | |
</li> | |
{% endif %} | |
</ul> | |
</div> | |
{% endif %} | |
{% else %} | |
<p>No orders are available.</p> | |
{% endif %} | |
{% url 'daily_ops_dry_cleaning_archive' as dry_cleaning_archive_url %} | |
<a href="{{ dry_cleaning_archive_url }}">View archived dry cleaning orders</a><br> | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment