{% extends 'mesh/base.html' %}
{% load i18n mesh_node %}

{% block heading %}{% trans 'Mesh' %}{% endblock %}

{% block subcontent %}
    <h4>{% trans 'Firmware' %}</h4>

    <div class="columns">
        <div>
            <p>
                <strong>Project name:</strong> {{ firmware.project_name }}<br>
                <strong>Version:</strong> {{ firmware.version }}<br>
                <strong>IDF Version:</strong> {{ firmware.idf_version }}<br>
                <strong>Uploader:</strong> {{ firmware.uploader }}<br>
                <strong>Created:</strong> {{ firmware.created }}<br>
            </p>

            <h4>Builds</h4>
            <table>
                <tr>
                    <th>{% trans 'Build' %}</th>
                    <th>{% trans 'Chip' %}</th>
                    <th>{% trans 'Boards' %}</th>
                </tr>
                {% for build in builds %}
                    <tr>
                        <td>
                            <a href="{% url "mesh.firmwares.build.detail" pk=build.pk %}">
                                {{ build.variant }}
                            </a>
                        </td>
                        <td>{{ build.get_chip_display }}</td>
                        <td>
                            {% for board in build.boards %}
                                {{ board.pretty_name }}<br>
                            {% endfor %}
                        </td>
                    </tr>
                {% endfor %}

            </table>
        </div>
        <div>
            {% include "mesh/fragment_ota_form.html" %}
        </div>
    </div>
{% endblock %}
