-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdetails_table.html
61 lines (58 loc) · 2.82 KB
/
details_table.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{% extends "details_base.html" %}
{% load markdown %}
{% load waffle_tags %}
{% block extra_details %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
{% if entity.column_details %}
<div class="govuk-heading-m">Table schema</div>
{% include "partial/download_button.html" with entity_type='database' title="table descriptions" %}
<table class="govuk-table app-table-responsive">
<thead class="govuk-table__head">
<tr class="govuk-table__row">
<th scope="col" class="govuk-table__header">Column name</th>
<th scope="col" class="govuk-table__header">Description</th>
<th scope="col" class="govuk-table__header">Type</th>
{% switch 'show_is_nullable_in_table_details_column' %}
<th scope="col" class="govuk-table__header">Is nullable</th>
{% endswitch %}
</tr>
</thead>
<tbody class="govuk-table__body app-table-responsive__body">
{% for column in entity.column_details %}
<tr class="govuk-table__row app-table-responsive__row">
<td class="govuk-table__cell"><span class="app-table-responsive__heading">Column name:</span>{{column.display_name}}</td>
<td class="govuk-table__cell column-description"><span class="app-table-responsive__heading">Description:</span>
{% if column.description %}
<div>
{{column.description|default:''|markdown:3}}
</div>
{% else %}
<p class="govuk-visually-hidden">A description for {{column.display_name}} does not exist</p>
{% endif %}
</td>
<td class="govuk-table__cell"><span class="app-table-responsive__heading">Type:</span>{{column.type|title}}</td>
{% switch 'show_is_nullable_in_table_details_column' %}
<td class="govuk-table__cell"><span class="app-table-responsive__heading">Is nullable:</span>{{column.nullable|yesno:"Yes,No,"}}</td>
{% endswitch %}
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<h2 class="govuk-heading-m">Table schema</h2>
<p class="govuk-body">The schema for this table is not available.</p>
{% endif %}
{% if has_lineage %}
<h2 class="govuk-heading-m">Lineage</h2>
<div class="govuk-body-m" >
See where this data came from and how it is used in other tables.
</div class="govuk-body-m">
<div class="govuk-body">
<a href="{{lineage_url}}" class="govuk-link" rel="noreferrer noopener" target="_blank">
View lineage in DataHub (opens in new tab)
</a>
</div>
{% endif %}
</div>
{% endblock extra_details %}