<commit_before>{% extends 'layouts/shop_order_admin.html' %}
{% from 'macros/admin.html' import render_extra_in_heading %}
{% from 'macros/datetime.html' import render_datetime %}
{% from 'macros/icons.html' import render_icon %}
{% from 'macros/misc.html' import render_tag %}
{% from 'macros/pagination.html' import render_pagination_nav %}
{% from 'macros/shop_order_admin.html' import render_order_link, render_order_payment_method, render_order_payment_state %}
{% from 'macros/user_admin.html' import render_user_avatar_16_and_link %}
{% set current_page_party = party %}
{% set title = 'Bestellungen' %}

{% block body %}

  <nav class="breadcrumbs">
    <ol>
      <li>{{ party.title }}</li>
      <li>Shop</li>
    </ol>
  </nav>
  <h1>{{ title }} {{ render_extra_in_heading(orders.total) }}</h1>

  <table class="index" style="margin-bottom: 20px;">
    <tr>
      <th>Bestellnummer-Präfix</th>
      <td>{{ order_number_prefix|fallback('nicht festgelegt') }}</td>
    </tr>
  </table>

  <div class="row filters">
    <div class="column-auto">
      {# intentionally left blank #}
    </div>
    <div class="column-auto">

      <div class="filter">
        <span>{{ render_icon('filter') }} Einschränkung:</span>
        <ol>
        {%- for payment_state in PaymentState %}
          {%- if only == payment_state %}
          <li>{{ render_order_payment_state(payment_state) }}</li>
          {%- else %}
          <li><a href="{{ url_for('.index_for_party', party_id=party.id, only=payment_state.name) }}">{{ render_order_payment_state(payment_state) }}</a></li>
          {%- endif %}
        {%- endfor %}
        {%- if only is none %}
          <li><strong>{{ render_tag('alle') }}</strong></li>
        {%- else %}
          <li><a href="{{ url_for('.index_for_party', party_id=party.id) }}">{{ render_tag('alle') }}</a></li>
        {%- endif %}
        </ol>
      </div>

    </div>
  </div>

  <table class="index wide">
    <thead>
      <tr>
        <th>Bestellnummer</th>
        <th>Status</th>
        <th>Besteller</th>
        <th>Zeitpunkt</th>
        <th>Betrag</th>
      </tr>
    </thead>
    <tbody>
      {%- for order in orders.items %}
      <tr>
        <td class="nowrap">{{ render_order_link(order) }}</td>
        <td>
          {{ render_order_payment_state(order.payment_state) }}<br>
          {{ render_order_payment_method(order.payment_method)|dim }}
        </td>
        <td>
          {{- render_user_avatar_16_and_link(order.placed_by) -}}<br>
          {{- order.first_names }} {{ order.last_name -}}
        </td>
        <td>{{ render_datetime(order.created_at) }}</td>
        <td class="number">{{ order.calculate_total_price()|format_euro_amount }}</td>
      </tr>
      {%- endfor %}
      <tr>
    </tbody>
  </table>

{{ render_pagination_nav(orders, '.index_for_party', {'party_id': party.id, 'only': only.name if only else None}) }}

{%- endblock %}<commit_msg>Rearrange fields in order list<commit_after>{% extends 'layouts/shop_order_admin.html' %}
{% from 'macros/admin.html' import render_extra_in_heading %}
{% from 'macros/datetime.html' import render_datetime %}
{% from 'macros/icons.html' import render_icon %}
{% from 'macros/misc.html' import render_tag %}
{% from 'macros/pagination.html' import render_pagination_nav %}
{% from 'macros/shop_order_admin.html' import render_order_link, render_order_payment_method, render_order_payment_state %}
{% from 'macros/user_admin.html' import render_user_avatar_16_and_link %}
{% set current_page_party = party %}
{% set title = 'Bestellungen' %}

{% block body %}

  <nav class="breadcrumbs">
    <ol>
      <li>{{ party.title }}</li>
      <li>Shop</li>
    </ol>
  </nav>
  <h1>{{ title }} {{ render_extra_in_heading(orders.total) }}</h1>

  <table class="index" style="margin-bottom: 20px;">
    <tr>
      <th>Bestellnummer-Präfix</th>
      <td>{{ order_number_prefix|fallback('nicht festgelegt') }}</td>
    </tr>
  </table>

  <div class="row filters">
    <div class="column-auto">
      {# intentionally left blank #}
    </div>
    <div class="column-auto">

      <div class="filter">
        <span>{{ render_icon('filter') }} Einschränkung:</span>
        <ol>
        {%- for payment_state in PaymentState %}
          {%- if only == payment_state %}
          <li>{{ render_order_payment_state(payment_state) }}</li>
          {%- else %}
          <li><a href="{{ url_for('.index_for_party', party_id=party.id, only=payment_state.name) }}">{{ render_order_payment_state(payment_state) }}</a></li>
          {%- endif %}
        {%- endfor %}
        {%- if only is none %}
          <li><strong>{{ render_tag('alle') }}</strong></li>
        {%- else %}
          <li><a href="{{ url_for('.index_for_party', party_id=party.id) }}">{{ render_tag('alle') }}</a></li>
        {%- endif %}
        </ol>
      </div>

    </div>
  </div>

  <table class="index wide">
    <thead>
      <tr>
        <th>Bestellnummer<br>Zeitpunkt</th>
        <th>Besteller</th>
        <th>Betrag</th>
        <th>Status</th>
      </tr>
    </thead>
    <tbody>
      {%- for order in orders.items %}
      <tr>
        <td>
          <strong>{{- render_order_link(order) -}}</strong><br>
          {{- render_datetime(order.created_at)|dim -}}
        </td>
        <td>
          {{- render_user_avatar_16_and_link(order.placed_by) -}}<br>
          {%- filter dim %}
            {{- order.first_names }} {{ order.last_name -}}
          {%- endfilter %}
        </td>
        <td class="number">{{ order.calculate_total_price()|format_euro_amount }}</td>
        <td>
          {{ render_order_payment_state(order.payment_state) }}<br>
          {{ render_order_payment_method(order.payment_method)|dim }}
        </td>
      </tr>
      {%- endfor %}
      <tr>
    </tbody>
  </table>

{{ render_pagination_nav(orders, '.index_for_party', {'party_id': party.id, 'only': only.name if only else None}) }}

{%- endblock %}
{'fraction_non_alphanumeric': 0.18633226729506816, 'fraction_numerical': 0.0026931493014644, 'mean_word_length': 2.787125557680051, 'pattern_counts': {'":': 0, '<': 157, '<?xml version=': 0, '>': 157, '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': '1119819', 'n_tokens_mistral': 2159, 'n_tokens_neox': 2019, 'n_words': 361}