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/orders | |
download | Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.gz Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.bz2 Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.zip |
Initial commit
First public commit
Diffstat (limited to 'servo/templates/orders')
35 files changed, 1566 insertions, 0 deletions
diff --git a/servo/templates/orders/batch_process.html b/servo/templates/orders/batch_process.html new file mode 100644 index 0000000..996eceb --- /dev/null +++ b/servo/templates/orders/batch_process.html @@ -0,0 +1,14 @@ +{% extends "orders/index.html" %} +{% load bootstrap3 %} +{% load i18n %} + +{% block content %} + <h2>{% trans "Batch Processing" %}</h2> + <form action="" method="post"> + {% csrf_token %} + {% bootstrap_form form %} + {% buttons %} + <button type="submit" class="btn btn-primary">{% trans "Submit" %}</button> + {% endbuttons %} + </form> +{% endblock content %} diff --git a/servo/templates/orders/checklists.html b/servo/templates/orders/checklists.html new file mode 100755 index 0000000..b2f9e47 --- /dev/null +++ b/servo/templates/orders/checklists.html @@ -0,0 +1,10 @@ +{% load servo_tags %} +{% for c in checklists %} + <h4>{{ c.title }} ({{ order.checklistitemvalue_set.all.count }}/{{ c.checklistitem_set.all.count }})</h4> + {% for i in c.checklistitem_set.all %} + <label class="checkbox" style="margin-left:8x"> + <input type="checkbox" data-url="{% url 'orders-toggle_task' order.id i.id %}" class="toggle" {% if order|is_item_complete:i %}checked="checked"{% endif %}/> {{ i.title }} <i class="muted">{{ order|item_completed_by:i }}</i> + </label> + {% if forloop.last %}<hr/>{% endif %} + {% endfor %} +{% endfor %} diff --git a/servo/templates/orders/close.html b/servo/templates/orders/close.html new file mode 100755 index 0000000..b80f862 --- /dev/null +++ b/servo/templates/orders/close.html @@ -0,0 +1,17 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block header %} + {% trans 'Close order' %} {{ order.code }}? +{% endblock header %} + +{% block body %} + <p>{% trans "This order will no longer be editable." %}</p> +{% endblock body %} + +{% block footer %} +<form action="{{ action }}" method="post" accept-charset="utf-8"> + {% csrf_token %} + <button class="btn btn-primary" type="submit">{% trans "Close" %}</button> +</form> +{% endblock footer %} diff --git a/servo/templates/orders/close_repair.html b/servo/templates/orders/close_repair.html new file mode 100755 index 0000000..db50087 --- /dev/null +++ b/servo/templates/orders/close_repair.html @@ -0,0 +1,17 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block header %} + {% trans "Complete the GSX repair?" %} +{% endblock header %} + +{% block body %} + {% trans "The GSX repair will no longer be editable." %} +{% endblock body %} + +{% block footer %} + <form method="post" action="close/"> + {% csrf_token %} + <button type="submit" class="btn btn-danger spin">{% trans "Complete" %}</button> + </form> +{% endblock footer %} diff --git a/servo/templates/orders/customer.html b/servo/templates/orders/customer.html new file mode 100755 index 0000000..ccd9184 --- /dev/null +++ b/servo/templates/orders/customer.html @@ -0,0 +1,52 @@ +{% load i18n %} +{% load mptt_tags %} +{% load servo_tags %} +{% recursetree nodes %} +<address> + <strong><a href="{{ node.get_absolute_url }}"><i class="{{ node.get_icon }}"></i> {{ node.name }}</a></strong> + <div class="btn-group pull-right"> + <a class="btn btn-small dropdown-toggle{% if order.is_closed %} disabled{% endif %}" data-toggle="dropdown" href="#"> + <i class="icon-cog"></i> <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + <li><a href="{% url 'orders-choose_customer' order.pk %}" data-modal="#modal">{% trans "Choose" %}</a></li> + {% if node.is_company %} + <li><a href="{% url 'customers-create_contact' parent_id=node.id %}">{% trans "Add contact" %}</a></li> + {% else %} + <li class="disabled"><a href="#">{% trans "Add contact" %}</a></li> + {% endif %} + <li><a href="{% url 'orders-create_with_customer' customer_id=node.id %}">{% trans "Create Order" %}</a></li> + <li class="divider"></li> + <li><a href="{% url 'customers-edit_customer' group=node.get_group pk=node.pk %}">{% trans "Edit" %}</a></li> + {% if node.is_leaf_node %} + <li><a href="{% url 'orders-remove_customer' pk=order.pk customer_id=node.pk %}" data-modal="#modal">{% trans "Remove" %}</a></li> + {% else %} + <li class="disabled"><a href="#" data-modal="#modal">{% trans "Remove" %}</a></li> + {% endif %} + </ul> + </div> + <br/> + {% if node.email %} + <a href="{% url 'notes-create_with_to_and_order' recipient=node.email order_id=order.id %}">{{ node.email }}</a><br/> + {% endif %} + {% if node.phone %} + <a href="{% url 'notes-create_with_to_and_order' recipient=node.get_standard_phone order_id=order.id %}">{{ node.get_national_phone }}</a><br/> + {% endif %} + {% if node.street_address %} + {{ node.street_address }}<br/> + {{ node.zip_code }} {{ node.city }} + {% endif %} + {% with node.fullprops.items as props %} + {% if props %} + <br/> + {% for k, v in props %} + {{ k }}: {{ v }}<br/> + {% endfor %} + {% endif %} + {% endwith %} + {% if node.notes %} + <p><small class="muted">{{ node.notes|default:"" }}</small></p> + {% endif %} +</address> +{{ children }} +{% endrecursetree %} diff --git a/servo/templates/orders/delete_order.html b/servo/templates/orders/delete_order.html new file mode 100755 index 0000000..ee44fc6 --- /dev/null +++ b/servo/templates/orders/delete_order.html @@ -0,0 +1,17 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block header %} + {% blocktrans with id=order.code%}Really delete order {{ id }}? {% endblocktrans %} +{% endblock header %} + +{% block body %} + <p>{% trans "This will also delete all the order's notes. This action cannot be undone." %}</p> +{% endblock body %} + +{% block footer %} + <form action="{{ action }}" method="post" accept-charset="utf-8"> + {% csrf_token %} + <button type="submit" class="btn btn-danger pull-right">{% trans "Delete" %}</button> + </form> +{% endblock footer %} diff --git a/servo/templates/orders/devices.html b/servo/templates/orders/devices.html new file mode 100755 index 0000000..271a4ec --- /dev/null +++ b/servo/templates/orders/devices.html @@ -0,0 +1,139 @@ +{% load i18n %} +{% load servo_tags %} + +{% for d in order.orderdevice_set.all %} +{% with d.device as device %} +<div class="row-fluid"> + <div class="span3"> + <img src="{{ device.get_photo }}" alt="{{ device.description }}" title="{{ device.description }}"/> + </div> + <div class="span9"> + <h3>{{ device.description }}</h3> + {% if d.is_repeat_service %} + <span class="label label-important pull-right">{% trans "Repeat Service" %}</span> + {% endif %} + <dl class="dl-horizontal"> + <dt>{% trans "Warranty Status" %}</dt> + <dd>{{ device.get_warranty_status_display }}</dd> + <dt>{% trans "Purchase Date" %}</dt> + <dd>{{ device.purchased_on|date:"SHORT_DATE_FORMAT"|default:"-" }}, {{ device.get_purchase_country|default:"-" }}</dd> + <dt>{% trans "Serial Number" %}</dt> + <dd>{{ device.sn|default:"-" }}</dd> + {% if device.configuration %} + <dt>{% trans "Configration" %}</dt> + <dd>{{ device.configuration }}</dd> + {% endif %} + {% if device.imei %} + <dt>{% trans "IMEI" %}</dt> + <dd>{{ device.imei }}</dd> + <dt>{% trans "Applied Activation Policy" %}</dt> + <dd>{{ device.applied_activation_policy }}</dd> + <dt>{% trans "Initial Activation Policy" %}</dt> + <dd>{{ device.initial_activation_policy }}</dd> + <dt>{% trans "Find My iPhone" %}</dt> + <dd>{{ device.get_fmip_status }}</dd> + <dt>{% trans "Unlocked" %}</dt> + <dd>{{ device.unlocked|yesno }}</dd> + {% endif %} + {% if device.username %} + <dt>{% trans "Username" %}</dt> + <dd>{{ device.username }}</dd> + {% endif %} + {% if device.password %} + <dt>{% trans "Password" %}</dt> + <dd>{{ device.password }}</dd> + {% endif %} + {% if device.get_coverage_details %} + <dt>{% trans "Details" %}</dt> + <dd>{{ device.get_coverage_details|join:"<br/>" }}</dd> + {% endif %} + {% if device.notes %} + <dt>{% trans "Notes" %}</dt> + <dd>{{ device.notes }}</dd> + {% endif %} + {% with device|device_accessories:order as accessories %} + {% if accessories.count %} + <dt>{% trans "Accessories" %}</dt> + <dd>{{ accessories|join:", " }}</dd> + {% endif %} + {% endwith %} + </dl> + {% if order.queue %} + <a href="{% url 'orders-list_parts' order.id device.id order.queue_id %}" class="btn btn-small"><i class="icon-wrench"></i> {% trans "Parts" %}</a> + {% else %} + <a class="btn btn-small disabled" title="{% trans "Assign order to a queue first" %}"><i class="icon-wrench"></i> {% trans "Parts" %}</a> + {% endif %} + {% if order.is_editable %} + <a href="{% url 'orders-accessories' order.id device.id %}" class="btn btn-small" data-modal="#modal"><i class="icon-hdd"></i> {% trans "Accessories" %}</a> + {% else %} + <a class="btn btn-small disabled" href="#"><i class="icon-hdd"></i> {% trans "Accessories" %}</a> + {% endif %} + <a href="{% url 'orders-history' order.pk device.pk %}" class="btn btn-small" data-modal="#modal"><i class="icon-time"></i> {% trans "History" %}</a> + <div class="btn-group"> + <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"> + <i class="icon-cog"></i> <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + {% if order.can_create_carryin and device.can_create_carryin %} + <li><a href="{% url 'repairs-create_repair' order.id device.id 'CA' %}">{% trans "Create Carry-In Repair" %}</a></li> + {% else %} + <li class="disabled"><a href="#" title="{% trans "Device has open GSX repairs" %}">{% trans "Create Carry-In Repair" %}</a></li> + {% endif %} + {% if order.can_create_carryin and device.can_create_carryin and device.has_onsite %} + <li><a href="{% url 'repairs-create_repair' order.id device.id 'ON' %}">{% trans "Create Onsite Repair" %}</a></li> + {% else %} + <li class="disabled"><a href="#">{% trans "Create Onsite Repair" %}</a></li> + {% endif %} + {% if order.can_create_carryin and device.can_create_carryin and 0 %} + <li><a href="{% url 'repairs-create_repair' order.id device.id 'RR' %}">{% trans "Create Whole-Unit Exchange" %}</a></li> + {% else %} + <li class="disabled"><a href="#">{% trans "Create Whole-Unit Exchange" %}</a></li> + {% endif %} + <li class="divider"></li> + <li><a href="{% url 'devices-update_gsx_details' device.pk %}" class="spin">{% trans "Update Warranty Status" %}</a></li> + <li class="divider"></li> + {% if device.is_ios %} + <li><a href="{% url 'devices-diagnostics' device.pk %}?a=init&order={{ order.pk|safe }}" data-modal="#modal">{% trans "Initiate Diagnostics" %}</a></li> + {% else %} + <li class="disabled"><a href="#" data-modal="#modal">{% trans "Fetch Diagnostics" %}</a></li> + {% endif %} + <li><a href="{% url 'devices-diagnostics' device.pk %}" data-modal="#modal">{% trans "Fetch Diagnostics" %}</a></li> + <li class="divider"></li> + <li><a href="{{ device.get_absolute_url }}">{% trans "Show Device" %}</a></li> + {% if device.sn == '' %} + <li class="disabled"><a href="#" target="_blank">{% trans "Show Barcode" %}</a></li> + {% else %} + <li><a href="{% url 'barcodes-view' device.sn %}?f=svg" target="_blank">{% trans "Show Barcode" %}</a></li> + {% endif %} + </ul> + </div> +<div class="pull-right"> + <div class="btn-group"> + {% if d.should_report %} + <a href="{% url 'orders-report_device' order.pk d.pk %}" class="btn btn-success btn-small nofollow active" title="{% trans "Report" %}" data-toggle="button"><i class="icon-ok"></i></a> + {% else %} + <a href="{% url 'orders-report_device' order.pk d.pk %}" class="btn btn-success btn-small nofollow" title="{% trans "Report" %}" data-toggle="button"><i class="icon-ok icon-white"></i></a> + {% endif %} + </div> + <div class="btn-group"> + {% if order.is_editable %} + <a href="{{ device.get_absolute_url }}edit/" class="btn btn-warning btn-small" title="{% trans "Edit" %}"><i class="icon-pencil icon-white"></i></a> + <a href="{% url 'orders-delete_device' order.id device.id %}" class="btn btn-small btn-danger" data-modal="#modal" title="{% trans "Remove" %}"><i class="icon-trash icon-white"></i></a> + {% endif %} + </div> +</div> +</div> +</div> +<hr/> +{% endwith %} +{% empty %} +<div class="row-fluid"> + <div class="span12"> + <div class="empty well"><h3 class="muted">{% trans "Order doesn't contain any devices" %}</h3></div> + </div> +</div> +{% endfor %} +<p class="clearfix"> + <a href="{% url 'devices-choose' order.pk %}" class="btn pull-right {% if order.is_closed %}disabled{% endif %}" data-modal="#modal"><i class="icon-plus"></i> {% trans "Add Device" %}</a> +</p> +<hr/> diff --git a/servo/templates/orders/dispatch.html b/servo/templates/orders/dispatch.html new file mode 100755 index 0000000..f7ea0fb --- /dev/null +++ b/servo/templates/orders/dispatch.html @@ -0,0 +1,115 @@ +{% extends "orders/edit.html" %} +{% load staticfiles %} +{% load servo_tags %} +{% load i18n %} + +{% block content %} +<div class="page-header"> + {% with order.status_title as stat %} + <h3 style="margin-top:0px;line-height:30px" title="{{ title }}">{{ title|truncatechars:40 }}<br/> + <img src="{% static order.get_status_img %}" title="{{ stat }}" alt="{{ stat }}"/><small style="padding-left:5px">{{ order.get_title }} {% if order.user %}({{ order.user.get_full_name }}){% endif %}</small></h3> + {% endwith %} +</div> +<form method="post" action="" accept-charset="utf8"> + {% csrf_token %} + {{ formset.management_form }} + <div class="row-fluid"> + <div class="span3"> + <div class="row-fluid"> + <fieldset> + <legend>{% trans "Customer" %}</legend> + <div class="row-fluid"> + {% include "form_field_snippet.html" with field=form.customer_name %} + </div> + <div class="row-fluid"> + {% include "form_field_snippet.html" with field=form.customer_email %} + </div> + <div class="row-fluid"> + {% include "form_field_snippet.html" with field=form.customer_phone %} + </div> + <div class="row-fluid"> + {% include "form_field_snippet.html" with field=form.customer_address %} + </div> + <div class="row-fluid"> + {% include "form_field_snippet.html" with field=form.reference %} + </div> + </fieldset> + </div> + <div class="row-fluid"> + <fieldset> + <legend>{% trans "Payment" %}</legend> + {% for f in formset %} + <div class="row-fluid formrow"> + <div class="span8"> + {{ f.created_by }} + {{ f.method }} + </div> + <div class="span4"> + {{ f.amount }} + </div> + </div> + {% endfor %} + <button class="btn clonerow" type="button" data-prefix="payment"><i class="icon-plus"></i></button> + </fieldset> + </div> + </div> + <div class="span9"> + <fieldset> + <legend>{% trans "Products" %}</legend> + <table class="table"> + <thead> + <tr> + <th style="width:20px"></th> + <th>{% trans "Product" %}</th> + <th style="width:50px">{% trans "Qty" %}</th> + <th style="width:100px">{% trans "Price" %}</th> + <th style="width:100px">{% trans "Price w/ tax" %}</th> + <th style="width:100px">{% trans "Total" %}</th> + </tr> + </thead> + <tbody>{% for p in products %} + <tr> + <td><input type="checkbox" name="items" value="{{ p.id|safe }}" checked="checked" class="toggle_row"/></td> + <td><strong>{{ p.product.code }}</strong><br/>{{ p.product.title }}</td> + <td class="amount">{{ p.amount }}</td> + <td class="net">{{ p.price_notax|currency }}</td> + <td class="tax">{{ p.price|currency }}</td> + <td class="gross">{{ p.total_gross|currency }}</td> + </tr>{% endfor %} + </tbody> + <tfoot> + <tr> + <td></td> + <td style="text-align:right">{% trans "Total" %}:</td> + <td>{{ totals.amount }}</td> + <td>{{ form.total_net }}</td> + <td>{{ form.total_tax }}</td> + <td>{{ form.total_gross }}</td> + </tr> + </tfoot> + </table> + </fieldset> + </div> + </div> + <div class="form-actions"> + <div class="pull-right"> + <a class="btn btn-default" href="{{ order.get_absolute_url }}">{% trans "Cancel" %}</a> + <button type="submit" class="btn btn-primary">{% trans "Dispatch" %}</button> + </div> + </div> +</form> +{% endblock content %} + +{% block crumbs %} + <li><a href="{{ order.get_queue_url }}">{{ order.get_queue_title }}</a> <span class="divider">/</span></li> + <li><a href="{% url 'orders-edit' order.id %}">{% trans "Order" %} {{ order.get_footer }}</a> <span class="divider">/</span></li> + <li class="active">{% trans "Dispatch" %}</li> +{% endblock crumbs %} + +{% block media %} +<script type="text/javascript"> + $('.clonerow').click(function() { + cloneMore('.formrow:last', 'payment', true); + }); +</script> +{% endblock media %} diff --git a/servo/templates/orders/edit.html b/servo/templates/orders/edit.html new file mode 100755 index 0000000..c340585 --- /dev/null +++ b/servo/templates/orders/edit.html @@ -0,0 +1,115 @@ +{% extends "default.html" %} +{% load staticfiles %} +{% load servo_tags %} +{% load i18n %} + +{% block toolbar %} +{% include "orders/toolbar.html" %} +{% endblock toolbar %} + +{% block content %} + <div class="page-header"> + <div class="row-fluid"> + <div class="span6"> + {% with order.status_title as stat %} + <h3 style="margin-top:0px;line-height:30px" title="{{ title }}">{{ title|truncatechars:40 }}<br/> + <img src="{% static order.get_status_img %}" title="{{ stat }}" alt="{{ stat }}"/><small style="padding-left:5px">{{ order.get_title }} {% if order.user %}({{ order.user.get_full_name }}){% endif %}</small></h3> + {% endwith %} + </div> + <div class="span6"> + {% if locations.count > 1 %} + <div class="pull-right" style="padding:5px"> + <div class="btn-group"> + <a class="btn dropdown-toggle{% if order.is_closed %} disabled{% endif %}" data-toggle="dropdown" href="#" title="{% trans "Checkin Location" %}: {{ order.checkin_location.title }}"> + <i class="halflings log_in"></i> {{ order.checkin_location.title|truncatechars:10 }} <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + {% for l in locations %} + <li{% ifequal l order.checkin_location %} class="active"{% endifequal %}><a href="{% url 'orders-update' order.pk 'checkin' l.pk %}">{{ l.title }}</a></li> + {% endfor %} + </ul> + </div> + <div class="btn-group"> + <a class="btn dropdown-toggle{% if order.is_closed %} disabled{% endif %}" data-toggle="dropdown" href="#" title="{% trans "Current Location" %}: {{ order.location.title }}"> + <i class="icon-map-marker"></i> {{ order.location.title|truncatechars:10 }} <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + {% for l in locations %} + <li{% ifequal l order.location %} class="active"{% endifequal %}><a href="{% url 'orders-update' order.pk 'location' l.pk %}">{{ l.title }}</a></li> + {% endfor %} + </ul> + </div> + <div class="btn-group"> + <a class="btn dropdown-toggle{% if order.is_closed %} disabled{% endif %}" data-toggle="dropdown" href="#" title="{% trans "Checkout Location" %}: {{ order.checkout_location.title }}"> + <i class="halflings log_out"></i> {{ order.checkout_location.title|truncatechars:10 }} <span class="caret"></span> + </a> + <ul class="dropdown-menu pull-right"> + {% for l in locations %} + <li{% ifequal l order.checkout_location %} class="active"{% endifequal %}><a href="{% url 'orders-update' order.pk 'checkout' l.pk %}">{{ l.title }}</a></li> + {% endfor %} + </ul> + </div> + </div> + {% endif %} + </div> + </div> + </div> + <ul class="nav nav-tabs"> + {% block tabs %} + {% include "orders/tabs.html" with active='order' %} + {% endblock tabs %} + </ul> + <div class="row-fluid"> + <div class="span3" id="order_meta"> + {% block first_column %} + {% if order.customer %} + {% include "orders/customer.html" with nodes=customer %} + {% else %} + <div class="well text-center"> + <a href="{% url 'orders-choose_customer' order.pk %}" class="btn" data-modal="#modal"><i class="icon-search"></i> {% trans "Select Customer" %}</a> + </div> + {% endif %} + <hr/> + {% include "orders/checklists.html" %} + {% include "orders/followers.html" %} + <hr/> + <form method="post" action="{% url 'orders-update' order.pk "place" 0 %}" style="margin-bottom:0px"> + {% csrf_token %} + <label><i class="icon-map-marker"></i> {% trans "Place" %}</label> + <input type="text" name="place" class="input typeahead span12" placeholder="{% trans "Enter place" %}" data-provide="typeahead" data-source="{% url 'api-places' %}"/> + </form> + {% if order.place %} + <div class="clearfix"> + <span class="label label-info">{{ order.place }}</span> + </div> + {% else %} + <p class="muted text-center">{% trans "No place" %}</p> + {% endif %} + <hr/> + <form method="post" action="{% url 'orders-update' order.pk "label" 0 %}" style="margin-bottom:0px"> + {% csrf_token %} + <label><i class="icon-tag"></i> {% trans "Label" %}</label> + <input type="text" name="label" class="input typeahead span12" placeholder="{% trans "Enter label" %}" data-provide="typeahead" data-source="{% url 'api-tags' %}"/> + </form> + {% for t in order.tags.all %} + <span class="label label-{{ t.color }}"><div class="pull-left">{{ t.title }}</div><a class="close" href="{% url 'orders-toggle_tag' order.pk t.pk %}"><i class="icon-remove icon-white"></i></a></span> + {% empty %} + <p class="muted text-center">{% trans "No labels" %}</p> + {% endfor %} + {% endblock first_column %} + </div><!-- //# order sidebar --> + + <div class="span9"> + {% block second_column %} + {% include "orders/devices.html" %} + {% include "orders/notes.html" with notes=order.notes %} + {% include "orders/products.html" %} + {% endblock second_column %} + </div> + </div> + {% endblock content %} + + {% block crumbs %} + <li><a href="{{ order.get_queue_url }}">{{ order.get_queue_title }}</a> <span class="divider">/</span></li> + {% block morecrumbs %}<li class="active">{% trans "Order" %} {{ order.get_footer }}</li>{% endblock morecrumbs %} + {% endblock crumbs %} diff --git a/servo/templates/orders/edit_product.html b/servo/templates/orders/edit_product.html new file mode 100755 index 0000000..0bcb710 --- /dev/null +++ b/servo/templates/orders/edit_product.html @@ -0,0 +1,33 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block body %} + +<form method="post" action="{{ request.path }}" class="form-horizontal"> + {% csrf_token %} + {% include "form_field_snippet.html" with field=form.title %} + {% include "form_field_snippet.html" with field=form.amount %} + {% include "form_field_snippet.html" with field=form.price_category %} + {% include "form_field_snippet.html" with field=form.price %} + {% if product.is_serialized %} + {% include "form_field_snippet.html" with field=form.sn %} + {% include "form_field_snippet.html" with field=form.kbb_sn %} + {% include "form_field_snippet.html" with field=form.imei %} + {% endif %} + {% if product.component_code %} + {% include "form_field_snippet.html" with field=form.comptia_code %} + {% include "form_field_snippet.html" with field=form.comptia_modifier %} + {% endif %} + {% include "form_field_snippet.html" with field=form.should_report %} +</form> + +<script type="text/javascript"> + {% autoescape off %} + var prices = {{ prices }}; + {% endautoescape %} + $('#id_price_category').change(function(){ + $('#id_price').val(prices[$(this).val()]); + }); +</script> + +{% endblock body %} diff --git a/servo/templates/orders/events.html b/servo/templates/orders/events.html new file mode 100755 index 0000000..389e22a --- /dev/null +++ b/servo/templates/orders/events.html @@ -0,0 +1,21 @@ +{% extends "orders/edit.html" %} +{% load servo_tags %} +{% load i18n %} + +{% block tabs %} +{% include "orders/tabs.html" with active='events' %} +{% endblock tabs %} + +{% block second_column %} +<table class="table"> + <tbody> + {% for event in order.events.all %} + <tr> + <td><img src="{{ STATIC_URL }}images/{{ event.get_icon }}.png" alt="{{ event.description }}" class="icon"/></td> + <td style="width:55%">{{ event.description }}</td> + <td style="text-align:right">{{ event.triggered_by }}, {{ event.triggered_at|relative_date }}</td> + </tr> + {% endfor %} + </tbody> +</table> +{% endblock second_column %} diff --git a/servo/templates/orders/followers.html b/servo/templates/orders/followers.html new file mode 100755 index 0000000..ce020bd --- /dev/null +++ b/servo/templates/orders/followers.html @@ -0,0 +1,28 @@ +{% load i18n %} + +<form method="post" action="{% url 'orders-update' order.pk "user" 0 %}" style="margin-bottom:0px"> + {% csrf_token %} + <label><i class="icon-user"></i> {% trans "Followers" %}</label> + <input type="text" name="user" class="input typeahead span12" placeholder="{% trans "Enter name" %}" data-provide="typeahead" data-source="{% url 'api-users' %}?is_active=1"/> +</form> +{% for i in followers %} +<div class="clearfix"> + {% with i.get_full_name|truncatechars:26 as fullname %} + {% if i == order.user %} + <span class="label label-info pull-left">{{ fullname }}</span> + {% else %} + <span class="label pull-left">{{ fullname }}</span> + {% endif %} + {% endwith %} + <div class="btn-group pull-right"> + {% if i == order.user %} + <a href="#" class="btn btn-small btn-primary active disabled" title="{% trans "Make primary" %}"><i class="icon-user icon-white"></i></a> + {% else %} + <a href="{% url 'orders-update' order.pk 'user' i.pk %}" class="btn btn-small" title="{% trans "Make primary" %}"><i class="icon-user"></i></a> + {% endif %} + <a href="{% url 'orders-remove_user' order.pk i.pk %}" class="btn btn-small" title="{% trans "Remove" %}"><i class="icon-remove"></i></a> + </div> +</div> +{% empty %} +<p class="muted text-center">{% trans "No followers" %}</p> +{% endfor %} diff --git a/servo/templates/orders/gsx_repair_form.html b/servo/templates/orders/gsx_repair_form.html new file mode 100755 index 0000000..512ce5a --- /dev/null +++ b/servo/templates/orders/gsx_repair_form.html @@ -0,0 +1,94 @@ +{% extends "default.html" %} +{% load staticfiles %} +{% load servo_tags %} +{% load i18n %} + +{% block content %} +<div class="page-header"> +{% with order.status_title as stat %} + <h3 style="margin-top:0px;line-height:30px" title="{{ title }}">{{ title|truncatechars:40 }}<br/> + <img src="{% static order.get_status_img %}" title="{{ stat }}" alt="{{ stat }}"/><small style="padding-left:5px">{{ order.get_title }} {% if order.user %}({{ order.user.get_full_name }}){% endif %}</small></h3> +{% endwith %} +</div> +<ul class="nav nav-tabs"> + {% block tabs %} + {% include "orders/tabs.html" %} + {% endblock tabs %} +</ul> + +<div class="row-fluid"> + <form method="post" accept-charset="utf-8" action="#" class="form-horizontal spin" enctype="multipart/form-data" id="repair_form"> + <div class="span3"> + {% csrf_token %} + {{ repair_form.device }} + <strong>{{ device.description }}</strong> + <p> + <small class="muted">{{ device.get_warranty_status_display }}</small><br/> + <small class="muted">{{ device.configuration }}</small><br/> + <small class="muted"><i class="icon-barcode"></i> {{ device.sn }}</small> + </p> + <hr/> + <strong>{% trans "Parts" %}</strong> + <div class="async" data-url="{% url 'repairs-check_parts' repair.pk %}"><p class="text-center muted">{% trans "Checking warranty" %}...</p></div> + <hr/> + <strong>{% trans "Total" %}:</strong> + <span class="pull-right"><strong>{{ order.gross_total|currency }}</strong></span> + </div> + <div class="span9"> + <ul class="nav nav-tabs"> + <li class="active"><a href="#tab1" data-toggle="tab">{% trans "Repair" %}</a></li> + <li><a href="#tab2" data-toggle="tab">{% trans "Details" %}</a></li> + {% if component_form %} + <li><a href="#tab4" data-toggle="tab">{% trans "Components" %}</a></li> + {% endif %} + <li><a href="#tab3" data-toggle="tab">{% trans "Customer" %}</a></li> + </ul> + <div class="tab-content"> + <div class="tab-pane active" id="tab1"> + {% include "form_field_snippet.html" with field=repair_form.symptom %} + {% include "form_field_snippet.html" with field=repair_form.diagnosis %} + {% include "form_field_snippet.html" with field=repair_form.tech_id %} + </div> + <div class="tab-pane" id="tab2"> + {% include "form_field_snippet.html" with field=repair_form.notes %} + {% include "form_field_snippet.html" with field=repair_form.unit_received_at %} + {% include "form_field_snippet.html" with field=repair_form.attachment %} + {% include "form_field_snippet.html" with field=repair_form.reference %} + {% include "form_field_snippet.html" with field=repair_form.consumer_law %} + {% include "form_field_snippet.html" with field=repair_form.request_review %} + {% if repair.can_mark_complete %} + {% include "form_field_snippet.html" with field=repair_form.replacement_sn %} + {% include "form_field_snippet.html" with field=repair_form.mark_complete %} + {% endif %} + </div> + <div class="tab-pane" id="tab3"> + {% include "form_snippet.html" with form=customer_form %} + </div> + <div class="tab-pane" id="tab4"> + {% include "form_snippet.html" with form=component_form %} + </div> + </div> + <div class="form-actions"> + <label class="checkbox pull-left"> + <input type="checkbox" name="confirm" id="id_confirm"> {% trans "Confirm" %} + </label> + <div class="pull-right"> + {% if repair.pk %} + <a class="btn btn-danger" href="{% url 'repairs-delete_repair' repair.pk %}" data-modal="#modal">{% trans "Delete" %}</a> + {% endif %} + <button type="submit" class="btn" id="save-bulk-return" data-placeholder="{% trans "Submit" %}">{% trans "Save" %}</button> + </div> + </div> + </div> + </form> +</div> +{% endblock content %} + +{% block crumbs %} +<li><a href="{{ order.get_queue_url }}">{{ order.get_queue_title }}</a> <span class="divider">/</span></li> +<li class="active">{% trans "Order" %} {{ order.code }}</li> +{% endblock crumbs %} + +{% block media %} +{{ repair_form.media }} +{% endblock media %} diff --git a/servo/templates/orders/history.html b/servo/templates/orders/history.html new file mode 100644 index 0000000..5a908b9 --- /dev/null +++ b/servo/templates/orders/history.html @@ -0,0 +1,9 @@ +{% extends "modal.html" %} +{% load i18n %} +{% block header %} + {% trans "Order History" %} +{% endblock header %} + +{% block body %} + {% include "orders/list.html" %} +{% endblock body %} diff --git a/servo/templates/orders/index.html b/servo/templates/orders/index.html new file mode 100755 index 0000000..21116d5 --- /dev/null +++ b/servo/templates/orders/index.html @@ -0,0 +1,55 @@ +{% extends "default.html" %} +{% load servo_tags %} +{% load i18n %} + +{% block toolbar %} +{% if perms.servo.add_order %} + <a href="{% url 'orders-create' %}" class="btn"><i class="icon-plus"></i> {% trans "Create Order" %}</a> + {% if request.session.order_queryset %} + <a href="{% url 'orders-download_results' %}" class="btn"><i class="icon-download"></i> {% trans "Download Results" %}</a> + {% endif %} +{% else %} + <a href="#" class="btn disabled"><i class="icon-plus"></i> {% trans "Create Order" %}</a> +{% endif %} +{% endblock toolbar %} + +{% block content %} +<div class="page-header clearfix"> + <div class="pull-left"> + <h2><i class="glyphicons-icon inbox_in"></i> {{ title }}<br/><small style="margin-left:60px">{{ subtitle }}</small></h2> + </div> + <form class="form-search pull-right"> + <div class="input-append"> + <input type="text" class="search-query filter" placeholder="{% trans "Filter results" %}"/> + <button type="button" class="btn" data-toggle="collapse" data-target="#collapsable"><i class="icon-search"></i></button> + </div> + </form> +</div> + +<div id="collapsable" class="collapse out"> + <div class="well clearfix"> + <form action="" method="get" class="form-inline"> + {% for field in form %} + <div class="control-group pull-left"> + <label class="control-label">{{ field.label }}</label> + <div class="controls">{{ field }}</div> + </div> + {% endfor %} + <p class="clearfix"><hr/></p> + <div class="pull-right"> + <a class="btn" href="{% url 'orders-index' %}?state=0"><i class="icon-refresh"></i> {% trans "Reset" %}</a> + <button class="btn btn-primary" type="submit"><i class="icon-search icon-white"></i> {% trans "Search" %}</button> + </div> + </form> + </div> +</div> + +{% block second_column %} +{% include "orders/list.html" %} +{% endblock second_column %} + +{% endblock content %} + +{% block crumbs %} +<li><a href="{% url 'orders-index' %}">{% trans "Orders" %}</a></li> +{% endblock crumbs %} 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> {% 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 %} diff --git a/servo/templates/orders/list_products.html b/servo/templates/orders/list_products.html new file mode 100755 index 0000000..051c9fe --- /dev/null +++ b/servo/templates/orders/list_products.html @@ -0,0 +1,22 @@ +{% load i18n %} +{% load servo_tags %} + +<div id="products"> + <ul class="unstyled" data-url="{% url 'orders-list_products' order.pk %}"> + {% for p in order.products %} + <li> + <small><strong>{{ p.code }}</strong></small><small class="pull-right">{{ p.price|currency }}</small> + <br/> + <small class="muted">{{ p.title }} - {{ p.get_price_category_display }}</small><br/> + {% if p.kbb_sn %} + <i class="icon-barcode"></i> <a href="#" class="sn" title="{% trans 'Click to select EEE code' %}">{{ p.kbb_sn }}</a> + {% endif %} + </li> + {% empty %} + <li class="muted text-center" style="padding:10px">{% trans "No products added" %}</li> + {% endfor %} + </ul> + <hr/> + <strong>{% trans "Total" %}:</strong> + <span class="pull-right"><strong>{{ order.gross_total|currency }}</strong></span> +</div> diff --git a/servo/templates/orders/notes.html b/servo/templates/orders/notes.html new file mode 100755 index 0000000..06cc61d --- /dev/null +++ b/servo/templates/orders/notes.html @@ -0,0 +1,84 @@ +{% load i18n %} +{% load humanize %} +{% load mptt_tags %} +{% load servo_tags %} + +{% if not order.notes %} +<div class="row-fluid"> + <div class="span12 well empty"><h3 class="muted">{% trans "Order doesn't contain any notes." %}</h3></div> +</div> +{% endif %} + +<ul class="media-list" style="margin-bottom:0px"> +{% recursetree notes %} + {% if node.is_root_node %}<li {% else %}<div {% endif %}class="media"> + <a class="pull-left" href="#"> + {% with node.created_by as profile %} + <img src="{{ profile.get_avatar }}" alt="{{ profile }}" title="{{ profile }}" class="avatar"/> + {% endwith %} + </a> + <div class="btn-group pull-right"> + <a href="{% url 'notes-reply' node.pk %}" class="btn btn-small" title="{% trans "Reply" %}"><i class="icon-share-alt"></i></a> + {% if perms.servo.change_note and order.is_editable %} + <a href="{{ node.get_edit_url }}" class="btn btn-small"><i class="icon-pencil"></i></a> + {% else %} + <a href="#" class="btn btn-small disabled"><i class="icon-pencil"></i></a> + {% endif %} + <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"> + <i class="icon-cog"></i> <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + <li class="dropdown-submenu pull-left"> + <a tabindex="-1" href="#"><i class="icon-tag"></i> {% trans "Tag" %}</a> + <ul class="dropdown-menu"> + {% for t in note_tags %} + <li><a href="{% url 'notes-toggle_tag' node.pk t.pk %}">{{ t }}</a></li> + {% endfor %} + </ul> + </li> + <li class="dropdown-submenu pull-left"> + <a tabindex="-1" href="#"><i class="icon-flag"></i> {% trans "Mark" %}</a> + <ul class="dropdown-menu"> + <li><a href="{% url 'notes-toggle_flag' node.pk 'reported' %}" class="nofollow">{{ node.get_reported_title }}</a></li> + <li><a href="{% url 'notes-toggle_flag' node.pk 'read' %}" class="nofollow">{{ node.get_read_title }}</a></li> + <li><a href="{% url 'notes-toggle_flag' node.pk 'flagged' %}" class="nofollow">{{ node.get_flagged_title }}</a></li> + </ul> + </li> + <li{% if not order.is_editable %} class="disabled"{% endif %}><a href="{% url 'notes-copy' node.pk %}"><i class="icon-plus"></i> {% trans "Copy" %}</a></li> + <li><a href="{% url 'notes-messages' node.pk %}" data-modal="#modal"><i class="icon-info-sign"></i> {% trans "Message Log" %}</a></li> + <li class="divider"></li> + <li{% if not order.is_editable %} class="disabled"{% endif %}><a href="{% url 'notes-delete_note' node.pk %}" data-modal="#modal"><i class="icon-trash"></i> {% trans "Delete" %}</a></li> + </ul> + </div> + <div class="media-body"> + <h5 class="media-heading">{{ node.get_sender_name }} {{ node.created_at|relative_date }} + {% if node.escalation.is_submitted %} + <small class="muted"><i class="icon-globe"></i> {{ node.escalation.escalation_id }}</small> + {% endif %} + </h5> + {% if node.is_reported %} + {{ node.body|markdown }} + {% else %} + <em>{{ node.body|markdown }}</em> + {% endif %} + {% if node.message_set.all|length %} + <i class="icon-envelope" title="{% trans "Note has been sent" %}"></i> + {% endif %} + {% with node.attachments.all as attachments %} + {% for a in attachments %} + <a class="window" href="{{ a.content.url }}"><span class="label label-info"><i class="icon-file icon-white"></i> {{ a }}</span></a> + {% endfor %} + {% endwith %} + {% if not node.is_leaf_node %} + {{ children }} + {% endif %} + {% for t in node.labels.all %} + <span class="label label-{{ t.color }}">{{ t.title }}</span> + {% endfor %} + </div> + {% if node.is_root_node %}</li><hr/>{% else %}</div>{% endif %} +{% endrecursetree %} +</ul> +<p class="clearfix"> + <a href="{% url 'orders-add_note' order.pk %}" class="btn pull-right {% if order.is_closed %}disabled{% endif %}"><i class="icon-plus"></i> {% trans "Add Note" %}</a> +</p> diff --git a/servo/templates/orders/parts.html b/servo/templates/orders/parts.html new file mode 100755 index 0000000..bf3cbf3 --- /dev/null +++ b/servo/templates/orders/parts.html @@ -0,0 +1,36 @@ +{% extends "orders/edit.html" %} +{% load servo_tags %} +{% load i18n %} + +{% block toolbar %} +{% endblock toolbar %} + +{% block first_column %} +<address> + <strong>{{ device.description }}</strong><br/> + <small class="muted">{{ device.configuration }}</small><br/> + <span><a href="{% url 'devices-get_info' device.pk %}" data-modal="#modal">{{ device.get_warranty_status_display }}</a></span> <i class="icon-info-sign"></i><br/> + <i class="icon-barcode"></i> <a href="#" class="sn">{{ device.sn }}</a> + <hr/> + <strong>{% trans "Parts and Services" %}</strong> + {% include "orders/list_products.html" %} +</address> +<hr/> +<input type="text" class="span12 search-query filter" placeholder="{% trans "Filter results" %}"/> +<a class="btn btn-primary pull-right" style="margin:10px" href="{{ order.get_absolute_url }}">{% trans "Done" %}</a> +{% endblock first_column %} + +{% block second_toolbar %} +{% endblock second_toolbar %} + +{% block second_column %} + +<div class="async" data-url="{{ url }}"><h2 class="text-center muted">{% trans "Fetching parts..." %}</h2></div> + +{% endblock second_column %} + +{% block morecrumbs %} +<li><a href="{{ order.get_absolute_url }}">{% trans "Order" %} {{ order.get_footer }}</a> <span class="divider">/</span></li> +<li><a href="">{{ device.description }}</a> <span class="divider">/</span></li> +<li class="active">{% trans "Service Parts" %}</li> +{% endblock morecrumbs %}
\ No newline at end of file diff --git a/servo/templates/orders/print_confirmation.html b/servo/templates/orders/print_confirmation.html new file mode 100755 index 0000000..0b0ca77 --- /dev/null +++ b/servo/templates/orders/print_confirmation.html @@ -0,0 +1,193 @@ +{% extends "default_print.html" %} +{% load servo_tags %} +{% load mptt_tags %} +{% load static %} +{% load i18n %} + +{% block content %} +{% with order.location as location %} +<div class="row"> + <div class="span4"> + {% if location.logo %} + <img src="{% get_media_prefix %}{{ conf.company_logo }}" alt="logo" title="logo" class="media-object pull-left span2" style="margin:10px"/> + {% endif %} + </div> + <div class="span4"> + {{ location.title }}<br/> + {{ location.address }}<br/> + {{ location.zip_code }}, {{ location.city }}<br/> + {{ location.notes }} + </div> + <div class="span4"> + {% block location_info %} + {% endblock location_info %} + {% trans "Email Address" %}: {{ location.email }}<br/> + {% trans "Phone" %}: {{ location.phone }}<br/><br/> + {% trans "Repair Number" %}: {{ order.code }}<br/> + <img src="{% url 'barcodes-view' order.code %}" alt="{{ order.code }}"/> + </div> +</div> +{% endwith %} +<div class="row" style="margin-top:2em;margin-bottom:1em"> + <div class="span6"> + {% trans "Date" %}: {% now "SHORT_DATE_FORMAT" %} + </div> +</div> +<div class="row"> + <div class="span12 text-center"><h3>{% block title %}{% trans "Work Confirmation" %} {{ order.code }}{% endblock title %}</h3></div> +</div> +<div class="row"> + <div class="span12"> + <table class="table"> + <thead> + <tr> + <th>{% trans "Customer Information" %}</th> + <th>{% trans "Product Information" %}</th> + </tr> + </thead> + <tbody> + <tr> + <td> + {% block customer_details %} + <strong>{{ order.customer.fullname }}</strong><br/> + {% trans "Daytime Phone" %}: {{ order.customer.phone|default:"-" }}<br/> + {% trans "Email Address" %}: {{ order.customer.email|default:"-" }} + {% if order.customer.street_address %} + <br/> + {% trans "Address" %}: {{ order.customer.street_address }}<br/> + {{ order.customer.zip_code }} {{ order.customer.city }} + {% endif %} + {% endblock customer_details %} + </td> + <td> + {% for device in order.get_devices %} + {% trans "Model" %}: {{ device.description }}<br/> + {% trans "Warranty Status" %}: {{ device.get_warranty_status_display }}<br/> + {% trans "Estimated Date of Purchase" %}: {{ device.purchased_on|default:"-" }}<br/> + {% if device.imei %} + {% trans "IMEI Number" %}: {{ device.imei }}<br/> + {% trans "Activation Policy" %}: {{ device.initial_activation_policy }}<br/> + {% endif %} + {% if device.sn %} + {% trans "Serial Number" %}: {{ device.sn }}<br/> + <img src="{% url 'barcodes-view' device.sn %}" alt=""/> + {% endif %} + {% endfor %} + </td> + </tr> + {% if order.has_accessories %} + <tr><td colspan="2"><strong>{% trans "Accessories" %}:</strong> {{ order.get_accessories|join:", " }}</td></tr> + {% endif %} + </tbody> + </table> + </div> +</div> +<div class="row"> + <div class="span12"> + {% block work_description %} + {% if order.reported_notes.count > 0 %} + <h4>{% trans "Work Description" %}</h4> + {% for n in order.reported_notes %} + {{ n.body|markdown }} + {% endfor %} + {% endif %} + {% endblock work_description %} + </div> +</div> +<div class="row"> + <div class="span12"> + {% block parts_and_services %} + {% if order.has_products %} + <h4>{% trans "Products and Services" %}</h4> + <table class="table"> + <thead> + <tr> + <th colspan="2">{% trans "Product" %}</th> + <th>{% trans "Warranty" %}</th> + <th style="width:50px">{% trans "VAT %" %}</th> + <th style="width:40px">{% trans "Qty" %}</th> + <th style="width:60px">{% trans "0% VAT" %}</th> + <th style="width:60px">{% trans "Price" %}</th> + <th style="width:60px">{% trans "Total" %}</th> + </tr> + </thead> + <tbody> + {% block list_products %} + {% for i in order.products %} + <tr> + <td style="width:80px">{{ i.code }}</td> + <td>{{ i.title }}{% if i.sn %}<br/><span class="muted">{% trans "SN" %}: {{ i.sn }} {% if i.imei %} + {% trans "IMEI" %}: {{ i.imei }}{% endif %}{% endif %}</span></td> + <td>{{ i.product.get_warranty_display|default:"" }}</td> + <td>{{ i.product.pct_vat|floatformat:"0" }}%</td> + <td>{{ i.amount }}</td> + <td>{{ i.price_notax|currency }}</td> + <td>{{ i.price|currency }}</td> + <td>{{ i.total_gross|currency }}</td> + </tr> + {% endfor %} + {% endblock list_products %} + </tbody> + <tfoot> + <tr> + <td></td> + <td></td> + <td></td> + <td></td> + <td></td> + <td></td> + <td style="text-align:right">{% trans "Total" %}:</td> + <td>{% block order_total %}{{ order.gross_total|currency }}{% endblock order_total %}</td> + </tr> + </tfoot> + </table> + {% endif %} + {% endblock parts_and_services %} + </div> +</div> +<div class="row"> + <div class="span12"> + {% block customer_pickup %} + <h4>{% trans "Customer Pickup" %}</h4> + <table class="table"> + <tbody> + <tr> + <td style="width:40%"> </td> + <td style="width:40%"> </td> + <td style="width:20%"> </td> + </tr> + <tr> + <td>{% trans "Customer Name" %}</td> + <td>{% trans "Signature" %}</td> + <td>{% trans "Date" %}</td> + </tr> + </tbody> + </table> + {% endblock customer_pickup %} + {% block received_by %} + <h5>{% trans "Received By" %}</h5> + <table class="table"> + <tbody> + <tr> + <td style="width:40%">{{ order.created_by.get_full_name }}</td> + <td style="width:40%"> </td> + <td style="width:20%">{{ order.created_at|date:"SHORT_DATE_FORMAT" }}</td> + </tr> + <tr> + <td>{% trans "Name" %}</td> + <td>{% trans "Signature" %}</td> + <td>{% trans "Date" %}</td> + </tr> + </tbody> + </table> + {% endblock received_by %} + </div> +</div> +<div class="row"> + <div class="span12"> + <hr/> + {% block tos %}{{ conf.terms_of_service|markdown }}{% endblock tos %} + {% block footer %}{% endblock footer %} + </div> +</div> +{% endblock content %} diff --git a/servo/templates/orders/print_dispatch.html b/servo/templates/orders/print_dispatch.html new file mode 100755 index 0000000..003e03e --- /dev/null +++ b/servo/templates/orders/print_dispatch.html @@ -0,0 +1,38 @@ +{% extends "orders/print_confirmation.html" %} +{% load i18n %} + +{% block title %} + {% blocktrans with code=order.code%}Dispatch #{{ code }}{% endblocktrans %} +{% endblock title %} + +{% block parts_and_services %} +<h4>{% trans "Products and Services" %}</h4> +<table class="table"> + <thead> + <tr> + <th colspan="2">{% trans "Product" %}</th> + <th>{% trans "Warranty" %}</th> + <th style="width:50px">{% trans "VAT %" %}</th> + <th style="width:40px">{% trans "Qty" %}</th> + </tr> + </thead> + <tbody> + {% block list_products %} + {% for i in order.products %} + <tr> + <td style="width:75px">{{ i.product.code }}</td> + <td>{{ i.title }}{% if i.sn %}<br/><span class="muted">{% trans "SN" %}: {{ i.sn }}</span>{% endif %}</td> + <td>{{ i.product.warranty_period }} {% trans "mon." %}</td> + <td>{{ i.product.pct_vat|floatformat:"0" }}%</td> + <td>{{ i.amount }}</td> + </tr> + {% endfor %} + {% endblock list_products %} + </tbody> +</table> +{% endblock parts_and_services %} + +{% block received_by %} +{% endblock received_by %} + +{% block tos %}{% endblock tos %} diff --git a/servo/templates/orders/print_quote.html b/servo/templates/orders/print_quote.html new file mode 100755 index 0000000..3c3a7d7 --- /dev/null +++ b/servo/templates/orders/print_quote.html @@ -0,0 +1,3 @@ +{% extends "orders/print_confirmation.html" %} + +{% block tos %}{% endblock tos %} diff --git a/servo/templates/orders/print_receipt.html b/servo/templates/orders/print_receipt.html new file mode 100755 index 0000000..c4de827 --- /dev/null +++ b/servo/templates/orders/print_receipt.html @@ -0,0 +1,46 @@ +{% extends "orders/print_confirmation.html" %} +{% load servo_tags %} +{% load i18n %} + +{% block title %} + {% blocktrans with invoice.pk as number %}Receipt {{ number }}{% endblocktrans %} +{% endblock title %} + +{% block customer_details %} + <strong>{{ invoice.customer_name }}</strong><br/> + {% trans "Daytime Phone" %}: {{ invoice.customer_phone|default:"-" }}<br/> + {% trans "Email Address" %}: {{ invoice.customer_email|default:"-" }} + {% if invoice.customer_address %} + <br/> + {% trans "Address" %}: {{ invoice.customer_address }} + {% endif %} +{% endblock customer_details %} + +{% block list_products %} +{% for i in invoice.invoiceitem_set.all %} + <tr> + <td style="width:80px">{{ i.code }}</td> + <td>{{ i.title }}{% if i.sn %}<br/><span class="muted">{% trans "SN" %}: {{ i.sn }} {% if i.imei %}{% trans "IMEI" %}: {{ i.imei }}{% endif %}{% endif %}</span></td> + <td>{{ i.product.get_warranty_display|default:"" }}</td> + <td>{{ i.product.pct_vat|floatformat:"0" }}%</td> + <td>{{ i.amount }}</td> + <td>{{ i.price_notax|currency }}</td> + <td>{{ i.price|currency }}</td> + <td>{{ i.total_gross|currency }}</td> + </tr> +{% endfor %} +{% endblock list_products %} + +{% block order_total %} + {{ invoice.total_gross|currency }} +{% endblock order_total %} + +{% block customer_pickup %} +<p class="text-right"> + <strong>{% trans "Date of invoice" %}: {{ invoice.created_at|date:"SHORT_DATE_FORMAT" }}</strong><br/> + <strong>{% trans "Payment method" %}: {{ invoice.get_payment_methods|join:", " }}</strong><br/> + <strong>{% trans "Sales Person" %}: {{ invoice.created_by.get_full_name }}</strong><br/> +</p> +{% endblock customer_pickup %} + +{% block tos %}{% endblock tos %} diff --git a/servo/templates/orders/products.html b/servo/templates/orders/products.html new file mode 100755 index 0000000..4476ae8 --- /dev/null +++ b/servo/templates/orders/products.html @@ -0,0 +1,98 @@ +{% load i18n %} +{% load servo_tags %} + +{% with order.serviceorderitem_set.all as products %} +<table class="table" style="margin-bottom:0px"> + {% if products.count %} + <thead> + <tr> + <th style="width:64px"></th> + <th>{% trans "Product" %}</th> + <th>{% trans "Amount" %}</th> + <th>{% trans "Price Category" %}</th> + <th>{% trans "Price" %}</th> + <th>{% trans "Total" %}</th> + <th></th> + </tr> + </thead> + {% endif %} + <tbody> + {% for item in products %} + {% with item.product as product %} + <tr> + <td><img src="{{ product.get_photo }}" alt="{{ product }}" class="img-icon"/></td> + <td> + <strong><a href="{% url 'products-get_info' item.code order.location.pk %}" data-modal="#modal">{{ product.code }}</a></strong><br/> + <div>{{ item.title }}</div> + {% if item.sn or item.kbb_sn %} + <p><small class="muted">{% trans "Serial Number" %}: {{ item.sn }}{% if item.kbb_sn %}, KBB: {{ item.kbb_sn }}{% endif %}</small></p> + {% endif %} + {% if product.is_apple_part %} + {% for repair in order.get_repairs %} + <div class="btn-group"> + <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"> + <i class="icon-wrench"></i> {{ repair.confirmation }} <span class="caret"></span> + </a> + {% if item in repair.get_products %} + {% with item.get_part as part %} + {% include "repairs/part_menu.html" %} + {% endwith %} + {% else %} + <ul class="dropdown-menu"> + {% if repair.is_open %} + <li><a href="{% url 'repairs-add_part' repair.pk item.pk %}" data-modal="#modal" class="spin">{% trans "Add to Repair" %}</a></li> + {% else %} + <li class="disabled"><a href="#">{% trans "Add to Repair" %}</a></li> + {% endif %} + </ul> + {% endif %} + </div> + {% endfor %} + {% endif %} + </td> + <td>{{ item.amount }}</td> + <td>{{ item.get_price_category_display }}</td> + <td><a href="#" class="tt" title="{{ item.price_notax|currency }}">{{ item.price|currency }}</a></td> + <td><a href="#" class="tt" title="{{ item.total_net|currency }}">{{ item.total_gross|currency }}</a></td> + <td style="width:125px"> + {% if order.is_editable %} + <div class="btn-group"> + {% if item.should_report %} + <a href="{% url 'orders-report_product' pk=order.id item_id=item.id %}" title="Toggle report flag" class="btn btn-small btn-success nofollow active" data-toggle="button"><i class="icon-ok"></i></a> + {% else %} + <a href="{% url 'orders-report_product' pk=order.id item_id=item.id %}" title="Toggle report flag" class="btn btn-small btn-success nofollow" data-toggle="button"><i class="icon-ok icon-white"></i></a> + {% endif %} + </div> + <div class="btn-group"> + <a href="{% url 'orders-edit_product' pk=order.id item_id=item.id %}" class="btn btn-small" title="{% trans "Edit" %}" data-modal="#modal"><i class="icon-pencil"></i></a> + <a class="btn btn-small dropdown-toggle {% if not order.is_editable %}disabled{% endif %}" data-toggle="dropdown" href="#"><i class="icon-cog"></i> <span class="caret"></span> + </a> + <ul class="dropdown-menu pull-right"> + {% if item.can_create_device %} + <li><a href="{% url 'orders-create_device' order.pk item.pk %}">{% trans "Create Device" %}</a></li> + {% else %} + <li class="disabled"><a href="#">{% trans "Create Device" %}</a></li> + {% endif %} + <li class="divider"></li> + <li><a href="{% url 'orders-remove_product' pk=order.id item_id=item.id %}" data-modal="#modal" title="{% trans "Delete" %}"><i class="icon-trash"></i> {% trans "Remove" %}</a></li> + </ul> + </div> + {% endif %} + </td> + </tr> + {% endwith %} + {% empty %} + <div class="row-fluid"> + <div class="span12 well empty"><h3 class="muted">{% trans "Order doesn't contain any products." %}</h3></div> + </div> + {% endfor %} + </tbody> +</table> +<a href="{% url 'products-choose' order_id=order.pk %}" data-modal="#modal" class="btn {% if not order.is_editable %}disabled{% endif %} pull-right"><i class="icon-plus"></i> {% trans "Add Product" %}</a> +{% endwith %} +<p class="clearfix"> + <hr/> + {% if order.serviceorderitem_set.count %} + <h3 class="pull-right">{% trans "Order Total" %}: <a href="#" class="tt" title="{{ order.net_total|currency }}">{{ order.gross_total|currency }}</a></h3> + {% endif %} +</p> diff --git a/servo/templates/orders/remove_customer.html b/servo/templates/orders/remove_customer.html new file mode 100755 index 0000000..53572e2 --- /dev/null +++ b/servo/templates/orders/remove_customer.html @@ -0,0 +1,17 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block header %} + {% trans "Remove this customer from the order?" %} +{% endblock header %} + +{% block body %} + {% trans "This will not delete the customer from the database." %} +{% endblock body %} + +{% block footer %} + <form method="post" action="{{ action }}"> + {% csrf_token %} + <button type="submit" class="btn btn-danger">{% trans "Remove" %}</button> + </form> +{% endblock footer %} diff --git a/servo/templates/orders/remove_device.html b/servo/templates/orders/remove_device.html new file mode 100755 index 0000000..dcfd376 --- /dev/null +++ b/servo/templates/orders/remove_device.html @@ -0,0 +1,17 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block header %} + {% blocktrans with dev=device.description %}Remove {{ dev }}?{% endblocktrans %} +{% endblock header %} + +{% block body %} + <p>{% trans "This will not delete the device from the database." %}</p> +{% endblock body %} + +{% block footer %} + <form action="{{ action }}" method="post" accept-charset="utf-8"> + {% csrf_token %} + <button type="submit" class="btn btn-danger pull-right">{% trans "Remove" %}</button> + </form> +{% endblock footer %} diff --git a/servo/templates/orders/remove_product.html b/servo/templates/orders/remove_product.html new file mode 100755 index 0000000..e6d2966 --- /dev/null +++ b/servo/templates/orders/remove_product.html @@ -0,0 +1,17 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block header %} + {% trans "Really remove product from order?" %} +{% endblock header %} + +{% block body %} + {% trans "Product will not be deleted from the warehouse." %} +{% endblock body %} + +{% block footer %} +<form action="{% url 'servo.views.order.remove_product' order.id item.id %}" method="post"> + {% csrf_token %} + <button type="submit" class="btn btn-danger">{% trans "Delete" %}</button> +</form> +{% endblock footer %} diff --git a/servo/templates/orders/repair.html b/servo/templates/orders/repair.html new file mode 100755 index 0000000..b3798db --- /dev/null +++ b/servo/templates/orders/repair.html @@ -0,0 +1,63 @@ +{% extends "orders/edit.html" %} +{% load i18n %} + +{% block toolbar %} +{% if repair.is_open %} +<a href="{% url 'repairs-complete_repair' order.pk repair.pk %}" class="btn" data-modal="#modal"><i class="icon-ok"></i> {% trans "Complete Repair" %}</a> +{% else %} +<a href="#" class="btn disabled" data-modal="#modal"><i class="icon-ok"></i> {% trans "Complete Repair" %}</a> +{% endif %} +<a class="btn" href="{% url 'repairs-copy_repair' repair.pk %}"><i class="icon-plus-sign"></i> {% trans "Copy" %}</a> +{% endblock toolbar %} + +{% block second_column %} +<h3>{{ status }}</h3> +<dl class="dl-horizontal"> + <dt>{% trans "Symptom" %}</dt> + <dd>{{ repair.symptom }}</dd> + <dt>{% trans "Diagnosis" %}</dt> + <dd>{{ repair.diagnosis }}</dd> + <dt>{% trans "Request Review" %}</dt> + <dd>{{ repair.request_review|yesno }}</dd> +{% if repair.attachment %} + <dt>{% trans "Attachment" %}</dt> + {% with repair.attachment as a %} + <dd><a class="label label-info window" href="{{ a.url }}"><i class="icon-download icon-white"></i> {{ a }}</a></dd> + {% endwith %} +{% endif %} + <dt>{% trans "Confirmation" %}</dt> + <dd>{{ repair.confirmation }}</dd> + <dt>{% trans "Reference" %}</dt> + <dd>{{ repair.reference }}</dd> + <dt>{% trans "Notes" %}</dt> + <dd>{{ notes|default:"-"|linebreaks }}</dd> +</dl> +<table class="table"> + <tbody> + {% for part in parts %} + <tr> + <td> + <a href="{% url 'products-view_product' pk=part.order_item.product_id %}"><strong>{{ part.part_number }}</strong></a> + <br/> + {{ part.part_title }}<br/> + <small>{{ part.get_symptom_code_display }} - {{ part.get_symptom_modifier_display }}</small> + </td> + <td><br/>{{ part.coverage_description|default:"-" }}</td> + {% if part.order_status_code == 'OSHP' %} + <td><br/><a href="{{ part.carrier_url }}" class="window">{{ part.order_status }}</a></td> + {% else %} + <td><br/>{{ part.order_status|default:"-" }}</td> + {% endif %} + <td style="vertical-align:middle"> + <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> + {% include "repairs/part_menu.html" %} + </div> + </td> + </tr> + {% endfor %} + </tbody> +</table> +{% endblock second_column %} diff --git a/servo/templates/orders/reserve_products.html b/servo/templates/orders/reserve_products.html new file mode 100755 index 0000000..318a28d --- /dev/null +++ b/servo/templates/orders/reserve_products.html @@ -0,0 +1,13 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block header %} + {% blocktrans with id=order.code %}Reserve all products in order {{ id }}?{% endblocktrans %} +{% endblock header %} + +{% block footer %} +<form action="{{ action }}" method="post" accept-charset="utf-8"> + {% csrf_token %} + <button class="btn btn-primary" type="submit">{% trans "Reserve" %}</button> +</form> +{% endblock footer %} diff --git a/servo/templates/orders/search.html b/servo/templates/orders/search.html new file mode 100755 index 0000000..2789b20 --- /dev/null +++ b/servo/templates/orders/search.html @@ -0,0 +1,7 @@ +{% load i18n %} + +{% if orders %} + {% include "orders/list.html" %} +{% else %} + <h1 class="muted text-center">{% trans "No orders found" %}</h1> +{% endif %} diff --git a/servo/templates/orders/statuses.html b/servo/templates/orders/statuses.html new file mode 100755 index 0000000..8f3eb4b --- /dev/null +++ b/servo/templates/orders/statuses.html @@ -0,0 +1,7 @@ +{% load i18n %} +<select name="status" id="select_status"> + <option value="">{% trans "Choose" %}...</option> +{% for status in statuses %} + <option value="{{ status.id }}">{{ status.title }}</option> +{% endfor %} +</select> diff --git a/servo/templates/orders/tabs.html b/servo/templates/orders/tabs.html new file mode 100755 index 0000000..134aa9f --- /dev/null +++ b/servo/templates/orders/tabs.html @@ -0,0 +1,8 @@ +{% load i18n %} +{% load humanize %} + +<li{% if not repair and active == 'order' %} class="active"{% endif %}><a href="{{ order.get_absolute_url }}">{% trans "Order" %}</a></li> +{% for r in order.repair_set.all %} +<li{% if r.pk == repair.pk %} class="active"{% endif %}><a href="{{ r.get_absolute_url }}">{{ r.get_number }}</a></li> +{% endfor %} +<li{% if active == 'events' %} class="active"{% endif %}><a href="{{ order.get_absolute_url }}events/">{% trans "Events" %}</a></li> diff --git a/servo/templates/orders/toggle_flagged.html b/servo/templates/orders/toggle_flagged.html new file mode 100755 index 0000000..f062776 --- /dev/null +++ b/servo/templates/orders/toggle_flagged.html @@ -0,0 +1 @@ +<i class="icon-flag"></i> {{ action }} diff --git a/servo/templates/orders/toggle_follow.html b/servo/templates/orders/toggle_follow.html new file mode 100755 index 0000000..2563974 --- /dev/null +++ b/servo/templates/orders/toggle_follow.html @@ -0,0 +1 @@ +<i class="icon-eye-{{ icon }}"></i> {{ action }} diff --git a/servo/templates/orders/toolbar.html b/servo/templates/orders/toolbar.html new file mode 100755 index 0000000..4bd9fef --- /dev/null +++ b/servo/templates/orders/toolbar.html @@ -0,0 +1,116 @@ +{% load cache %} +{% load i18n %} + +<div class="btn-group"> +{% if order.is_editable %} + <a class="btn" href="{% url 'orders-add_note' order.pk %}"><i class="icon-file"></i> {% trans "Add Note" %}</a> +{% else %} + <a class="btn disabled" href="#"><i class="icon-file"></i> {% trans "Add Note" %}</a> +{% endif %} + <a class="btn dropdown-toggle {% if not order.is_editable %}disabled{% endif %}" data-toggle="dropdown" href="#"> + <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + <li><a href="{% url 'devices-choose' order.pk %}" data-modal="#modal">{% trans "Add Device" %}...</a></li> + <li><a href="{% url 'products-choose' order_id=order.pk %}" data-modal="#modal">{% trans "Add Product" %}...</a></li> + <li><a href="{% url 'orders-choose_customer' order.pk %}" data-modal="#modal">{% trans "Choose Customer" %}...</a></li> + </ul> +</div> +<div class="btn-group"> + <a href="{% url 'orders-print_order' order.pk 'confirmation' %}" class="btn window" title="{% trans 'Print' %}"><i class="icon-print"></i> {% trans "Print" %}</a> + <button class="btn dropdown-toggle" data-toggle="dropdown"> + <span class="caret"></span> + </button> + <ul class="dropdown-menu"> + <li><a href="{% url 'orders-print_order' order.pk 'quote' %}" class="window">{% trans "Cost Estimate" %}</a></li> + {% if order.invoice_set.count %} + <li><a href="{% url 'orders-print_order' order.pk 'receipt' %}" class="window">{% trans "Receipt" %}</a></li> + <li><a href="{% url 'orders-print_order' order.pk 'dispatch' %}" class="window">{% trans "Dispatch" context "noun" %}</a></li> + {% endif %} + </ul> +</div> +<div class="btn-group"> + <a class="btn dropdown-toggle {% if not order.is_editable %}disabled{% endif %}" data-toggle="dropdown" href="#"> + <i class="icon-inbox"></i> {{ order.get_queue }} <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + {% for i in queues %} + <li{% if i == order.queue %} class="active"{% endif %}><a href="{% url 'orders-update' order.pk 'queue' i.pk %}">{{ i }}</a></li> + {% endfor %} + <li class="divider"></li> + {% if order.queue %} + <li><a href="{% url 'orders-update' order.pk 'queue' 0 %}">{% trans "Remove Queue" %}</a></li> + {% else %} + <li class="disabled"><a href="#">{% trans "Remove Queue" %}</a></li> + {% endif %} + </ul> +</div> +<div class="btn-group"> + <a class="btn dropdown-toggle {% if not order.queue or not order.is_editable or statuses|length < 1 %}disabled{% endif %}" data-toggle="dropdown" href="#"> + <i class="icon-tasks"></i> {{ order.get_status|truncatechars:25 }} <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + {% for i in statuses %} + <li{% if i == order.status %} class="active"{% endif %}><a href="{% url 'orders-update' order.pk 'status' i.pk %}">{{ i }}</a></li> + {% endfor %} + <li class="divider"></li> + <li><a href="{% url 'orders-update' order.pk 'status' 0 %}">{% trans "Remove Status" %}</a></li> + </ul> +</div> +<div class="btn-group"> +{% if order.can_dispatch %} + <a class="btn" href="{% url 'orders-dispatch' order.pk %}">{% trans "Dispatch" %}</a> +{% else %} + <a class="btn disabled" href="#">{% trans "Dispatch" %}</a> +{% endif %} +{% if perms.servo.change_order and order.can_close %} + <a class="btn" href="{% url 'orders-close' order.pk %}" data-modal="#modal"><i class="icon-lock"></i> {% trans "Close" %}</a> +{% elif perms.servo.delete_order and order.is_closed %} + <a class="btn" href="{% url 'orders-reopen_order' order.pk %}"><i class="icon-lock"></i> {% trans "Reopen" %}</a> +{% else %} + <a class="btn disabled" href="#"><i class="icon-lock"></i> {% trans "Close" %}</a> +{% endif %} +</div> +<div class="btn-group"> + <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> + <i class="icon-cog"></i> <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + {% if request.user in order.followed_by.all %} + <li><a href="{% url 'orders-toggle_follow' order.pk %}">{% trans "Unfollow Order" %}</a></li> + {% else %} + <li><a href="{% url 'orders-toggle_follow' order.pk %}">{% trans "Follow Order" %}</a></li> + {% endif %} + {% if perms.servo.add_order and perms.servo.copy_order %} + <li><a href="{% url 'orders-copy_order' order.pk %}">{% trans "Copy Order" %}</a></li> + {% else %} + <li><a class="disabled" href="#">{% trans "Copy Order" %}</a></li> + {% endif %} + <li><a href="{% url 'barcodes-view' order.code %}?f=svg" target="_blank">{% trans "Show Barcode" %}</a></li> + <li class="divider"></li> + <li class="dropdown-submenu"> + <a tabindex="-1" href="#">{% trans "Priority" %}</a> + <ul class="dropdown-menu"> + {% for i in priorities %} + <li{% ifequal i.0 order.priority %} class="active"{% endifequal %}><a href="{% url 'orders-update' order.pk 'priority' i.0 %}">{{ i.1 }}</a></li> + {% endfor %} + </ul> + </li> + <li class="divider"></li> + {% if order.can_order_products %} + <li><a href="{% url 'orders-reserve_products' order.pk %}" data-modal="#modal">{% trans "Reserve Products" %}</a></li> + <li><a href="{% url 'purchases-create_po' order_id=order.pk %}">{% trans "Order Products" %}</a></li> + {% else %} + <li class="disabled"><a href="#">{% trans "Reserve Products" %}</a></li> + <li class="disabled"><a href="#">{% trans "Order Products" %}</a></li> + {% endif %} + <li class="divider"></li> + <li><a href="{% url 'repairs-import_repair' order.pk %}" data-modal="#modal">{% trans "Import GSX Repair" %}</a></li> + <li class="divider"></li> + {% if perms.servo.delete_order and order.is_editable %} + <li><a href="{% url 'orders-delete_order' order.pk %}" data-modal="#modal"><i class="icon-trash"> </i> {% trans "Delete Order" %}</a></li> + {% else %} + <li class="disabled"><a href="#"><i class="icon-trash"></i> {% trans "Delete Order" %}</a></li> + {% endif %} + </ul> +</div> |