{% extends "isitup/base.html" %}

{% block title %}Your Services{% endblock %}

{% block content %}

<h3>Your services</h3>

<div class="span12 offest1">
{% if object_list %}
<p>The following are the services you are currently monitoring. Click on one to edit it or turn it off or on.</p>

<table class="table ">
    <tr><th>Service</th><th>URL</th><th>Up?</th><th>Last checked</th></tr>
    {% for service in object_list %}
    <tr><td><a href="{% url service-detail service.slug %}">{{service.title}}</a></td><td><a href="http://{{service.host}}{% if service.path %}{{service.path}}{% endif %}">{{service.host}}{% if service.path %}{{service.path}}{% endif %}</a></td><td>{{service.up}}</td><td>{{service.last_checked}}</td></tr>
    {% endfor %}
</table>
<p><a class="btn " href="{% url service-create %}" alt="Create new service"><i class="icon-plus"></i>&nbsp;Add more</a></p>
{% else %}
<p>You do not currently have any services. <a href="{% url service-create %}" alt="Create new service">Add one now</a></p>
{% endif %}
</div>

{% endblock %}
