{% extends "sentry/projects/base.html" %}

{% load i18n %}

{% block title %}{% trans "Project List" %} | {{ block.super }}{% endblock %}

{% block heading %}
    {% trans "Project List" %}
{% endblock %}

{% block main %}
    <section class="body">
        {% if PROJECT_LIST %}
            <p>{% trans "The following is a list of projects that you are a member of." %}</p>
            <table class="table table-striped">
                <colgroup>
                    <col>
                    <col style="width:100px;">
                    <col style="width:150px;">
                    <col style="width:100px;">
                </colgroup>
                <thead>
                    <tr>
                        <th>{% trans "Name" %}</th>
                        <th style="text-align:center;">{% trans "Membership" %}</th>
                        <th style="text-align:center;">{% trans "Owner" %}</th>
                        <th style="text-align:center;">{% trans "Status" %}</th>
                    </tr>
                </thead>
                <tbody>
                    {% for project in PROJECT_LIST %}
                        <tr>
                            <td>
                                <a href="{% url 'sentry-manage-project' project.team.slug project.slug %}">{{ project.name }}</a> <small>(<a href="{% url 'sentry-stream' project.team.slug project.slug %}">{% trans "Stream" %}</a>)</small><br/>
                                {% if project.member_dsn %}
                                    <small><code class="clippy">{{ project.member_dsn }}</code></small>
                                {% endif %}
                            </td>
                            <td style="text-align:center;vertical-align:middle;">{{ project.member_type }}</td>
                            <td style="text-align:center;vertical-align:middle;">
                                {% if project.owner %}
                                    {{ project.owner.username }}
                                {% else %}
                                    <em>{% trans "no owner" %}</em>
                                {% endif %}
                            </td>
                            <td style="text-align:center;vertical-align:middle;">{{ project.get_status_display }}</td>
                        </tr>
                    {% endfor %}
                </tbody>
            </table>
        {% else %}
            <div class="alert alert-info">{% trans "You do not have access to any projects." %}</div>
        {% endif %}
    </section>
{% endblock %}
