<commit_before>{% extends 'layout/base.html' %}
{% from 'macros/datetime.html' import render_datetime %}
{% from 'macros/shop/orders.html' import render_order_payment_state %}
{% set current_page = 'shop_orders' %}
{% set title = 'Bestellung ' ~ order.order_number %}
{% block body %}

  <nav class="breadcrumbs">
    <ol>
      <li>Shop</li>
      <li><a href="{{ url_for('.index') }}">Deine Bestellungen</a></li>
    </ol>
  </nav>
  <h1>{{ order.order_number }}</h1>

  <table class="index" style="margin-top: 2rem;">
    <tr>
      <th>Zeitpunkt</th>
      <td>{{ render_datetime(order.created_at) }}</td>
    </tr>
    <tr>
      <th>Bezahlstatus</th>
      <td>{{ render_order_payment_state(order.payment_state) }}</td>
    </tr>
    {%- if order.is_canceled %}
    <tr>
      <th>Begründung für<br>Stornierung</th>
      <td>{{ order.cancelation_reason|fallback }}</td>
    </tr>
    {%- endif %}
  </table>

  <h2>Auftraggeber/in</h2>
  <table class="index">
    <tr>
      <th>Name</th>
      <td>{{ order.first_names }} {{ order.last_name }}</td>
    </tr>
    <tr>
      <th>Anschrift</th>
      <td>{{ order.street }}<br>{{ order.zip_code }} {{ order.city }}<br>{{ order.country }}</td>
    </tr>
  </table>

  <h2>Artikel</h2>
  <table class="index wide">
    <thead>
      <tr>
        <th>Anzahl</th>
        <th>Artikelnr.</th>
        <th>Beschreibung</th>
        <th>Stückpreis</th>
      </tr>
    </thead>
    <tfoot>
      <tr>
        <th colspan="3">Gesamtbetrag</th>
        <td class="number"><strong>{{ order.total_amount|format_euro_amount }}</strong></td>
      </tr>
    </tfoot>
    <tbody>
      {%- for item in order.items|sort(attribute='article_number') %}
      <tr>
        <td class="number">{{ item.quantity }}</td>
        <td class="nowrap">{{ item.article_number }}</td>
        <td><strong>{{ item.description }}</strong></td>
        <td class="number">{{ item.unit_price|format_euro_amount }}</td>
      </tr>
      {%- endfor %}
    </tbody>
  </table>

{%- endblock %}<commit_msg>Right-align unit price in user's order view<commit_after>{% extends 'layout/base.html' %}
{% from 'macros/datetime.html' import render_datetime %}
{% from 'macros/shop/orders.html' import render_order_payment_state %}
{% set current_page = 'shop_orders' %}
{% set title = 'Bestellung ' ~ order.order_number %}
{% block body %}

  <nav class="breadcrumbs">
    <ol>
      <li>Shop</li>
      <li><a href="{{ url_for('.index') }}">Deine Bestellungen</a></li>
    </ol>
  </nav>
  <h1>{{ order.order_number }}</h1>

  <table class="index" style="margin-top: 2rem;">
    <tr>
      <th>Zeitpunkt</th>
      <td>{{ render_datetime(order.created_at) }}</td>
    </tr>
    <tr>
      <th>Bezahlstatus</th>
      <td>{{ render_order_payment_state(order.payment_state) }}</td>
    </tr>
    {%- if order.is_canceled %}
    <tr>
      <th>Begründung für<br>Stornierung</th>
      <td>{{ order.cancelation_reason|fallback }}</td>
    </tr>
    {%- endif %}
  </table>

  <h2>Auftraggeber/in</h2>
  <table class="index">
    <tr>
      <th>Name</th>
      <td>{{ order.first_names }} {{ order.last_name }}</td>
    </tr>
    <tr>
      <th>Anschrift</th>
      <td>{{ order.street }}<br>{{ order.zip_code }} {{ order.city }}<br>{{ order.country }}</td>
    </tr>
  </table>

  <h2>Artikel</h2>
  <table class="index wide">
    <thead>
      <tr>
        <th>Anzahl</th>
        <th>Artikelnr.</th>
        <th>Beschreibung</th>
        <th class="number">Stückpreis</th>
      </tr>
    </thead>
    <tfoot>
      <tr>
        <th colspan="3">Gesamtbetrag</th>
        <td class="number"><strong>{{ order.total_amount|format_euro_amount }}</strong></td>
      </tr>
    </tfoot>
    <tbody>
      {%- for item in order.items|sort(attribute='article_number') %}
      <tr>
        <td class="number">{{ item.quantity }}</td>
        <td class="nowrap">{{ item.article_number }}</td>
        <td><strong>{{ item.description }}</strong></td>
        <td class="number">{{ item.unit_price|format_euro_amount }}</td>
      </tr>
      {%- endfor %}
    </tbody>
  </table>

{%- endblock %}
{'fraction_non_alphanumeric': 0.2139546230787997, 'fraction_numerical': 0.003903391070992925, 'mean_word_length': 2.7374658158614404, 'pattern_counts': {'":': 0, '<': 185, '<?xml version=': 0, '>': 185, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1691921', 'n_tokens_mistral': 1600, 'n_tokens_neox': 1524, 'n_words': 269}