byceps/byceps

View on GitHub
byceps/blueprints/admin/shop/shipping/templates/admin/shop/shipping/view_for_shop.html

Summary

Maintainability
Test Coverage
{% extends 'layout/admin/shop/shipping.html' %}
{% set current_page_shop = shop %}
{% set page_title = _('Shipping') %}

{% block body %}

  <h1 class="title">{{ page_title }}</h1>

  {%- if articles_to_ship %}
  <table class="itemlist is-wide">
    <thead>
      <tr>
        <th>{{ _('Article number') }}</th>
        <th>{{ pgettext('article', 'Name') }}</th>
        <th class="number">{{ _('Paid') }}</th>
        <th class="number">{{ _('Open') }}</th>
        <th class="number">{{ _('Total') }}</th>
      </tr>
    </thead>
    <tbody>
      {%- for article_to_ship in articles_to_ship %}
      <tr>
        {%- with article = articles_by_id[article_to_ship.article_id] %}
        <td>{{ article.item_number }}</td>
        <td>{{ article_to_ship.name }}</td>
        <td class="number">{{ article_to_ship.quantity_paid }}</td>
        <td class="number">{{ article_to_ship.quantity_open }}</td>
        <td class="number">{{ article_to_ship.quantity_total }}</td>
        {%- endwith %}
      </tr>
      {%- endfor %}
    </tbody>
  </table>
  {%- else %}
  <div class="box">
    <div class="dimmed-box centered">{{ _('Currently no articles that need to be shipped are ordered or paid.') }}</div>
  </div>
  {%- endif %}

{%- endblock %}