diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-08-04 10:11:24 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-08-04 10:11:24 +0300 |
commit | 63b0fc6269b38edf7234b9f151b80d81f614c0a3 (patch) | |
tree | 555de3068f33f8dddb4619349bbea7d9b7c822fd /servo/templates/devices/list.html | |
download | Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.gz Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.bz2 Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.zip |
Initial commit
First public commit
Diffstat (limited to 'servo/templates/devices/list.html')
-rwxr-xr-x | servo/templates/devices/list.html | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/servo/templates/devices/list.html b/servo/templates/devices/list.html new file mode 100755 index 0000000..b11cab8 --- /dev/null +++ b/servo/templates/devices/list.html @@ -0,0 +1,38 @@ +{% load i18n %} + +<table class="table"> + <tbody class="searchable"> + {% for device in devices %} + <tr> + <td><a href="{{ device.get_absolute_url }}">{{ device.sn }}</a></td> + <td>{{ device.description }}</td> + <td>{{ device.purchased_on|default:"-" }}</td> + <td>{{ device.get_warranty_status_display }}</td> + <td> + <div class="btn-group pull-right"> + <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> + <i class="icon-cog"></i> <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + {% with request.session.current_order_id as co %} + {% if co %} + <li><a href="{% url 'orders-add_device' co device.pk %}">{% trans "Use in" %} #{{ request.session.current_order_code }}</a></li> + <li class="divider"></li> + {% endif %} + {% endwith %} + <li><a href="{% url 'orders-create_with_device' device_id=device.pk %}">{% trans "Create Service Order" %}</a></li> + <li {% if device.order_set.count < 1 %}class="disabled"{% endif %}><a href="{% url 'orders-index' %}?device={{ device.pk|safe }}">{% trans "Show Service Orders" %}</a></li> + <li class="divider"></li> + <li><a href="{{ device.get_absolute_url }}">{% trans "View" %}</a></li> + <li><a href="{{ device.get_absolute_url }}edit/">{% trans "Edit" %}</a></li> + <li class="divider"></li> + <li><a href="{{ device.get_absolute_url }}delete/" data-modal="#modal"><i class="icon-trash"></i> {% trans "Delete" %}</a></li> + </ul> + </div> + </td> + </tr> + {% empty %} + <tr><td colspan="5" class="empty muted">{% trans "No devices found" %}</td></tr> + {% endfor %} + </tbody> +</table> |