{% load i18n %}
{% load sentry_helpers %}

<div class="module">
    <div class="page-header">
        <a href="javascript:void(0)" data-container="#copy_as_curl" data-title="Copy as cURL" class="popup btn small pull-right" style="margin-left: 5px">{% trans "Copy as cURL" %}</a>
        {% if not is_public %}
            <a href="{% url 'sentry-replay' event.organization.slug event.project.slug event.group_id event.id %}" class="btn small pull-right">{% trans "Replay this request" %}</a>
        {% endif %}
        <h2>{% trans "Request" %}</h2>
    </div>
    <div class="module-content">
        <table class="table table-striped vars">
            <colgroup>
                <col style="width:130px;">
            </colgroup>
            <tbody>
                <tr>
                    <th>{% trans "URL:" %}</th>
                    <td><a href="{{ url }}">{{ short_url }}</a></td>
                </tr>
                {% if method %}
                    <tr>
                        <th>{% trans "Method:" %}</th>
                        <td>{{ method }}</td>
                    </tr>
                {% endif %}
                {% if query_string %}
                    <tr>
                        <th>{% trans "Query:" %}</th>
                        <td class="values">
                            <pre>{{ query_string }}</pre>
                        </td>
                    </tr>
                {% endif %}
                {% if fragment %}
                    <tr>
                        <th>{% trans "Fragment:" %}</th>
                        <td class="values">
                            <pre>{{ fragment }}</pre>
                        </td>
                    </tr>
                {% endif %}
                {% if data %}
                    <tr>
                        <th>{% trans "Body:" %}</th>
                        <td class="values">
                            {% render_values data %}
                        </td>
                    </tr>
                {% endif %}
                {% if cookies %}
                    <tr>
                        <th>{% trans "Cookies:" %}</th>
                        <td class="values">
                            {% render_values cookies %}
                        </td>
                    </tr>
                {% endif %}
                {% if headers %}
                    <tr>
                        <th>{% trans "Headers:" %}</th>
                        <td class="values">
                            {% render_values headers %}
                        </td>
                    </tr>
                {% endif %}
                {% if env %}
                    <tr>
                        <th>{% trans "Environment:" %}</th>
                        <td class="values">
                            {% render_values env %}
                        </td>
                    </tr>
                {% endif %}
            </tbody>
        </table>
    </div>
</div>
<div id="copy_as_curl" style="display: none;">
    <pre>{{ curl }}</pre>
</div>
