aboutsummaryrefslogtreecommitdiffstats
path: root/servo/templates/orders/list.html
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-08-04 10:11:24 +0300
committerFilipp Lepalaan <filipp@mac.com>2015-08-04 10:11:24 +0300
commit63b0fc6269b38edf7234b9f151b80d81f614c0a3 (patch)
tree555de3068f33f8dddb4619349bbea7d9b7c822fd /servo/templates/orders/list.html
downloadServo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.gz
Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.bz2
Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.zip
Initial commit
First public commit
Diffstat (limited to 'servo/templates/orders/list.html')
-rwxr-xr-xservo/templates/orders/list.html43
1 files changed, 43 insertions, 0 deletions
diff --git a/servo/templates/orders/list.html b/servo/templates/orders/list.html
new file mode 100755
index 0000000..2e5347b
--- /dev/null
+++ b/servo/templates/orders/list.html
@@ -0,0 +1,43 @@
+{% load staticfiles %}
+{% load servo_tags %}
+{% load humanize %}
+{% load cache %}
+{% load i18n %}
+
+<table class="table table-hover sortable">
+ <thead>
+ <tr>
+ <th style="width:60px">{% trans "Order" %}</th>
+ <th>{% trans "Customer" %}</th>
+ <th>{% trans "Created" %}</th>
+ <th>{% trans "Assigned to" %}</th>
+ <th>{% trans "Status" %}</th>
+ <th data-defaultsort="disabled"></th>
+ </tr>
+ </thead>
+ <tbody class="searchable">
+ {% for order in orders %}
+ <tr>
+ <td><a href="{{ order.get_absolute_url }}">{{ order.code }}</a></td>
+ <td data-value="{{ order.customer_name }}">{% if order.customer_name %}<strong>{{ order.customer_name }}</strong>{% else %}<span class="muted">{% trans "No customer" %}</span>{% endif %}<br/>{% if order.description %}{{ order.description }}{% else %}<span class="muted">{% trans "No description" %}</span>{% endif %} {% cache 120 order_tags order.pk %} {% for t in order.tags.all %}<span class="label label-{{ t.color }}">{{ t.title }}</span>&nbsp;{% endfor %}{% endcache %}</td>
+ <td data-value="{{ order.created_at|date:"U" }}">{{ order.created_at|naturaltime }}<br/><small class="muted">{{ order.created_at|date:"SHORT_DATETIME_FORMAT" }}</small></td>
+ <td>
+ {% if order.user %}
+ {{ order.get_user_name }}<br/>
+ <small class="muted">{{ order.started_at|naturaltime|default:"" }}</small>
+ {% else %}
+ <span class="muted">{% trans "Nobody" %}</span>
+ {% endif %}
+ <td data-value="{{ order.status_name }}">{% if order.status_name %}{{ order.status_name }}{% else %}<span class="muted">{% trans "No status" %}</span>{% endif %}<br/><small class="muted">{{ order.status_started_at|naturaltime|default:"" }}</small></td>
+ <td><img src="{% static order.get_status_img %}" title="{{ order.status_name }}" alt="{{ order.status_name }}" class="status_color"/></td>
+ </tr>
+ {% empty %}
+ <tr>
+ <td colspan="6" class="empty muted">{% trans "No orders found" %}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ {% if orders.paginator %}
+ {% include "pagination.html" with items=orders %}
+ {% endif %}