{#
/**
 * Copyright (C) 2022 Xibo Signage Ltd
 *
 * Xibo - Digital Signage - http://www.xibo.org.uk
 *
 * This file is part of Xibo.
 *
 * Xibo is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * Xibo is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with Xibo.  If not, see <http://www.gnu.org/licenses/>.
 */
#}

{% set randomId = random() %}

{% extends "form-base.twig" %}
{% import "forms.twig" as forms %}
{% import "inline.twig" as inline %}

{% block formTitle %}
    {% set tagName = tag.tag %}
    {% trans %}Usage Report for {{ tagName }}{% endtrans %}
{% endblock %}

{% block formButtons %}
    {% trans "Close" %}, XiboDialogClose()
{% endblock %}

{% block callBack %}usageFormOpen{% endblock %}

{% block formHtml %}
    <div class="row">
        <div class="col-md-12">
            <div class="XiboGrid" id="{{ random() }}" data-grid-name="tagUsageGrid">
                <div class="XiboFilter card mb-3 bg-light">
                    <div class="FilterDiv card-body" id="Filter">
                        <form class="form-inline">

                        </form>
                    </div>
                </div>
                <div class="XiboData card pt-3">
                    <table id="tagUsageTable" class="table table-bordered" style="width:100%"
                           data-tag-id="{{ tag.tagId }}">
                        <thead>
                        <tr>
                            <th>{% trans "ID" %}</th>
                            <th>{% trans "Type" %}</th>
                            <th>{% trans "Name" %}</th>
                            <th>{% trans "Tag Value" %}</th>
                        </tr>
                        </thead>
                        <tbody>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
{% endblock %}