{% extends 'site/base.html' %}
{% load i18n %}
{% load compress %}
{% load static %}

{% block title %}{% trans 'c3nav mesh control' %}{% endblock %}
{% block header_title %}<span id="subheader">{% trans 'mesh control' %}</span>{% endblock %}
{% block header_title_url %}{% url 'mesh.nodes' %}{% endblock %}

{% block content %}
<main class="control"{% block addattributes %}{% endblock %}>
    {% include 'site/fragment_messages.html' %}
    {% block back_link %}{% if not request.mobileclient %}<a href="{% url 'site.index' %}" class="float-right">&laquo; {% trans 'back to c3nav' %}</a>{% endif %}{% endblock %}
    <h2>{% block heading %}{% endblock %}</h2>
    {% block menu %}
    <nav>
        <p>
            <a href="{% url 'mesh.nodes' %}">Nodes</a> &middot;
            <a href="{% url 'mesh.messages' %}">Messages</a> &middot;
            <a href="{% url 'mesh.firmwares' %}">Firmwares</a> &middot;
            <a href="{% url 'mesh.ota.list' %}">OTA</a> &middot;
            <a href="{% url 'mesh.ranging' %}">Ranging</a> &middot;
            <a href="{% url 'mesh.logs' %}">Live logs</a> &middot;
        </p>
    </nav>
    <hr>
    {% endblock %}
    {% block subcontent %}
    {% endblock %}
</main>
    {% include 'site/fragment_fakemobileclient.html' %}
    {% compress js %}
        <script type="text/javascript" src="{% static 'jquery/jquery.js' %}"></script>
        <script type="text/javascript">
        if (window.mobileclient) {
            var $body = $('body');
            if ($body.is('[data-user-data]')) {
                mobileclient.setUserData($body.attr('data-user-data'));
            }
        }
        </script>
    {% endcompress %}
{% endblock %}
