<commit_before>{% extends "template.twig" %}
{% block title %}Promotions // {{ event.full_name }}{% endblock %}
{% block section %}event{% endblock %}
{% block subnav %}{% include "event/subnav.twig" %}{% endblock %}
{% block content %}
    <header>
        <h2>Promotions</h2>
        <p>You can use promotions to incentivize registrations and to provide scholarship tickets.</p>
        <p>You can also create promotion codes for different teachers/groups to track who's
           actually promoted CodeDay.</p>
    </header>

    {% if event.promotions.count > 0 %}
        <table class="all promotions">
            <thead>
                <tr>
                    <th>&nbsp;</th>
                    <th>Discount</th>
                    <th>Uses</th>
                    <th>Expires</th>
                    <th>Type</th>
                    <th>Creator</th>
                    <th>Notes</th>
                    <th>Flyers</th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                {% for promotion in event.promotions %}
                    {% if promotion.percent_discount != 100 or promotion.allowed_uses != 1 or promotion.expires_at != null %}
                        <tr class="promo">
                            <td class="code"><input type="text" value="{{ promotion.code }}" readonly /></td>
                            <td>{% if promotion.percent_discount %}{{ promotion.percent_discount }}%{% else %}${{ promotion.force_price }}{% endif %}</td>
                            <td>
                                <a href="/event/{{ event.id }}/promotions/uses?code={{ promotion.id }}">
                                    {{ promotion.registrations.count }}{#
                                    #}{% if promotion.allowed_uses %}/{{ promotion.allowed_uses }}{% endif %}
                                </a>
                            </td>
                            <td>
                                {% if promotion.expires_at %}
                                    {{ promotion.expires_at.timestamp|date('F j') }}
                                {% endif %}
                            </td>
                            <td>{{ promotion.type }}</td>
                            <td>
                              <a href="https://s5.studentrnd.org/user/{{ promotion.created_by_user }}">{{ promotion.created_by_user }}</a>
                            </td>
                            <td class="notes">
                                {{ promotion.notes }}
                            </td>
                            <td>
                                <a href="/e/flyer/{{ event.id }}/poster?code={{ promotion.code }}" target="_blank">Poster</a>,
                                <a href="/e/flyer/{{ event.id }}/handout?code={{ promotion.code }}" target="_blank">handout</a>
                            </td><commit_msg>Update flyer link on Clear<commit_after>{% extends "template.twig" %}
{% block title %}Promotions // {{ event.full_name }}{% endblock %}
{% block section %}event{% endblock %}
{% block subnav %}{% include "event/subnav.twig" %}{% endblock %}
{% block content %}
    <header>
        <h2>Promotions</h2>
        <p>You can use promotions to incentivize registrations and to provide scholarship tickets.</p>
        <p>You can also create promotion codes for different teachers/groups to track who's
           actually promoted CodeDay.</p>
    </header>

    {% if event.promotions.count > 0 %}
        <table class="all promotions">
            <thead>
                <tr>
                    <th>&nbsp;</th>
                    <th>Discount</th>
                    <th>Uses</th>
                    <th>Expires</th>
                    <th>Type</th>
                    <th>Creator</th>
                    <th>Notes</th>
                    <th>Flyers</th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                {% for promotion in event.promotions %}
                    {% if promotion.percent_discount != 100 or promotion.allowed_uses != 1 or promotion.expires_at != null %}
                        <tr class="promo">
                            <td class="code"><input type="text" value="{{ promotion.code }}" readonly /></td>
                            <td>{% if promotion.percent_discount %}{{ promotion.percent_discount }}%{% else %}${{ promotion.force_price }}{% endif %}</td>
                            <td>
                                <a href="/event/{{ event.id }}/promotions/uses?code={{ promotion.id }}">
                                    {{ promotion.registrations.count }}{#
                                    #}{% if promotion.allowed_uses %}/{{ promotion.allowed_uses }}{% endif %}
                                </a>
                            </td>
                            <td>
                                {% if promotion.expires_at %}
                                    {{ promotion.expires_at.timestamp|date('F j') }}
                                {% endif %}
                            </td>
                            <td>{{ promotion.type }}</td>
                            <td>
                              <a href="https://s5.studentrnd.org/user/{{ promotion.created_by_user }}">{{ promotion.created_by_user }}</a>
                            </td>
                            <td class="notes">
                                {{ promotion.notes }}
                            </td>
                            <td>
                                <a href="https://posters.codeday.org/" target="_blank">Flyers</a>
                            </td>
{'fraction_non_alphanumeric': 0.13987990109501944, 'fraction_numerical': 0.00282585658777817, 'mean_word_length': 1.1083395383469843, 'pattern_counts': {'":': 0, '<': 117, '<?xml version=': 0, '>': 119, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 21, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '122776', 'n_tokens_mistral': 1516, 'n_tokens_neox': 1376, 'n_words': 288}