{% if services %}
    {% for service in services %}
        <tr>
            <td>{{service.repo_name}}</td>
            <td>{{service.repo_branch}}</td>
            <td>
                <span class="label label-success">{{service.deploys}}</span> 
                {% if service.fail_deploys %}
                    <span class="label label-danger">{{service.fail_deploys}}</span>
                {% endif %}
            </td>
            <td>{{service.latest_log_date}}</td>
            <td>{{service.latest_log_user}}</td>
            <td>
                <a href="{% url 'ftpdeploy_service_status' service.pk %}" class="service-list-status">
                    {% if service.status %}
                        <i class="fa fa-check c-ok" data-toggle="tooltip" data-placement="left" title="Last Check<br>{{service.updated}}"></i>
                    {% else %}
                        <i class="fa fa-times c-remove" data-toggle="tooltip" data-placement="left" title="{{service.status_message}}"></i>
                    {% endif %}
                </a>
            </td>
            <td>
                <div class="pull-right">
                    <a href="{% url 'ftpdeploy_service_manage' service.pk %}" class="btn btn-primary">Manage </a>
                    <a href="{% url 'ftpdeploy_service_edit' service.pk %}" class="btn btn-primary"><i class="fa fa-cog"></i> </a>
                </div>
            </td>
        </tr>
    {% endfor %}
{% else %}
    <tr>
        <td colspan="7">No Results</td>
    </tr>
{% endif %}

