{% extends "base.html" %}

{% set title = "Riego - Bewässerungskreise" %}
{% set active_menu = "valves" %}


{% block content %}
<h1>Valves</h1>
<table class="table">
    <thead>
        <tr>
            <th scope="col">Name</th>
            <th scope="col">Box</th>
            <th scope="col">channel_nr</th>
            <th scope="col">is_enabled</th>
            <th scope="col">is_hidden</th>
            <th scope="col">is_running</th>
        </tr>
    </thead>
    <tbody>
        {% for item in items %}
        <tr>
            <td><a href="{{url('valves_item_view', item_id=item['id']) }}">{{ item['name'] }}</a></td>
            <td><a href="{{url('boxes_item_view', item_id=item['box_id']) }}">{{ item['box_name'] }}</a></td>
            <td>{{ item['channel_nr']}}</td>
            <td>{{ item['is_enabled']}}</td>
            <td>{{ item['is_hidden']}}</td>
            <td>{{ item['is_running']}}</td>
        </tr>
        {% endfor %}
    </tbody>
</table>


<p>
    <a href="{{url('valves_new')}}">New</a>
</p>

{% endblock %}