<commit_before>{% extends "checkout/layout.html" %}
{% load currency_filters %}
{% load thumbnail %}
{% load i18n %}
{% load purchase_info_tags %}
{% load staticfiles %}

{% block title %}
    {% trans "Checkout" %} | {{ block.super }}
{% endblock %}

{% block checkout_nav %}
    {% include 'checkout/nav.html' %}
{% endblock %}

{% block content %}

    {% if error %}
        <div class="alert alert-error">
            {{ error }}
        </div>
    {% endif %}

    <div class="row-fluid shipping-payment">
        {% block shipping_address %}
            <div class="span6">
                <div class="sub-header">
                    <h2>{% trans "Shipping" %}</h2>
                </div>
                {% if shipping_address %}
                    <div class="well well-info">
                        <h4>{% trans "Address" %}</h4>
                        <address>
                            {% for field in shipping_address.active_address_fields %}
                                {{ field }}<br/>
                            {% endfor %}
                        </address>

                        {% if shipping_address.phone_number %}
                            <h4>{% trans "Contact" %}</h4>
                            <p>
                                {% trans "Phone" %}: {{ shipping_address.phone_number }}
                                {% if guest_email %}
                                    <br/>{% trans "Email" %}: {{ guest_email }}
                                {% endif %}
                            </p>
                        {% endif %}

                        {% if shipping_address.notes %}
                            <h4>{% trans "Instructions" %}</h4>
                            <p>{{ shipping_address.notes|linebreaks }}</p>
                        {% endif %}

                        {% block shipping_address_actions %}
                            <div class="alert-actions">
                                <a href="{% url 'checkout:shipping-address' %}" class="btn">{% trans "Change shipping address" %}</a>
                            </div>
                        {% endblock %}
                    </div>
                {% endif %}

                {% if shipping_method %}
                    <div class="well well-info">
                        <h4>{% trans "Shipping method" %}</h4>
                        <p>{{ shipping_method.name }}
                            {% if shipping_method.description %}
                                - {{ shipping_method.description|safe }}
                            {% endif %}
                        </p>

                        {% block shipping_method_actions %}
                            <div class="alert-actions">
                                <a href="{% url 'checkout:shipping-method' %}" class="btn">{% trans "Change shipping method" %}</a>
                            </div>
                        {% endblock %}
                    </div>
                {% endif %}
            </div>
        {% endblock shipping_address %}

        {# You will almost certainly want to override this block to provide a payment summary #}
        {% block payment_method %}
            <div class="span6">
                <div class="sub-header">
                    <h2>{% trans "Payment" %}</h2>
                </div>
                <div class="well well-success">
                    <h4>{% trans "Payment" %}</h4>
                    <p>{% trans "Payment details to go here" %}</p>
                    <div class="alert-actions">
                        <a href="{% url 'checkout:payment-details' %}" class="btn">{% trans "Change payment details" %}</a>
                    </div>
                </div>
            </div>
        {% endblock payment_method %}
    </div>

    {% block order_contents %}
        <div class="sub-header">
            <h2>{% trans "Order contents" %}</h2>
        </div>
        <div class="basket-title">
            <div class="row-fluid">
                <h4 class="span9">{% trans "Product" %}</h4>
                <h4 class="span1 align-center">{% trans "Quantity" %}</h4>
                <h4 class="span2 align-right">{% trans "Price" %}</h4>
            </div>
        </div>
        {% for line in basket.all_lines %}
            {% purchase_info_for_line request line as session %}
            <div class="basket-items">
                <div class="row-fluid">
                    <div class="span2">
                        <div class="image_container">
                            {% with image=line.product.primary_image %}
                                {% thumbnail image.original "100x100" upscale=False as thumb %}
                                <a href="{{ form.instance.product.get_absolute_url }}"><img class="thumbnail" src="{{ thumb.url }}" alt="{{ product.get_title }}"></a>
                                {% endthumbnail %}
                            {% endwith %}
                        </div>
                    </div>
                    <div class="span7">
                        <h4><a href="{{ line.product.get_absolute_url }}">{{ line.description }}</a></h4>
                        <span class="availability {{ session.availability.code }}">{{ session.availability.message }}</span>
                    </div>
                    <div class="span1 align-center">
                        {{ line.quantity }}
                    </div>
                    <div class="span2 align-right">
                        <p class="price_color">
                            {% if not show_tax_separately and line.is_tax_known %}
                                {{ line.line_price_incl_tax|currency:basket.currency }}
                            {% else %}
                                {{ line.line_price_excl_tax|currency:basket.currency }}
                            {% endif %}
                        </p>
                    </div>
                </div>
            </div>
        {% endfor %}

        <div class="row-fluid">
            <div class="span6">&nbsp;</div>
            <div class="span6">
                {% include 'basket/partials/basket_totals.html' %}
            </div>
        </div>

        {% block order_contents_actions %}
            <div class="form-actions">
                <a href="{% url 'basket:summary' %}" class="btn">{% trans "Edit order contents" %}</a>
            </div>
        {% endblock %}

    {% endblock order_contents %}

    {% block shipping_method %}
    {% endblock shipping_method %}

    {% block payment_details %}
    {% endblock payment_details %}

    {% block place_order %}
    {% endblock place_order %}

{% endblock content %}
<commit_msg>De-emphasize editing address etc. on order preview page<commit_after>{% extends "checkout/layout.html" %}
{% load currency_filters %}
{% load thumbnail %}
{% load i18n %}
{% load purchase_info_tags %}
{% load staticfiles %}

{% block title %}
    {% trans "Checkout" %} | {{ block.super }}
{% endblock %}

{% block checkout_nav %}
    {% include 'checkout/nav.html' %}
{% endblock %}

{% block content %}

    {% if error %}
        <div class="alert alert-error">
            {{ error }}
        </div>
    {% endif %}

    <div class="row-fluid shipping-payment">
        {% block shipping_address %}
            <div class="span6">
                <div class="sub-header">
                    <h2>{% trans "Shipping" %}</h2>
                </div>
                {% if shipping_address %}
                    <div class="well well-info">
                        {% block shipping_address_actions %}
                            <a href="{% url 'checkout:shipping-address' %}" class="pull-right">
                                {% trans "Change" %}
                            </a>
                        {% endblock %}
                        <h4>{% trans "Address" %}</h4>
                        <address>
                            {% for field in shipping_address.active_address_fields %}
                                {{ field }}<br/>
                            {% endfor %}
                        </address>

                        {% if shipping_address.phone_number %}
                            <h4>{% trans "Contact" %}</h4>
                            <p>
                                {% trans "Phone" %}: {{ shipping_address.phone_number }}
                                {% if guest_email %}
                                    <br/>{% trans "Email" %}: {{ guest_email }}
                                {% endif %}
                            </p>
                        {% endif %}

                        {% if shipping_address.notes %}
                            <h4>{% trans "Instructions" %}</h4>
                            <p>{{ shipping_address.notes|linebreaks }}</p>
                        {% endif %}
                    </div>
                {% endif %}

                {% if shipping_method %}
                    <div class="well well-info">
                        {% block shipping_method_actions %}
                            <a href="{% url 'checkout:shipping-method' %}" class="pull-right">
                                {% trans "Change" %}
                            </a>
                        {% endblock %}
                        <h4>{% trans "Shipping method" %}</h4>
                        <p>{{ shipping_method.name }}
                            {% if shipping_method.description %}
                                - {{ shipping_method.description|safe }}
                            {% endif %}
                        </p>

                    </div>
                {% endif %}
            </div>
        {% endblock shipping_address %}

        {# You will almost certainly want to override this block to provide a payment summary #}
        {% block payment_method %}
            <div class="span6">
                <div class="sub-header">
                    <h2>{% trans "Payment" %}</h2>
                </div>
                <div class="well well-success">
                    <a href="{% url 'checkout:payment-details' %}" class="pull-right">
                        {% trans "Change" %}
                    </a>
                    <h4>{% trans "Payment" %}</h4>
                    <p>{% trans "Payment details to go here" %}</p>
                </div>
            </div>
        {% endblock payment_method %}
    </div>

    {% block order_contents %}
        <div class="sub-header">
            {% block order_contents_actions %}
                <a href="{% url 'basket:summary' %}" class="pull-right">
                    {% trans "Edit order contents" %}
                </a>
            {% endblock %}

            <h2>{% trans "Order contents" %}</h2>
        </div>
        <div class="basket-title">
            <div class="row-fluid">
                <h4 class="span9">{% trans "Product" %}</h4>
                <h4 class="span1 align-center">{% trans "Quantity" %}</h4>
                <h4 class="span2 align-right">{% trans "Price" %}</h4>
            </div>
        </div>
        {% for line in basket.all_lines %}
            {% purchase_info_for_line request line as session %}
            <div class="basket-items">
                <div class="row-fluid">
                    <div class="span2">
                        <div class="image_container">
                            {% with image=line.product.primary_image %}
                                {% thumbnail image.original "100x100" upscale=False as thumb %}
                                <a href="{{ form.instance.product.get_absolute_url }}"><img class="thumbnail" src="{{ thumb.url }}" alt="{{ product.get_title }}"></a>
                                {% endthumbnail %}
                            {% endwith %}
                        </div>
                    </div>
                    <div class="span7">
                        <h4><a href="{{ line.product.get_absolute_url }}">{{ line.description }}</a></h4>
                        <span class="availability {{ session.availability.code }}">{{ session.availability.message }}</span>
                    </div>
                    <div class="span1 align-center">
                        {{ line.quantity }}
                    </div>
                    <div class="span2 align-right">
                        <p class="price_color">
                            {% if not show_tax_separately and line.is_tax_known %}
                                {{ line.line_price_incl_tax|currency:basket.currency }}
                            {% else %}
                                {{ line.line_price_excl_tax|currency:basket.currency }}
                            {% endif %}
                        </p>
                    </div>
                </div>
            </div>
        {% endfor %}

        <div class="row-fluid">
            <div class="span6">&nbsp;</div>
            <div class="span6">
                {% include 'basket/partials/basket_totals.html' %}
            </div>
        </div>

    {% endblock order_contents %}

    {% block shipping_method %}
    {% endblock shipping_method %}

    {% block payment_details %}
    {% endblock payment_details %}

    {% block place_order %}
    {% endblock place_order %}

{% endblock content %}

{'fraction_non_alphanumeric': 0.13851376838928706, 'fraction_numerical': 0.006488117691437194, 'mean_word_length': 1.1233381387153611, 'pattern_counts': {'":': 0, '<': 205, '<?xml version=': 0, '>': 205, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 28, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7310780', 'n_tokens_mistral': 3638, 'n_tokens_neox': 3154, 'n_words': 709}