<commit_before>{#

This file is part of the Sonata package.

(c) <NAME> <<EMAIL>>

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.

#}

{% extends "SonataUserBundle:Profile:action.html.twig" %}


{% block sonata_profile_title %}{% trans from 'SonataOrderBundle' %}order_list{% endtrans %}{% endblock %}

{% block sonata_profile_content %}

    {% if orders|length > 0 %}

        <table class="table table-bordered">
            <tr>
                <th>{% trans from 'SonataOrderBundle' %}sonata.order.view.reference{% endtrans %}</th>
                <th>{% trans from 'SonataOrderBundle' %}sonata.order.view.date{% endtrans %}</th>
                <th>{% trans from 'SonataOrderBundle' %}sonata.order.view.status{% endtrans %}</th>
                <th>{% trans from 'SonataOrderBundle' %}sonata.order.view.total_inc{% endtrans %}</th>
            </tr>

            {% for order in orders %}
                <tr>
                    <td><a href="{{ url('sonata_order_view', {'reference' : order.reference}) }}">{{ order.reference }}</a></td>
                    <td>{{ order.createdAt|date('Y-m-d H:i:s') }}</td>
                    <td>{{ order.statusName|trans({}, 'SonataOrderBundle') }}</td>
                    <td class="number">{{ order.totalInc|number_format_currency(order.currency.label) }}</td>
                </tr>
            {% endfor %}

        </table>
    {% else %}
        <p>{% trans from 'SonataOrderBundle' %}sonata.order.list.no_orders{% endtrans %}</p>
    {% endif %}
{% endblock %}<commit_msg>SONATA-191 - Added colored statuses to Order list<commit_after>{#

This file is part of the Sonata package.

(c) <NAME> <<EMAIL>>

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.

#}

{% extends "SonataUserBundle:Profile:action.html.twig" %}


{% block sonata_profile_title %}{% trans from 'SonataOrderBundle' %}order_list{% endtrans %}{% endblock %}

{% block sonata_profile_content %}

    {% if orders|length > 0 %}

        <table class="table table-bordered">
            <tr>
                <th>{% trans from 'SonataOrderBundle' %}sonata.order.view.reference{% endtrans %}</th>
                <th>{% trans from 'SonataOrderBundle' %}sonata.order.view.date{% endtrans %}</th>
                <th>{% trans from 'SonataOrderBundle' %}sonata.order.view.status{% endtrans %}</th>
                <th>{% trans from 'SonataOrderBundle' %}sonata.order.view.total_inc{% endtrans %}</th>
            </tr>

            {% for order in orders %}
                <tr>
                    <td><a href="{{ url('sonata_order_view', {'reference' : order.reference}) }}">{{ order.reference }}</a></td>
                    <td>{{ order.createdAt|date('Y-m-d H:i:s') }}</td>
                    <td><span class="label{{ order|status_class(null, 'important') ? ' label-'~order|status_class(null, 'important') : '' }}">{{ order.statusName|trans([], 'SonataOrderBundle') }}</span></td>
                    <td class="number">{{ order.totalInc|number_format_currency(order.currency.label) }}</td>
                </tr>
            {% endfor %}

        </table>
    {% else %}
        <p>{% trans from 'SonataOrderBundle' %}sonata.order.list.no_orders{% endtrans %}</p>
    {% endif %}
{% endblock %}
{'fraction_non_alphanumeric': 0.17287630402384502, 'fraction_numerical': 0.0014903129657228018, 'mean_word_length': 2.6163793103448274, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 65, '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': '3107279', 'n_tokens_mistral': 1116, 'n_tokens_neox': 996, 'n_words': 243}