{% extends "sentry/teams/manage.html" %}

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

{% block inner %}
    <div class="page-header">
        {% if can_add_project %}
            <a href="{% url 'sentry-new-project' team.slug %}" class="btn pull-right btn-primary">{% trans "New Project" %}</a>
        {% endif %}
        <h2>{% trans "Projects" %}</h2>
    </div>
    {% if project_list %}
        <table class="table table-striped">
            <colgroup>
                <col/>
                <col width="150px"/>
            </colgroup>
            <thead>
                <tr>
                    <th>{% trans "Project" %}</th>
                    <th style="text-align:center;">{% trans "Date Added" %}</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>
                            {% if project.status == STATUS_HIDDEN %}
                                (pending deletion)
                            {% endif %}<br>
                             {{ team.slug }}/{{ project.slug }}
                        </td>
                        <td style="text-align:center;">
                            {{ project.date_added|timesince }}
                        </td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    {% else %}
        <p>{% trans "There are no projects managed by this team." %}</p>
    {% endif %}
{% endblock %}
