<commit_before>{% extends "pretixpresale/event/base.html" %}
{% load i18n %}

{% block content %}
    {% if cart.positions %}
    <div class="panel panel-primary cart">
        <div class="panel-heading">
            <h3 class="panel-title">{% trans "Your cart" %}</h3>
        </div>
        <div class="panel-body">
            {% include "pretixpresale/event/fragment_cart.html" with cart=cart event=request.event editable=True %}
            <div class="row-fluid">
                <div class="col-md-6 col-xs-12">
                    {% if cart.minutes_left > 0 %}
                        <em>{% blocktrans trimmed with minutes=cart.minutes_left %}
                            The items in your cart are reserved for you for {{ minutes }} minutes.
                        {% endblocktrans %}</em>
                    {% else %}
                        <em>{% trans "The items in your cart are no longer reserved for you." %}</em>
                    {% endif %}
                </div>
                <div class="col-md-4 col-md-offset-2 col-xs-12">
                    <a class="btn btn-block btn-primary btn-lg"
                            href="{% url "presale:event.checkout.start" organizer=request.event.organizer.slug event=request.event.slug %}">
                        <i class="fa fa-shopping-cart"></i> {% trans "Proceed with checkout" %}
                    </a>
                </div>
                <div class="clearfix"></div>
            </div>
        </div>
    </div>
    {% endif %}
    {% if not event.presale_is_running %}
        <div class="alert alert-info">
            {% if event.presale_has_ended %}
                {% blocktrans trimmed %}
                    The presale period for this event is over.
                {% endblocktrans %}
            {% elif event.settings.presale_start_show_date %}
                {% blocktrans trimmed with date=event.presale_start|date time=event.presale_start|time %}
                    The presale for this event will start on {{ date }} at {{ time }}.
                {% endblocktrans %}
            {% else %}
                {% blocktrans trimmed %}
                    The presale for this event has not yet started.
                {% endblocktrans %}
            {% endif %}
        </div>
    {% endif %}
    {% if event.presale_is_running or event.settings.show_items_outside_presale_period %}
        <form method="post"
                action="{% url "presale:event.cart.add" organizer=request.event.organizer.slug event=request.event.slug %}?next={{ request.path_info|urlencode }}">
            {% csrf_token %}
            {% for tup in items_by_category %}
                <section>
                    {% if tup.0 %}<h3>{{ tup.0.name }}</h3>{% endif %}
                    {% for item in tup.1 %}
                        {% if item.has_variations %}
                            <div class="item-with-variations">
                                <div class="row-fluid product-row headline">
                                    <div class="col-md-8 col-xs-12">
                                        <a href="javascript:void();" data-toggle="variations">
                                            <strong>{{ item.name }}</strong>
                                        </a>
                                        {% if item.short_description %}<p>{{ item.short_description }}</p>{% endif %}
                                    </div>
                                    <div class="col-md-2 col-xs-6 price">
                                        {% blocktrans trimmed with minprice=item.min_price|floatformat:2 currency=event.currency %}
                                            from {{ currency }} {{ minprice }}
                                        {% endblocktrans %}
                                    </div>
                                    <div class="col-md-2 col-xs-6 availability-box">
                                        <a href="javascript:void();" data-toggle="variations" class="js-only">
                                            {% trans "Show variants" %}
                                        </a>
                                    </div>
                                    <div class="clearfix"></div>
                                </div>
                                <div class="variations"><commit_msg>Fix a redirection (closes #61)<commit_after>{% extends "pretixpresale/event/base.html" %}
{% load i18n %}

{% block content %}
    {% if cart.positions %}
    <div class="panel panel-primary cart">
        <div class="panel-heading">
            <h3 class="panel-title">{% trans "Your cart" %}</h3>
        </div>
        <div class="panel-body">
            {% include "pretixpresale/event/fragment_cart.html" with cart=cart event=request.event editable=True %}
            <div class="row-fluid">
                <div class="col-md-6 col-xs-12">
                    {% if cart.minutes_left > 0 %}
                        <em>{% blocktrans trimmed with minutes=cart.minutes_left %}
                            The items in your cart are reserved for you for {{ minutes }} minutes.
                        {% endblocktrans %}</em>
                    {% else %}
                        <em>{% trans "The items in your cart are no longer reserved for you." %}</em>
                    {% endif %}
                </div>
                <div class="col-md-4 col-md-offset-2 col-xs-12">
                    <a class="btn btn-block btn-primary btn-lg"
                            href="{% url "presale:event.checkout.start" organizer=request.event.organizer.slug event=request.event.slug %}">
                        <i class="fa fa-shopping-cart"></i> {% trans "Proceed with checkout" %}
                    </a>
                </div>
                <div class="clearfix"></div>
            </div>
        </div>
    </div>
    {% endif %}
    {% if not event.presale_is_running %}
        <div class="alert alert-info">
            {% if event.presale_has_ended %}
                {% blocktrans trimmed %}
                    The presale period for this event is over.
                {% endblocktrans %}
            {% elif event.settings.presale_start_show_date %}
                {% blocktrans trimmed with date=event.presale_start|date time=event.presale_start|time %}
                    The presale for this event will start on {{ date }} at {{ time }}.
                {% endblocktrans %}
            {% else %}
                {% blocktrans trimmed %}
                    The presale for this event has not yet started.
                {% endblocktrans %}
            {% endif %}
        </div>
    {% endif %}
    {% if event.presale_is_running or event.settings.show_items_outside_presale_period %}
        <form method="post"
                action="{% url "presale:event.cart.add" organizer=request.event.organizer.slug event=request.event.slug %}?next={{ request.path|urlencode }}">
            {% csrf_token %}
            {% for tup in items_by_category %}
                <section>
                    {% if tup.0 %}<h3>{{ tup.0.name }}</h3>{% endif %}
                    {% for item in tup.1 %}
                        {% if item.has_variations %}
                            <div class="item-with-variations">
                                <div class="row-fluid product-row headline">
                                    <div class="col-md-8 col-xs-12">
                                        <a href="javascript:void();" data-toggle="variations">
                                            <strong>{{ item.name }}</strong>
                                        </a>
                                        {% if item.short_description %}<p>{{ item.short_description }}</p>{% endif %}
                                    </div>
                                    <div class="col-md-2 col-xs-6 price">
                                        {% blocktrans trimmed with minprice=item.min_price|floatformat:2 currency=event.currency %}
                                            from {{ currency }} {{ minprice }}
                                        {% endblocktrans %}
                                    </div>
                                    <div class="col-md-2 col-xs-6 availability-box">
                                        <a href="javascript:void();" data-toggle="variations" class="js-only">
                                            {% trans "Show variants" %}
                                        </a>
                                    </div>
                                    <div class="clearfix"></div>
                                </div>
                                <div class="variations">
{'fraction_non_alphanumeric': 0.12376465180418295, 'fraction_numerical': 0.0059756377844173755, 'mean_word_length': 1.1611621554507077, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 105, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 58, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6612465', 'n_tokens_mistral': 2306, 'n_tokens_neox': 2035, 'n_words': 489}