{# projects/python_generator/templates/partials/results_tables_section.html #} {# Šis templeits sagaida, ka `page_data.processed_tables_for_display` ir sagatavots Python pusē. #}
Izmantotie dati
{% if page_data.processed_tables_for_display %} {% for table_info in page_data.processed_tables_for_display %} {% if table_info.rows %} {# `data-table-name` atribūts ir svarīgs JS, lai varētu izcelt rindas #}

{{ table_info.title | e }} {% if table_info.link_url %} {# KOREKCIJA: Nomainīts span ar onclick uz standarta saiti ar nofollow #} {% endif %}

{% if table_info.mysql_table_name_subtitle %}

{{ table_info.mysql_table_name_subtitle | e }}

{% endif %}
{% for header in table_info.headers %} {% endfor %} {% for row_data in table_info.rows %} {# Pievieno `data-row-id` atribūtu, ja tas ir definēts #} {% for cell in row_data['values'] %} {% endfor %} {% endfor %}
{{ header.short | e }}
{% if cell.value is none or cell.value == '' %} NULL {% elif cell.is_link %} {{ cell.value }} {% else %} {{ cell.value | e }} {% endif %}
{% endif %} {% endfor %} {% endif %}