kopia lustrzana https://github.com/simonw/datasette
rodzic
59a616ca5c
commit
db3fa4abfa
|
@ -5,9 +5,11 @@
|
||||||
{% block extra_head %}
|
{% block extra_head %}
|
||||||
<style>
|
<style>
|
||||||
@media only screen and (max-width: 576px) {
|
@media only screen and (max-width: 576px) {
|
||||||
|
{% if not is_view %}
|
||||||
td:nth-of-type(1):before { content: "{% if use_rowid %}rowid{% else %}Link{% endif %}"; }
|
td:nth-of-type(1):before { content: "{% if use_rowid %}rowid{% else %}Link{% endif %}"; }
|
||||||
|
{% endif %}
|
||||||
{% for column in display_columns %}
|
{% for column in display_columns %}
|
||||||
td:nth-of-type({{ loop.index + 1 }}):before { content: "{{ column|escape_css_string }}"; }
|
td:nth-of-type({% if is_view %}{{ loop.index }}{% else %}{{ loop.index + 1 }}{% endif %}):before { content: "{{ column|escape_css_string }}"; }
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -27,14 +29,14 @@
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">{% if use_rowid %}rowid{% else %}Link{% endif %}</th>
|
{% if not is_view %}<th scope="col">{% if use_rowid %}rowid{% else %}Link{% endif %}</th>{% endif %}
|
||||||
{% for column in display_columns %}<th scope="col">{{ column }}</th>{% endfor %}
|
{% for column in display_columns %}<th scope="col">{{ column }}</th>{% endfor %}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for row in rows %}
|
{% for row in rows %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="/{{ database }}-{{ database_hash }}/{{ table }}/{{ row_link(row) }}">{{ row_link(row) }}</a></td>
|
{% if not is_view %}<td><a href="/{{ database }}-{{ database_hash }}/{{ table }}/{{ row_link(row) }}">{{ row_link(row) }}</a></td>{% endif %}
|
||||||
{% for td in row %}
|
{% for td in row %}
|
||||||
{% if not use_rowid or (use_rowid and not loop.first) %}
|
{% if not use_rowid or (use_rowid and not loop.first) %}
|
||||||
<td>{{ td or " " }}</td>
|
<td>{{ td or " " }}</td>
|
||||||
|
|
Ładowanie…
Reference in New Issue