-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdetails_table.html
94 lines (89 loc) · 3.63 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{% extends "base/base.html" %}
{% load static %}
{% load markdown %}
{% load humanize %}
{% block breadcrumbs %}
<div class="govuk-breadcrumbs">
<ol class="govuk-breadcrumbs__list">
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="{%url 'home:search' %}?{{request.session.last_search|default:''}}">Search</a>
</li>
{% if parent_entity %}
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="{% url 'home:details' result_type=dataset_parent_type urn=parent_entity.urn %}">{{parent_entity.display_name}}</a>
</li>
{% endif %}
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="{{request.path}}">{{table.name}}</a>
</li>
</ol>
</div>
{% endblock breadcrumbs %}
{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<h1 class="govuk-heading-l">{{h1_value}}</h1>
<span class="govuk-caption-m">Table</span>
<h2 class="govuk-heading-m">{{table.name}}</h2>
</div>
</div>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<div class="summary-card">
<h3 class="govuk-heading-s govuk-!-margin-top-3">
Description
</h3>
<div class="govuk-body">
{% if table.description %}
{{table.description}}
{% else %}
No description available.
{% endif %}
</div>
</div>
</div>
<div class="govuk-grid-column-one-third">
{% include "partial/contact_info.html" with data_owner=table.governance.data_owner.display_name data_owner_email=table.governance.data_owner.email %}
</div>
</div>
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
{% if table.column_details %}
<table class="govuk-table">
<caption class="govuk-table__caption govuk-table__caption--m">Table schema</caption>
<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>
<th scope="col" class="govuk-table__header">Is Nullable</th>
</tr>
</thead>
<tbody class="govuk-table__body">
{% for column in table.column_details %}
<tr class="govuk-table__row">
<td class="govuk-table__cell">{{column.display_name}}</td>
<td class="govuk-table__cell column-description">{{column.description|default:''|markdown:3|truncatechars_html:300}}</td>
<td class="govuk-table__cell">{{column.type|title}}</td>
<td class="govuk-table__cell">{{column.nullable|yesno|upper}}</td>
</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" >
If you are interested to find out what data were used to create this table or if this table is used to create any further tables, you can see that information via the lineage.
</div class="govuk-body-m">
<div class="govuk-body">
<a href="{{lineage_url}}" class="govuk-link">
View lineage in DataHub
</a>
</div>
{% endif %}
</div>
{% endblock content %}