{% extends "base.html" %}

{% load rules %}

{% block content %}
<div class="md:flex justify-between items-center">
    <div>
        <h4 class="heading">{{request.site.name|default:"Dashboard"}}</h4>
    </div>
    <div class="flex items-center">
        <div class="mr-1">
            {% include 'dashboard/includes/date_range.html' %}
        </div>
        {% has_perm "core.create_service" user as can_create %}
        {% if can_create %}
        <a href="{% url 'dashboard:service_create' %}" class="button field w-auto">+ New Service</a>
        {% endif %}
    </div>
</div>
<hr class="sep">
{% for object in services|dictsortreversed:"stats.session_count" %}
{% include 'dashboard/includes/service_overview.html' %}
{% empty %}
<p>You don't have any services on {{request.site.name|default:"Shynet"}} yet.</p>
{% endfor %}
{% endblock %}