<|start_filename|>status/templates/status/home.html<|end_filename|>
{% extends "base.html" %}
{% load avatar_tags %}
{% block exthead %}
    <meta http-equiv="refresh" content="60">
{% endblock %}
{% block menubar %}
{% endblock %}

{% block content %}
    {% if STATUS_LOGO_URL %}
        <div>
            <div class="pull-right"><img src="{{ STATUS_LOGO_URL }}" /></div>
        </div>
    {% endif %}
    {% if status_level %}
        <p class="alert alert-{{ status_level }}">{% if status_level == 'success' %}There are no known issues at this time{% else %}Some systems are experiencing issues{% endif %}</p>
    {% endif %}
    {% for incident in incident_list %}
        {% include "status/partials/incident.html" with with_callout=True %}
    {% endfor %}
    {% if STATUS_TICKET_URL %}
    <div class="row">
        <div class="col-md-6">
            <p>If you are having an issue that is not listed above, please turn in a ticket!</p>
            <p><a class="btn btn-primary btn-lg" href="{{ STATUS_TICKET_URL }}" role="button"><i class="glyphicon glyphicon-pencil"></i> New Ticket!</a></p>
        </div>
    </div>
    {% endif %}
{% endblock %}


<|start_filename|>status/templates/status/incident_hide.html<|end_filename|>
{% extends "base.html" %}
{% load avatar_tags %}
{% load bootstrap3 %}

{% block content %}
    <div class="alert alert-warning" role="alert">Are you sure you wish to hide the following incident? It will no longer be shown on the home page, but will be accessible to users.</div>

    <ul class="list-group components">
        <li class="list-group-item component">
            <h4><i class="glyphicon fa {{ incident.status.icon }}"></i> {{ incident.name }} <small class="text-{{ incident.status.type }}">{{ incident.status.name }}</small></h4>
            <p><div class="pull-left" style="padding-right: 10px;">{% avatar request.user 36 %}</div>{{ incident.description }}</p>
            <p>Updated {{ incident.updated|timesince }} ago</p>
        </li>
    </ul>
    <form action="." method="POST">
        {% csrf_token %}
        {% buttons %}
            <button type="submit" class="btn btn-danger">
                {% bootstrap_icon "eye-close" %} Hide
            </button>
        {% endbuttons %}
    </form>
{% endblock %}


<|start_filename|>status/templates/status/incident_archive_year.html<|end_filename|>
{% extends "base.html" %}
{% load avatar_tags %}

{% block content %}
    <h1>Archive for {{ year|date:"Y" }}</h1>
    {% if STATUS_LOGO_URL %}
    <div>
        <div class="pull-right"><img src="{{ STATUS_LOGO_URL }}" /></div>
    </div>
    {% endif %}
    <ul class="list-group components">
        {% for incident in incident_list %}
            <li class="list-group-item component">
            <h3><i class="glyphicon fa {{ incident.status.icon }}"></i> <A HREF="{% url 'status:incident_detail' incident.pk %}">{{ incident.name }}</A> <small class="text-{{ incident.status.type }}">{{ incident.status.name }}</small></h3>
                <p><div class="pull-left" style="padding-right: 10px;">{% avatar incident.user 36 %}</div><h4>{{ incident.description|linebreaksbr|urlize }}</h4></p>
                <p>Updated {{ incident.updated|timesince }} ago by {{ incident.user.username }} <A HREF="{% url 'status:incident_detail' incident.pk %}">Details</A></p>
            </li>
        {% endfor %}
    </ul>
</ul>
{% endblock %}


<|start_filename|>status/templates/status/incident_confirm_delete.html<|end_filename|>
{% extends "base.html" %}
{% load avatar_tags %}
{% load bootstrap3 %}

{% block content %}
    <div class="alert alert-danger" role="alert">Are you sure you wish to delete the following incident?</div>

    <ul class="list-group components">
        <li class="list-group-item component">
            <h4><i class="glyphicon fa {{ incident.status.icon }}"></i> {{ incident.name }} <small class="text-{{ incident.status.type }}">{{ incident.status.name }}</small></h4>
            <p><div class="pull-left" style="padding-right: 10px;">{% avatar request.user 36 %}</div>{{ incident.description }}</p>
            <p>Updated {{ incident.updated|timesince }} ago</p>
        </li>
    </ul>
    <form action="." method="POST">
        {% csrf_token %}
        {% buttons %}
            <button type="submit" class="btn btn-danger">
                {% bootstrap_icon "remove" %} Delete
            </button>
        {% endbuttons %}
    </form>
{% endblock %}


<|start_filename|>status/templates/status/partials/incident.html<|end_filename|>
{% load avatar_tags %}
{% if with_callout %}
    <div class="bs-callout bs-callout-{{ incident.get_latest_update.status.type }}">
{% endif %}
    <h3>
        {% if incident.get_latest_update.status.icon %}
            <i class="glyphicon fa {{ incident.get_latest_update.status.icon }}"></i>
        {% endif %}
        <A HREF="{% url 'status:incident_detail' incident.pk %}">{{ incident.name }}</A>
        <small class="text-{{ incident.get_latest_update.status.type }}">({{ incident.get_latest_update.status.name }})</small>
    </h3>
    <p>
    <div class="pull-left" style="padding-right: 10px;">{% if incident.get_latest_update.user %}{% avatar incident.get_latest_update.user 36 %}{% else %}{% avatar incident.user 36 %}{% endif %}</div>
    Created {{ incident.created|timesince }} ago by {{ incident.user.username }}<br>
    Updated {{ incident.updated|timesince }} ago by {{ incident.get_latest_update.user.username }}
    </p>
    <p>
        {% if not hide_detail %}
            <h4>{{ incident.get_latest_update.description|linebreaksbr|urlize|truncatewords:30 }}</h4>
        {% endif %}
        {% if not hide_more %} <A HREF="{% url 'status:incident_detail' incident.pk %}">Details ({{ incident.incidentupdate_set.count }})</A>{% endif %}
    </p>
{% if with_callout %}
    </div>
{% endif %}


<|start_filename|>status/templates/status/incident_list.html<|end_filename|>
{% extends "base.html" %}

{% block content %}
    <table class="table table-condensed table-bordered table-striped table-hover">
        <thead>
            <tr>
                <td>ID</td>
                <td>Created</td>
                <td>Updated</td>
                <td>User</td>
                <td>Name</td>
                <td>Status</td>
                <td>Visible</td>
                <td>Description</td>
                <td>Actions</td>
            </tr>
        </thead>
        <tbody>
            {% for incident in incident_list %}
                <tr>
                    <td><A HREF="{% url 'status:incident_detail' incident.pk %}">{{ incident.pk }}</A></td>
                    <td>{{ incident.created }} ({{ incident.created|timesince }} ago)</td>
                    <td>{{ incident.updated }} ({{ incident.updated|timesince }} ago)</td>
                    <td>{{ incident.user.username }}</td>
                    <td>{{ incident.name }}</td>
                    <td>{{ incident.get_latest_update.status.name }}</td>
                    <td>
                        {% if incident.hidden %}
                            <i class="fa fa-times" style="color: #FF0000;"></i>
                        {% else %}
                            <i class="fa fa-thumbs-o-up" style="color: #00FF00;"></i>
                        {% endif %}
                    </td>
                    <td>{{ incident.get_latest_update.description|truncatewords:25 }}</td>
                    <td>
                        <A class="btn btn-primary btn-xs" HREF="{% url 'status:incident_update' incident.pk %}">Update</A>
                        {% if not incident.hidden %}<A class="btn btn-primary btn-xs" HREF="{% url 'status:incident_hide' incident.pk %}">Hide</A>{% endif %}
                        <A class="btn btn-danger btn-xs" HREF="{% url 'status:incident_delete' incident.pk %}">Delete</A>
                </tr>
            {% endfor %}
        </tbody>
    </table>
{% endblock %}


<|start_filename|>status/templates/status/incident_detail.html<|end_filename|>
{% extends "base.html" %}
{% load avatar_tags %}
{% load bootstrap3 %}

{% block content %}
    <h2>Current Status</h2>
    {% include "status/partials/incident.html" with hide_more=True hide_detail=True with_callout=True %}
    <h2>History</h2>
    <ul class="list-group components">
        {% for update in incident.incidentupdate_set.all %}
        <div class="bs-callout bs-callout-{{ update.status.type }}">
                <li class="list-group-item component">
                <h3><i class="glyphicon fa {{ update.status.icon }}"></i> <small class="text-{{ update.status.type }}">{{ update.status.name }}</small></h3>
                    <p><div class="pull-left" style="padding-right: 10px;">{% avatar update.user 36 %}</div><h4>{{ update.description|linebreaksbr|urlize }}</h4></p>
                    <p>Posted {{ update.created|timesince }} ago by {{ update.user.username }}</p>
                </li>
            </div>
        {% endfor %}
    </ul>
    {% if request.user.is_authenticated %}
    <form action="{% url 'status:incident_update' incident.pk %}" method="POST">
            {% csrf_token %}
            {% bootstrap_form form %}
            {% buttons %}
                <button type="submit" class="btn btn-primary">
                    {% bootstrap_icon "star" %} Submit
                </button>
            {% endbuttons %}
        </form>
    {% endif %}
{% endblock %}


