datasette/datasette/templates/row.html

43 wiersze
1.6 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ database }}: {{ table }}{% endblock %}
{% block extra_head %}
{{ super() }}
<style>
@media only screen and (max-width: 576px) {
{% for column in columns %}
.rows-and-columns td:nth-of-type({{ loop.index }}):before { content: "{{ column|escape_css_string }}"; }
{% endfor %}
}
</style>
{% endblock %}
{% block body_class %}row db-{{ database|to_css_class }} table-{{ table|to_css_class }}{% endblock %}
{% block content %}
<div class="hd"><a href="{{ prefix }}">home</a> / <a href="{{ prefix }}{{ database }}-{{ database_hash }}">{{ database }}</a> / <a href="{{ prefix }}{{ database }}-{{ database_hash }}/{{ table|quote_plus }}">{{ table }}</a></div>
<h1 style="padding-left: 10px; border-left: 10px solid #{{ database_hash[:6] }}">{{ table }}: {{ ', '.join(primary_key_values) }}</a></h1>
{% block description_source_license %}{% include "_description_source_license.html" %}{% endblock %}
<p>This data as <a href="{{ url_json }}">.json</a></p>
{% include custom_rows_and_columns_templates %}
{% if foreign_key_tables %}
<h2>Links from other tables</h2>
<ul>
{% for other in foreign_key_tables %}
<li>
<a href="{{ prefix }}{{ database }}-{{ database_hash }}/{{ other.other_table|quote_plus }}?{{ other.other_column }}={{ ', '.join(primary_key_values) }}">
{{ "{:,}".format(other.count) }} row{% if other.count == 1 %}{% else %}s{% endif %}</a>
from {{ other.other_column }} in {{ other.other_table }}
</li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}