aboutsummaryrefslogtreecommitdiffstats
path: root/servo/templates/devices
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-11-28 17:58:34 +0200
committerFilipp Lepalaan <filipp@mac.com>2015-11-28 17:58:34 +0200
commit0c71688b616af725abba9ebbd6b234ea4a6d0c06 (patch)
tree3d0c64702621111f0ea2a46082421f2cea3581ce /servo/templates/devices
parentb4857400e13469785df9e34713e0bc55f77759e6 (diff)
downloadServo-0c71688b616af725abba9ebbd6b234ea4a6d0c06.tar.gz
Servo-0c71688b616af725abba9ebbd6b234ea4a6d0c06.tar.bz2
Servo-0c71688b616af725abba9ebbd6b234ea4a6d0c06.zip
Added local GSX repair deletion to device view
Diffstat (limited to 'servo/templates/devices')
-rwxr-xr-xservo/templates/devices/view.html25
1 files changed, 22 insertions, 3 deletions
diff --git a/servo/templates/devices/view.html b/servo/templates/devices/view.html
index 51a30c1..8234cd7 100755
--- a/servo/templates/devices/view.html
+++ b/servo/templates/devices/view.html
@@ -56,17 +56,36 @@
</ul>
</div>
<div class="pull-right">
- {% if perms.servo.change_device %}
+ {% if perms.servo.change_device %}
<a href="edit/" class="btn">{% trans "Edit" %}</a>
- {% endif %}
+ {% endif %}
</div>
</div>
<div class="tab-pane" id="tab2">
{% include "orders/list.html" with orders=device.order_set.all %}
+ <hr/>
+ <h4>{% trans "Local GSX repairs" %}</h4>
+ <table class="table">
+ <tbody>
+ {% for r in device.repair_set.all %}
+ <tr>
+ <td>{{ r.confirmation }}</td>
+ <td>{{ r.created_at|date }}</td>
+ <td>{{ r.created_by }}</td>
+ <td>{{ r.get_status }}</td>
+ <td><a href="{% url 'repairs-delete_repair' r.pk %}" class="btn btn-default" data-modal="modal" title="{% trans "Delete repair" %}"><i class="icon-trash"></i></a></td>
+ </tr>
+ {% empty %}
+ <tr>
+ <td colspan="4">{% trans "No local GSX repairs found" %}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
</div>
{% if device.is_apple_device %}
<div class="tab-pane" id="tab3">
- <div id="gsx-container" data-source="{% url 'search-search_gsx' what='repairs' param='serialNumber' query=device.sn %}">
+ <div id="gsx-container" data-source="{% url 'devices-search_gsx_repairs' pk=device.pk %}">
<div class="progress active">
<div class="bar" style="width:100%;" data-progress="0"></div>
</div>