{% extends "service_status/base.html" %}{% load i18n %}

{% block content %}

{% for slug, name, lastBuildDate, statuses, announcements in services %}
<div class="section">
    <div class="header">
        <h2>{% blocktrans with lastBuildDate|date:"H:i:s" as updated_date %}{{ name }} <small>at {{ updated_date }}</small>{% endblocktrans %}</h2>
    </div>
    
    {% if announcements %}
        <h3 class="invisible">{% trans "Service announcements" %}</h3>
        
        <ul class="content-list">
            {% for announcement in announcements %}
                <li>
                    <h3>{{ announcement.title }}</h3>
                    {{ announcement.description }}<br/><small>{{ announcement.date }}</small>
                </li>
            {% endfor %}
        </ul>
    {% endif %}

    <h3 class="invisible">{% trans "Services" %}</h3>
    <ul class="content-list service-status-list">
        {% for status in statuses %}
            <li class="service-status-item service-status-{{ status.status }}">
                <span class="service-status-name">{% trans status.name %}</span><br/>
                <span class="service-status-status">{{ status.status|capfirst }}</span>
                {% if status.statusMessage %}<br/>
                    <span class="service-status-detail">{{ status.statusMessage }}</span>
                {% endif %}
            </li>
        {% endfor %}
    </ul>
</div>
{% endfor %}

{% endblock %}
