byceps/byceps

View on GitHub
byceps/blueprints/site/shop/orders/templates/site/shop/orders/_articles.html

Summary

Maintainability
Test Coverage
  <table class="itemlist is-wide">
    <thead>
      <tr>
        <th class="number">{{ _('Quantity') }}</th>
        <th style="width: 100%;">{{ pgettext('article', 'Name') }}</th>
        <th class="number">{{ _('Unit price') }}</th>
        <th class="number">{{ _('Total') }}</th>
      </tr>
    </thead>
    <tbody>
      {%- for line_item in order.line_items|sort(attribute='article_number') %}
      <tr>
        <td class="number">{{ line_item.quantity }}</td>
        <td>{{ line_item.name }}</td>
        <td class="number">{{ line_item.unit_price|moneyformat }}</td>
        <td class="number">{{ line_item.line_amount|moneyformat }}</td>
      </tr>
      {%- endfor %}
    </tbody>
    <tfoot>
      <tr>
        <th colspan="3"></th>
        <td class="bignumber number">{{ order.total_amount|moneyformat }}</td>
      </tr>
    </tfoot>
  </table>