-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdetails_table.html
117 lines (112 loc) · 4.66 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
{% extends "base/base.html" %}
{% load static %}
{% load markdown %}
{% load humanize %}
{% load future %}
{% 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}}
<strong class="govuk-tag govuk-!-margin-left-2">
Table
</strong>
</h1>
</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>
<ul class="govuk-list govuk-body" id="metadata-property-list">
{% if table.last_modified %}
<li>
<span class="govuk-!-font-weight-bold">Last updated date:</span>
{{table.last_modified | date:"jS F Y"}} ({{table.last_modified|naturaltime}})
</li>
{% endif %}
<li>
<span class="govuk-!-font-weight-bold">Domain:</span>
{{table.domain.display_name}}
</li>
{% if table.tags_to_display %}
<li>
<span class="govuk-!-font-weight-bold">Tags:</span>
{% for tag in table.tags_to_display %}
<a aria-label="link to search results for all entities tagged {{ tag }}" href="{% url 'home:search' %}{% query_string clear_label=None clear_filter=None new=None tags=tag%}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
{% endfor %}
</li>
{% endif %}
</ul>
</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 slack_channel=table.custom_properties.further_information %}
</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 %}