{% load i18n %}
{% if in_progress_count == 0 %}
    <div class="empty-courserun-text">{% trans "No About pages for any course runs are currently in development." %}</div>
{% else %}
    <table class="data-table-in-progress display" cellspacing="0" width="100%">
        <div class="filters">
            <strong>{% trans "Filter by" %}:</strong>
            <button type="button" class="btn-neutral btn-small btn-filter active" data-filter-column="-1">{% trans "All" %}
                <span class="filter-count">{{ in_progress_count }}</span>
            </button>
            <button type="button" class="btn-neutral btn-small btn-filter" data-filter-column="5">{% trans "With Course Team" %}
                <span class="filter-count">{{ course_team_count }}</span>
            </button>
            <button type="button" class="btn-neutral btn-small btn-filter" data-filter-column="6">{% trans "With" %} {{ site_name }}
                <span class="filter-count">{{ internal_user_count }}</span>
            </button>
        </div>
        <thead>
            <tr>
                <th role="button">
                    {% trans "Course Name" %}
                </th>
                <th role="button">
                    {% trans "Course Number" %}
                </th>
                <th role="button">
                    {% trans "Organization" %}
                </th>
                <th role="button">
                    {% trans "Start" %}
                </th>
                <th role="button">
                    {% trans "End" %}
                </th>
                <th role="button">
                    {% trans "Course Team" %}
                </th>
                <th role="button">
                    {{ site_name }}
                </th>
            </tr>
        </thead>
        <tbody>
            {% for course_run in in_progress_course_runs %}
                <tr>
                    <td>
                        <a href="{% url 'publisher:publisher_course_run_detail' course_run.id %}">{{ course_run.title }}</a>
                    </td>
                    <td>
                        {{ course_run.number }}
                    </td>
                    <td>
                        {{ course_run.course.organization_name }}
                    </td>
                    <td>
                         {{ course_run.start|date:"Y-m-d" }}
                    </td>
                    <td>
                        {{ course_run.end|date:"Y-m-d" }}
                    </td>
                    <td>
                        {{ course_run.course_team_status.status_text }}<br>
                        {{ course_run.course_team_status.date|date:'m/d/y' }}
                    </td>
                    <td>
                        {{ course_run.internal_user_status.status_text }}<br>
                        {{ course_run.internal_user_status.date|date:'m/d/y' }}
                    </td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
{% endif %}
