{% extends "base.html" %} {% set r = definition.report %} {% block title %}{{ r.name }}{% endblock %} {% block head %}{% endblock %} {% block header %}
{{ r.group_name }} · {{ r.code }}

{{ r.name }}

{% if r.description %}
{{ r.description }}
{% endif %} {% endblock %} {% block header_actions %} {% if can_edit %} {% endif %} {% endblock %} {% block content %} {% from "_param_options.html" import option_list %} {% if definition.params %}
{% for p in definition.params %} {# An input of the dashboard's other reports is on the form of that tab only (data-for-view). #}
{% set id = 'p-' ~ p.name %} {% set source %}{% if p.source %} · {{ p.source }}{% endif %}{% endset %} {% if p.data_type == 'bool' and p.input_kind == 'input' %} {% else %} {% if p.input_kind in ('select', 'multiselect') %} {# Options that depend on other parameters (its options query uses them): htmx asks for the list again when one of them changes - by hand or because its own list was replaced - and once when the page opens, for the values the browser really shows. #} {% else %} {% set kinds = {'int': 'number', 'decimal': 'text', 'date': 'date', 'datetime': 'datetime-local'} %} {% endif %} {% endif %}
{% endfor %}
{% endif %} {% set icons = {'grid': 'table', 'html': 'layout-dashboard', 'bi': 'chart-pie'} %} {% set data_views = definition.views | selectattr('ok') | map(attribute='key') | reject('equalto', 'bi') | list %}
{% if not definition.params and data_views %} {% endif %} {% if definition.can_refresh and data_views %} {% endif %} {% if 'html' in data_views %} {{ t('report.open_new_tab') }} {% endif %} {% if 'grid' in data_views %} {% endif %} {% if bi and bi.mode == 'LINK' %} {{ t('report.open_new_tab') }} {% endif %} {% if definition.can_export %} {% endif %}
{{ t('report.cached') }} {{ t('report.fresh') }}
{{ t('report.waiting') }}
{{ t('report.running') }}
{% for v in definition.views %}
{% if not v.ok %} {% elif v.key == 'grid' %}
{% elif v.key == 'html' %} {% elif bi and bi.mode == 'LINK' %} {% elif bi and bi.mode == 'EMBED' %}
{% endif %}
{% endfor %}
{% endblock %} {% block scripts %} {% if bi and bi.mode == 'EMBED' %}{% endif %} {# Only for a report with a parameter whose options depend on another one (see the form above). #} {% if definition.params | selectattr('depends_on') | list %}{% endif %} {% endblock %}