{% extends "sentry/groups/details.html" %}

{% load i18n %}
{% load sentry_activity %}
{% load sentry_helpers %}
{% load sentry_plugins %}

{% block title %}{{ event.error }} | {{ block.super }}{% endblock %}

{% block page_header_block %}
    <section id="page-header" class="toolbar" style="height:5px;">
    </section>
{% endblock %}

{% block bodyclass %}{% endblock %}

{% block main %}
    {% handle_before_events request group %}

    <div id="details">
        <div id="event_list" class="inactive"></div>
    </div>

    <section class="body">
        {% block inner %}

            {% with event|get_rendered_interfaces:request as interface_list %}

                <div class="btn-toolbar event-toolbar">
                    <!-- We switch the ordering of events here as it makes more sense visually -->
                    <a class="btn pull-left prev {% if not next_event %} disabled{% endif %}"{% if next_event %} href="{% url 'sentry-group-event' group.team.slug group.project.slug group.id next_event.id %}"{% endif %}><span></span> {% trans "Newer Event" %}</a>
                    <a class="btn pull-right next {% if not prev_event %} disabled{% endif %}"{% if prev_event %} href="{% url 'sentry-group-event' group.team.slug group.project.slug group.id prev_event.id %}"{% endif %}>{% trans "Older Event" %} <span></span></a>
                    <h4>Event at {{ event.datetime }} {{ event.datetime.tzinfo }}</h4>
                </div>

                {% include "sentry/partial/event_nav.html" %}

                <div class="alert alert-block alert-info">
                    <p>{% trans "You are viewing a publicly available version of this event's data. Some information may not be available." %}</p>
                </div>

                {% if event.has_two_part_message %}
                    <pre id="full-message">{{ event.message }}</pre>
                {% endif %}

                {% include "sentry/partial/_event_details.html" %}
            {% endwith %}
        {% endblock %}
    </section>
{% endblock %}

{% block content_after %}
    <script type="text/javascript">
    $(document).ready(function() {
        new app.GroupDetailsPage({
            group: {{ group|to_json:request|safe }},
        });
    });
    </script>
{% endblock %}
