<commit_before>{% load xextends %}

{% xextends "staff/base.html" with secondary_nav="staff_events" %}
{% load plugins %}
{% load staticfiles %}
{% load currency %}

{% block staff_content %}
    <div class="l-container">
        <div class="l-primary-content block-list">
            <div class="block block-list__item">
                <header class="block__header">
                    <h2 class="block__header-text">Tickets</h2>
                </header>

                <table>
                    <thead>
                        <tr>
                            <th>Type</th>
                            <th>Tickets Sold</th>
                            <th>Price</th>
                            <th>Waiting List</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for ticket_type in event.ticket_types.all %}
                            <tr {% if not ticket_type.visible %} class="low-opacity" title="Not available for purchase" {% endif %}>
                                <td>{{ticket_type.name}}</td>
                                <td>
                                    {{ticket_type.sold_tickets.count}}/
                                    {{ticket_type.number}}
                                </td>
                                <td>
                                    {% if ticket_type.price == 0 %}
                                        Free
                                    {% else %}
                                        &pound;{{ticket_type.price|format_currency}}
                                    {% endif %}
                                </td>
                                <td>
                                    {% if not ticket_type.waiting_list_enabled %}
                                        Disabled
                                    {% else %}
                                        {{ticket_type.waiting_list_subscriptions.count}} waiting <a href="{% url "manage_waiting_list" ticket_type.pk %}">(manage)</a>
                                    {% endif %}
                                </td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>

            </div>

            <div class="block block-list__item">
                <header class="block__header">
                    <h2 class="block__header-text">Attendees</h2>
                </header>
                
                <table class="members tickets data-table" id="attendees-list">
                    <thead>
                        <tr>
                            <th></th>
                            <th>Username</th>
                            <th>Name</th>
                            <th></th>
                            <th>Checked In</th>
                            {% plugin_block "staff.event.tickets.headers" event ticket %}
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for ticket in event.tickets.all %}
                            <tr {% if ticket.cancelled %}class="cancelled"{% endif %}>
                                <td>
                                    <a title="{{ticket.user.profile}}" href="{% url "view_profile" ticket.user.pk %}">
                                        <img class="members-list__image" src="{{ticket.user.profile.photo_url}}">
                                    </a>
                                </td>
                                <td>
                                    <a title="{{ticket.user.profile}}" href="{% url "view_profile" ticket.user.pk %}">{{ticket.user}}</a>
                                </td>
                                <td>
                                    {{ticket.user.first_name}} {{ticket.user.last_name}}
                                </td>
                                <td>
                                    {% if ticket.cancelled %}cancelled{% endif %}
                                </td>
                                <td>
                                    {% if ticket.checked_in %}
                                        True<br />
                                        {{ticket.checked_in_datetime}}
                                    {% else %}
                                        False
                                    {% endif %}
                                </td>
                                {% plugin_block "staff.event.tickets.info" event ticket %}
                                <td>
                                    <ul class="button-list">
                                        {% if not ticket.cancelled %}
                                            {% if event.is_future %}
                                                <li><a href="{% url "cancel_ticket" ticket.id %}?next={% url "staff_event" event.id %}" class="btn">Cancel</a></li>
                                            {% endif %}
                                            {% if ticket.checked_in %}
                                                <li><a href="{% url "cancel_check_in" ticket.id %}?next={% url "staff_event" event.id %}" class="btn">Cancel Check In</a></li>
                                            {% else %}
                                                <li><a href="{% url "check_in" ticket.id %}?next={% url "staff_event" event.id %}" class="btn">Check In</a></li>
                                            {% endif %}
                                        {% endif %}
                                        {% plugin_block "staff.event.tickets.options" event ticket %}
                                    </ul>
                                </td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
                
                <a class="btn" href="{% url "add_attendee" event.pk %}">Add Attendee</a>
            </div>

            {% plugin_block "staff.event" event %}
        </div>
        <div class="l-secondary-content block-list">
            
            {% include "staff/_tickets_filter_block.html" %}

            <div class="block block-list__item">
                <header class="block__header">
                    <h2 class="block__header-text block__header-text--small">{{event}}</h2>
                </header>

                <ul class="button-list">
                    <li><a class="btn" href="{% url "view_event" event.pk %}">View Event</a></li>
                    <li><a class="btn" href="{% url "edit_event" event.pk %}">Edit</a></li>
                    <li><a class="btn" href="{% url "email_event" event.pk %}">Send Email</a></li>
                    <li><a class="btn" href="{% url "manage_check_ins" event.pk %}">Manage Check Ins</a></li>
                    {% plugin_block "staff.event.buttons" event %}
                </ul>
            </div>
        </div>
    </div>
{% endblock %}<commit_msg>Add ticket type to staff page<commit_after>{% load xextends %}

{% xextends "staff/base.html" with secondary_nav="staff_events" %}
{% load plugins %}
{% load staticfiles %}
{% load currency %}

{% block staff_content %}
    <div class="l-container">
        <div class="l-primary-content block-list">
            <div class="block block-list__item">
                <header class="block__header">
                    <h2 class="block__header-text">Tickets</h2>
                </header>

                <table>
                    <thead>
                        <tr>
                            <th>Type</th>
                            <th>Tickets Sold</th>
                            <th>Price</th>
                            <th>Waiting List</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for ticket_type in event.ticket_types.all %}
                            <tr {% if not ticket_type.visible %} class="low-opacity" title="Not available for purchase" {% endif %}>
                                <td>{{ticket_type.name}}</td>
                                <td>
                                    {{ticket_type.sold_tickets.count}}/
                                    {{ticket_type.number}}
                                </td>
                                <td>
                                    {% if ticket_type.price == 0 %}
                                        Free
                                    {% else %}
                                        &pound;{{ticket_type.price|format_currency}}
                                    {% endif %}
                                </td>
                                <td>
                                    {% if not ticket_type.waiting_list_enabled %}
                                        Disabled
                                    {% else %}
                                        {{ticket_type.waiting_list_subscriptions.count}} waiting <a href="{% url "manage_waiting_list" ticket_type.pk %}">(manage)</a>
                                    {% endif %}
                                </td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>

            </div>

            <div class="block block-list__item">
                <header class="block__header">
                    <h2 class="block__header-text">Attendees</h2>
                </header>
                
                <table class="members tickets data-table" id="attendees-list">
                    <thead>
                        <tr>
                            <th></th>
                            <th>Name</th>
                            <th>Ticket Type</th>
                            <th></th>
                            <th>Checked In</th>
                            {% plugin_block "staff.event.tickets.headers" event ticket %}
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for ticket in event.tickets.all %}
                            <tr {% if ticket.cancelled %}class="cancelled"{% endif %}>
                                <td>
                                    <a title="{{ticket.user.profile}}" href="{% url "view_profile" ticket.user.pk %}">
                                        <img class="members-list__image" src="{{ticket.user.profile.photo_url}}">
                                    </a>
                                </td>
                                <td>
                                    <a title="{{ticket.user.profile}}" href="{% url "view_profile" ticket.user.pk %}">{{ticket.user}}</a><br />
                                    {{ticket.user.first_name}} {{ticket.user.last_name}}
                                </td>
                                <td>
                                    {{ticket.type.name}}
                                </td>
                                <td>
                                    {% if ticket.cancelled %}cancelled{% endif %}
                                </td>
                                <td>
                                    {% if ticket.checked_in %}
                                        True<br />
                                        {{ticket.checked_in_datetime}}
                                    {% else %}
                                        False
                                    {% endif %}
                                </td>
                                {% plugin_block "staff.event.tickets.info" event ticket %}
                                <td>
                                    <ul class="button-list">
                                        {% if not ticket.cancelled %}
                                            {% if event.is_future %}
                                                <li><a href="{% url "cancel_ticket" ticket.id %}?next={% url "staff_event" event.id %}" class="btn">Cancel</a></li>
                                            {% endif %}
                                            {% if ticket.checked_in %}
                                                <li><a href="{% url "cancel_check_in" ticket.id %}?next={% url "staff_event" event.id %}" class="btn">Cancel Check In</a></li>
                                            {% else %}
                                                <li><a href="{% url "check_in" ticket.id %}?next={% url "staff_event" event.id %}" class="btn">Check In</a></li>
                                            {% endif %}
                                        {% endif %}
                                        {% plugin_block "staff.event.tickets.options" event ticket %}
                                    </ul>
                                </td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
                
                <a class="btn" href="{% url "add_attendee" event.pk %}">Add Attendee</a>
            </div>

            {% plugin_block "staff.event" event %}
        </div>
        <div class="l-secondary-content block-list">
            
            {% include "staff/_tickets_filter_block.html" %}

            <div class="block block-list__item">
                <header class="block__header">
                    <h2 class="block__header-text block__header-text--small">{{event}}</h2>
                </header>

                <ul class="button-list">
                    <li><a class="btn" href="{% url "view_event" event.pk %}">View Event</a></li>
                    <li><a class="btn" href="{% url "edit_event" event.pk %}">Edit</a></li>
                    <li><a class="btn" href="{% url "email_event" event.pk %}">Send Email</a></li>
                    <li><a class="btn" href="{% url "manage_check_ins" event.pk %}">Manage Check Ins</a></li>
                    {% plugin_block "staff.event.buttons" event %}
                </ul>
            </div>
        </div>
    </div>
{% endblock %}
{'fraction_non_alphanumeric': 0.12142857142857143, 'fraction_numerical': 0.0009900990099009901, 'mean_word_length': 0.7796375534860307, 'pattern_counts': {'":': 0, '<': 256, '<?xml version=': 0, '>': 256, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 101, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '744258', 'n_tokens_mistral': 3458, 'n_tokens_neox': 3023, 'n_words': 601}