<commit_before>{% extends 'oscar/dashboard/reports/index.html' %}
{% load currency_filters %}
{% load i18n %}

{% block report %}
    <table class="table table-striped table-bordered table-hover">
        {% if objects %}
            <tr>
                <th>{% trans "Order number" %}</th>
                <th>{% trans "Name" %}</th>
                <th>{% trans "Email" %}</th>
                <th>{% trans "Total incl. tax" %}</th>
                <th>{% trans "Date placed" %}</th>
                <th></th>
            </tr>
            {% for order in objects %}
                <tr>
                    <td><a href="{% url 'dashboard:order-detail' order.number %}">{{ order.number }}</a></td>
                    <td>
                        {% if order.user %}
                            <a href="{% url 'dashboard:user-detail' order.user.id %}">{{ order.user|default:"-" }}</a>
                        {% else %}
                            -
                        {% endif %}
                    </td>
                    <td>{{ order.email }}</td>
                    <td>{{ order.total_incl_tax|currency:order.currency }}</td>
                    <td>{{ order.date_placed }}</td>
                    <td>
                        <a class="btn btn-secondary" href="{% url 'dashboard:order-detail' number=order.number %}">{% trans "View" %}</a>
                    </td>
                </tr>
            {% endfor %}
        {% else %}
            <tr><td>{% trans "No results found." %}</td></tr>
        {% endif %}
    </table>
    {% include "oscar/dashboard/partials/pagination.html" %}
{% endblock %}<commit_msg>Fix display of user in orders placed report, to show name instead of email (#3851)<commit_after>{% extends 'oscar/dashboard/reports/index.html' %}
{% load currency_filters %}
{% load i18n %}

{% block report %}
    <table class="table table-striped table-bordered table-hover">
        {% if objects %}
            <tr>
                <th>{% trans "Order number" %}</th>
                <th>{% trans "Name" %}</th>
                <th>{% trans "Email" %}</th>
                <th>{% trans "Total incl. tax" %}</th>
                <th>{% trans "Date placed" %}</th>
                <th></th>
            </tr>
            {% for order in objects %}
                <tr>
                    <td><a href="{% url 'dashboard:order-detail' order.number %}">{{ order.number }}</a></td>
                    <td>
                        {% if order.user %}
                            <a href="{% url 'dashboard:user-detail' order.user.id %}">{{ order.user.get_full_name|default:"-" }}</a>
                        {% else %}
                            -
                        {% endif %}
                    </td>
                    <td>{{ order.email }}</td>
                    <td>{{ order.total_incl_tax|currency:order.currency }}</td>
                    <td>{{ order.date_placed }}</td>
                    <td>
                        <a class="btn btn-secondary" href="{% url 'dashboard:order-detail' number=order.number %}">{% trans "View" %}</a>
                    </td>
                </tr>
            {% endfor %}
        {% else %}
            <tr><td>{% trans "No results found." %}</td></tr>
        {% endif %}
    </table>
    {% include "oscar/dashboard/partials/pagination.html" %}
{% endblock %}
{'fraction_non_alphanumeric': 0.17956378846728413, 'fraction_numerical': 0.0023902001792650133, 'mean_word_length': 1.2994505494505495, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 83, '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': '4671360', 'n_tokens_mistral': 1030, 'n_tokens_neox': 911, 'n_words': 220}