Skip to content

Instantly share code, notes, and snippets.

@CapnKernel
Last active August 29, 2015 14:13
Show Gist options
  • Select an option

  • Save CapnKernel/16fa152b01c47b682f48 to your computer and use it in GitHub Desktop.

Select an option

Save CapnKernel/16fa152b01c47b682f48 to your computer and use it in GitHub Desktop.
#: templates/shipping/summary.html:6 templates/shipping/summary.html.py:10
msgid "Shipping: All orders"
msgstr "发货:所有的订单"
#: templates/shipping/summary.html:13
msgid "Enter tracking numbers"
msgstr "输入发货挂号"
{% extends "hv/base.html" %}
{% load url from future %}
{% load static %}
{% load i18n %}
{% block header %}{% trans "Shipping: All orders" %}{% endblock %}
{% block content %}
<h3>{% trans "Shipping: All orders" %}</h3>
{# TODO: Only show this if some orders need tracking numbers #}
<button onclick="document.location='{% url 'shipping.views.enter_tracking_numbers' %}';">{% trans "Enter tracking numbers" %}</button>
{% if orders %}
<table border="0">
{% for o in orders %}
{% ifchanged o.status.name %}<tr>
<td colspan="2" valign="bottom">
<br><h3>{{ o.status.name }}</h3>
</td>
</tr>
{% endifchanged %}<tr>
<td>
{% if o.get_urgent %}<img src="{% static 'img/lightning.png' %}" alt="{% trans 'urgent' %}" title="{% trans 'urgent' %}" />{% else %}<img src="{% static 'img/blank1616.png' %}" />{% endif %}
{% if o.has_dhl_rac %}<img src="{% static 'img/dhl-rac.png' %}" alt="{% trans 'DHL remote area charge paid' %}" title="{% trans 'DHL remote area charge paid' %}" />{% else %}<img src="{% static 'img/blank1616.png' %}" />{% endif %}
{% if o.candidate_for_shipping %}<a href="{% url 'shipping.views.order' o.id %}">o{{ o.id }}</a>{% else %}o{{ o.id }}{% endif %} {% blocktrans with custname=o.customer.name %} for {{ custname }}{% endblocktrans %}
</td>
<td>
{% for cat, suppliers in o.get_summary_inc_combo_slaves.items %}
{% for supplier, items in suppliers.items %}
{% if not forloop.parentloop.first %}; {% endif %}{{ supplier }} {{ cat }}:
{% for item in items %}
<img border="0" src="{% static item.status.icon_url %}" alt="{{ item.status.name }}" title="{{ item.status }}" />
{% if item.product.supplier_code %}<a href="{% url 'sorting.views.item' item.id %}">{{ item.product.supplier_code }}</a>{% else %}未知{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
</td>
</tr>
{% endfor %}
</table>
{% else %}
{% trans "No orders" %}
{% endif %}
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment