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/shipments | |
download | Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.gz Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.bz2 Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.zip |
Initial commit
First public commit
Diffstat (limited to 'servo/templates/shipments')
-rwxr-xr-x | servo/templates/shipments/add_to_return-results.html | 8 | ||||
-rwxr-xr-x | servo/templates/shipments/add_to_return.html | 14 | ||||
-rwxr-xr-x | servo/templates/shipments/edit_bulk_return.html | 101 | ||||
-rwxr-xr-x | servo/templates/shipments/index.html | 46 | ||||
-rwxr-xr-x | servo/templates/shipments/list_bulk_returns.html | 37 | ||||
-rwxr-xr-x | servo/templates/shipments/list_incoming.html | 61 | ||||
-rwxr-xr-x | servo/templates/shipments/list_returns.html | 44 | ||||
-rwxr-xr-x | servo/templates/shipments/submit_bulk_return.html | 15 | ||||
-rwxr-xr-x | servo/templates/shipments/update_part.html | 14 | ||||
-rwxr-xr-x | servo/templates/shipments/view_bulk_return.html | 35 |
10 files changed, 375 insertions, 0 deletions
diff --git a/servo/templates/shipments/add_to_return-results.html b/servo/templates/shipments/add_to_return-results.html new file mode 100755 index 0000000..0f1d94e --- /dev/null +++ b/servo/templates/shipments/add_to_return-results.html @@ -0,0 +1,8 @@ +{% load i18n %} +<ul class="nav nav-pills nav-stacked"> +{% for i in results %} + <li><a href="{% url 'shipments-add_to_return' pk=shipment part=i.pk %}">{{ i.order_item.code }}</a></li> +{% empty %} + <li class="text-center">{% trans "No parts found" %}</li> +{% endfor %} +</ul> diff --git a/servo/templates/shipments/add_to_return.html b/servo/templates/shipments/add_to_return.html new file mode 100755 index 0000000..c1ca9da --- /dev/null +++ b/servo/templates/shipments/add_to_return.html @@ -0,0 +1,14 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block header %} +{% trans "Add part to return" %} +{% endblock header %} + +{% block body %} +<form method="post" action="{{ action }}" accept-charset="utf-8" data-target="#search-results" id="search-form"> + {% csrf_token %} + <input type="text" class="search-query" name="q" autocomplete="off" placeholder="{% trans "Return order number" %}"/> +</form> +<div id="search-results"></div> +{% endblock body %} diff --git a/servo/templates/shipments/edit_bulk_return.html b/servo/templates/shipments/edit_bulk_return.html new file mode 100755 index 0000000..588a998 --- /dev/null +++ b/servo/templates/shipments/edit_bulk_return.html @@ -0,0 +1,101 @@ +{% extends "shipments/list_returns.html" %} +{% load servo_tags %} +{% load i18n %} + +{% block toolbar %} + <a href="{% url 'shipments-pick_for_return' shipment.pk %}" class="btn" data-modal="#modal"><i class="icon-plus"></i> {% trans "Add Part" %}</a> +<!-- + {% if formset|length %} + <a href="{% url 'shipments-verify' shipment.pk %}" class="btn"><i class="icon-ok"></i> {% trans "Verify" %}</a> + {% else %} + <a href="#" class="btn disabled"><i class="icon-ok"></i> {% trans "Verify" %}</a> + {% endif %} +//--> +{% endblock toolbar %} + +{% block second_column %} +<ul class="nav nav-tabs"> + {% for k, v in accounts %} + <li class="{% active request k %}"><a href="{% url 'shipments-edit_bulk_return' ship_to=k %}">{{ v }}</a></li> + {% endfor %} +</ul> +<form method="post" action=""> + <div class="span3"> + {% block return_info %} + {% csrf_token %} + {{ formset.management_form }} + <div class="control-group"> + <label class="control-label">{% trans "Carrier" %}</label> + <div class="controls"> + {{ form.carrier }} + </div> + </div> + <div class="control-group"> + <label class="control-label">{% trans "Tracking" %}</label> + <div class="controls"> + {{ form.tracking_id }} + </div> + </div> + <div class="control-group"> + <label class="control-label">{% trans "Dimensions" %}</label> + <div class="controls"> + {{ form.length }} {{ form.width }} {{ form.height }} + </div> + </div> + <div class="control-group"> + <label class="control-label">{% trans "Weight" %}</label> + <div class="controls"> + {{ form.weight }} + </div> + </div> + {% endblock return_info %} + </div> + <div class="span9"> + <table class="table"> + <thead> + <th>{% trans "Part" %}</th> + <th>{% trans "Reference" %}</th> + <th style="width:100px">{% trans "Return Order" %}</th> + <th>{% trans "Overpack" %}</th> + <th></th> + </thead> + <tbody> + {% block return_parts %} + {% for f in formset %} + <tr> + {{ f.id }} + {{ f.part_number }} + {{ f.part_title }} + {{ f.service_order }} + {{ f.return_order }} + {% with f.instance as p %} + <td><strong>{{ p.part_number }}</strong><br/>{{ p.part_title }}</td> + {% if p.order_item %} + <td><a href="{{ p.order_item.order.get_absolute_url }}">{{ p.reference }}</a></td> + {% else %} + <td>{{ p.reference }}</td> + {% endif %} + <td>{{ f.return_order.value }}</td> + <td>{% include "snippets/control_group.html" with field=f.box_number %}</td> + <td><a href="{% url 'shipments-remove_from_return' shipment.pk p.pk %}" class="btn"><i class="icon-trash"></i></td> + {% endwith %} + </tr> + {% empty %} + <tr> + <td colspan="5" class="empty muted">{% trans "No parts registered for this shipment" %}</td> + </tr> + {% endfor %} + {% endblock return_parts %} + </tbody> + </table> + {% block form_controls %} + <div class="form-actions"> + <label class="checkbox pull-left"> + <input type="checkbox" name="confirm" id="id_confirm"> {% trans "Confirm" %} + </label> + <button type="submit" class="btn pull-right spin" id="save-bulk-return" data-placeholder="{% trans "Submit" %}">{% trans "Save" %}</button> + </div> + {% endblock form_controls %} + </div> +</form> +{% endblock second_column %} diff --git a/servo/templates/shipments/index.html b/servo/templates/shipments/index.html new file mode 100755 index 0000000..1584f65 --- /dev/null +++ b/servo/templates/shipments/index.html @@ -0,0 +1,46 @@ +{% extends "products/index.html" %} +{% load i18n %} +{% load servo_tags %} + +{% block toolbar %}{% endblock toolbar %} + +{% block content %} +<div class="row-fluid row-header"> + <div class="span12"> + <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> +{% include "products/tabs.html" %} + +<div class="row-fluid"> + {% block second_row %} + <div class="span3"> + {% block first_column %} + <ul class="nav nav-list"> + <li class="{% active request "incoming" %}"> + <a href="{% url 'shipments-list_incoming' %}">{% trans "Incoming" %} <span class="badge pull-right">{{ counts.incoming }}</span></a> + </li> + <li class="{% active request "returns/pending" %}"> + <a href="{% url 'shipments-edit_bulk_return' %}">{% trans "Parts Pending Return" %} <span class="badge pull-right">{{ counts.pending_return }}</span></a> + </li> + <li class="{% active request 'returns/list' %}"><a href="{% url 'shipments-list_bulk_returns' %}">{% trans "Browse Returns" %} <span class="badge pull-right">{{ counts.returns }}</span></a></li> + {% endblock first_column %} + </ul> + </div> + <div class="span9"> + {% block second_column %} + {% endblock second_column %} + </div> + {% endblock second_row %} +</div> + +{% endblock content %} + +{% block breadcrumb %} + +{% endblock breadcrumb %} diff --git a/servo/templates/shipments/list_bulk_returns.html b/servo/templates/shipments/list_bulk_returns.html new file mode 100755 index 0000000..f2c4843 --- /dev/null +++ b/servo/templates/shipments/list_bulk_returns.html @@ -0,0 +1,37 @@ +{% extends "shipments/list_returns.html" %} +{% load servo_tags %} +{% load i18n %} + +{% block second_column %} +<table class="table table-striped sortable"> + <thead> + <tr> + <th>{% trans "ID" %}</th> + <th>{% trans "Tracking ID" %}</th> + <th>{% trans "Tracking URL" %}</th> + <th>{% trans "Parts" %}</th> + <th>{% trans "Returned" %}</th> + </tr> + </thead> + <tbody> + {% for i in returns %} + <tr> + {% if i.return_id %} + <td><a href="{% url 'shipments-view_packing_list' pk=i.pk %}" class="window">{{ i.return_id }}</a></td> + {% else %} + <td></td> + {% endif %} + <td>{{ i.tracking_id }}</td> + <td><a href="{{ i.tracking_url }}">{{ i.get_carrier_display }}</a></td> + <td>{{ i.num_parts }}</td> + <td>{{ i.dispatched_by }}<br/><small class="muted">{{ i.dispatched_at|date:"SHORT_DATETIME_FORMAT" }}</small></td> + </tr> + {% endfor %} + </tbody> +</table> +{% include "pagination.html" with items=returns %} +{% endblock second_column %} + +{% block breadcrumb %} +<li class="active"><span class="divider">/</span> {% trans "Browse Returns" %}</li> +{% endblock breadcrumb %} diff --git a/servo/templates/shipments/list_incoming.html b/servo/templates/shipments/list_incoming.html new file mode 100755 index 0000000..5d2d784 --- /dev/null +++ b/servo/templates/shipments/list_incoming.html @@ -0,0 +1,61 @@ +{% extends "shipments/index.html" %} +{% load i18n %} + +{% block toolbar %} +{% endblock toolbar %} + +{% block second_column %} +{% include "snippets/filtering_form.html" %} +<form method="post" action=""> + {% csrf_token %} + <table class="table table-hover sortable"> + <thead> + <tr> + {% if can_receive %} + <th data-defaultsort="disabled"></th> + {% endif %} + <th>{% trans "Part" %}</th> + <th>{% trans "Service Order" %}</th> + <th>{% trans "Confirmation" %}</th> + <th>{% trans "Ordered" %}</th> + </tr> + </thead> + <tbody class="searchable"> + {% for i in inventory %} + <tr> + {% if can_receive %} + <td><input type="checkbox" name="id" value="{{ i.pk|safe }}" class="toggle-submit"/></td> + {% endif %} + {% with i.product as p %} + <td data-value="{{ p.code }}"> + <strong><a href="{% url 'shipments-view_incoming' i.pk %}" data-modal="#modal">{{ p.code }}</a></strong><br/>{{ p.title }} + </td> + {% endwith %} + {% with i.purchase_order as po %} + <td data-value="{{ po.sales_order.code }}"> + {% if po.sales_order %} + <a href="{% url 'orders-edit' po.sales_order.pk %}">{{ po.sales_order.code }}</a> + {% endif %} + <br/><small class="muted">{{ po.reference }}</small> + </td> + <td>{{ po.confirmation }}</td> + <td>{{ po.created_by }}<br/><small class="muted">{{ po.submitted_at|date:"SHORT_DATE_FORMAT" }}</small></td> + {% endwith %} + </tr> + {% empty %} + <tr><td colspan="7" class="muted empty">{% trans "No incoming products" %}</td></tr> + {% endfor %} + </tbody> + </table> + {% if can_receive %} + <div class="form-actions"> + <button type="submit" class="btn btn-primary pull-right" disabled="disabled">{% trans "Receive" %}</button> + </div> + {% endif %} +</form> +{% include "pagination.html" with items=inventory %} +{% endblock second_column %} + +{% block breadcrumb %} +<li class="active"><span class="divider">/</span><a href="{% url 'shipments-list_incoming' %}">{% trans "Incoming" %}</a></li> +{% endblock breadcrumb %} diff --git a/servo/templates/shipments/list_returns.html b/servo/templates/shipments/list_returns.html new file mode 100755 index 0000000..7d57286 --- /dev/null +++ b/servo/templates/shipments/list_returns.html @@ -0,0 +1,44 @@ +{% extends "shipments/index.html" %} +{% load servo_tags %} +{% load i18n %} + +{% block second_column %} +<form method="post" action=""> + {% csrf_token %} + <table class="table table-hover"> + <thead> + <tr> + <th><input type="checkbox" class="toggle_column"/></th> + <th>{% trans "Code" %}</th> + <th>{% trans "Title" %}</th> + <th>{% trans "Order" %}</th> + <th>{% trans "Return Order" %}</th> + <th>{% trans "Register For Return" %}</th> + <th>{% trans "Serial Number" %}</th> + </tr> + </thead> + <tbody> + {% for p in parts %} + <tr> + <td><input type="checkbox" name="items" value="{{ p.returnOrderNumber }}"/></td> + <td>{{ p.partNumber }}</td> + <td>{{ p.partDescription|truncatechars:42 }}</td> + <td>{{ p.purchaseOrderNumber }}</td> + <td><a href="{% url 'shipments-return_label' p.partNumber p.returnOrderNumber %}" class="window">{{ p.returnOrderNumber }}</a></td> + <td>{{ p.registeredForReturn }}</td> + <td>{{ p.kbbSerialNumber }}</td> + </tr> + {% empty %} + <tr> + <td colspan="7" class="muted empty">{% trans "No parts pending return" %}</td> + </tr> + {% endfor %} + </tbody> + </table> + <button type="submit" class="btn btn-primary pull-right" disabled="disabled">{% trans "Submit" %}</button> +</form> +{% endblock second_column %} + +{% block breadcrumb %} +<li class="active"><span class="divider">/</span> <a href="{% url 'shipments-returns' %}">{% trans "Parts Pending Return" %}</a></li> +{% endblock breadcrumb %} diff --git a/servo/templates/shipments/submit_bulk_return.html b/servo/templates/shipments/submit_bulk_return.html new file mode 100755 index 0000000..ee897c4 --- /dev/null +++ b/servo/templates/shipments/submit_bulk_return.html @@ -0,0 +1,15 @@ +{% extends "modal.html" %} +{% load i18n %} +{% block header %} + {% trans "Submit the bulk return?" %} +{% endblock header %} + +{% block body %} + +{% endblock body %} + +{% block footer %} + <form method="post" action="{{ action }}"> + <button type="submit" class="btn btn-primary">{% trans "Submit" %}</button> + </form> +{% endblock footer %} diff --git a/servo/templates/shipments/update_part.html b/servo/templates/shipments/update_part.html new file mode 100755 index 0000000..8c0d266 --- /dev/null +++ b/servo/templates/shipments/update_part.html @@ -0,0 +1,14 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block header %} + {{ title }} +{% endblock header %} + +{% block body %} +{{ msg }} +<form action="{{ action }}" method="post" class="form-horizontal"> + {% csrf_token %} + {% include "form_snippet.html" %} +</form> +{% endblock body %} diff --git a/servo/templates/shipments/view_bulk_return.html b/servo/templates/shipments/view_bulk_return.html new file mode 100755 index 0000000..e5b935c --- /dev/null +++ b/servo/templates/shipments/view_bulk_return.html @@ -0,0 +1,35 @@ +{% extends "shipments/edit_bulk_return.html" %} +{% load i18n %} + +{% block return_info %} +<dl> + <dt>{% trans "Carrier" %}</dt> + <dd>{{ shipment.get_carrier_display }}</dd> + <dt>{% trans "Tracking" %}</dt> + <dd>{{ shipment.tracking_id }}</dd> + <dt>{% trans "Dimensions" %}</dt> + <dd>{{ shipment.length }} x {{ shipment.width }} x {{ shipment.height }}</dd> + <dt>{% trans "Weight" %}</dt> + <dd>{{ shipment.weight }} kg</dd> +</dl> +<a class="btn window" href="{{ shipment.packing_list.url }}"><i class="icon-file"></i> {% trans "Open Packing List" %}</a> +{% endblock return_info %} + +{% block return_parts %} +{% for p in shipment.servicepart_set.all %} +<tr> + <td><strong>{{ p.part_number }}</strong><br/>{{ p.part_title }}</td> + <td><a href="{% url 'orders-edit' p.order_item.order.pk %}">{{ p.service_order }}</a></td> + <td><a href="{% url 'parts-return_label' p.repair_id p.pk %}">{{ p.return_order }}</a></td> + <td>{{ p.box_number|default:"Individual" }}</td> +</tr> +{% empty %} +<tr> + <td colspan="6" class="empty muted">{% trans "No parts registered for this shipment" %}</td> +</tr> +{% endfor %} +{% endblock return_parts %} + +{% block form_controls %} + +{% endblock form_controls %} |