-
Notifications
You must be signed in to change notification settings - Fork 2k
/
read_core.html
110 lines (95 loc) · 4.08 KB
/
read_core.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
<html xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:i18n="http://genshi.edgewall.org/i18n"
py:strip=""
>
<xi:include href="../_util.html" />
<div id="dataset" class="dataset">
<!-- Overview Section -->
<div id="dataset-overview">
<!-- Description -->
<div class="notes" py:if="str(c.pkg_notes_formatted).strip()">
${c.pkg_notes_formatted}
</div>
<!-- Resources -->
<div id="dataset-resources" class="resources subsection">
<h3>Resources</h3>
<py:for each="res in c.pkg_dict.get('resources', [])">
<div class="search-result" id="${res['id']}">
<p class="extra-links">
<a class="view-more-link" href="${h.url_for(controller='package', action='resource_read', id=c.pkg_dict['name'], resource_id=res['id'])}">View</a>
</p>
<a class="main-link" href="${h.url_for(controller='package', action='resource_read', id=c.pkg_dict['name'], resource_id=res['id'])}">${h.resource_display_name(res)}</a>
<span py:if="res.get('format')" class="format-box" property="dc:format">${res.get('format')}</span>
<p class="resource-description" py:if="res.get('description')">${h.markdown_extract(res.get('description'))}</p>
<p class="resource-information" py:if="res.get('last_modified')">
Last updated: ${h.time_ago_in_words_from_str(res.get('last_modified'), granularity='day')} ago
</p>
<p class="result-url" rel="dcat:distribution" resource="_:res${res.id}" typeof="dcat:Distribution">
<a class="resource-url-analytics" href="${res.get('url', '')}" rel="dcat:accessURL" target="_blank">
${res.get('url', '')}
</a>
<a py:if="res.get('cache_url')" class="resource-url-cached" href="${res.get('cache_url')}" target="_blank">
[cached]
</a>
</p>
</div>
</py:for>
<py:if test="not len(c.pkg_dict.get('resources', []))">
(none)
</py:if>
</div>
</div>
<!-- Dataset Information Section -->
<h3>Additional Information</h3>
<div id="dataset-information">
<table>
<thead>
<tr>
<th>Field</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr py:if="c.pkg.url">
<td class="dataset-label">Source</td>
<td class="dataset-details" property="foaf:homepage">${c.pkg_url_link}</td>
</tr>
<tr py:if="c.pkg_author_link">
<td class="dataset-label">Author</td>
<td class="dataset-details" property="dc:creator">${c.pkg_author_link}</td>
</tr>
<tr py:if="c.pkg_maintainer_link">
<td class="dataset-label">Maintainer</td>
<td class="dataset-details" property="dc:contributor">${c.pkg_maintainer_link}</td>
</tr>
<tr py:if="c.pkg.version">
<td class="dataset-label">Version</td>
<td class="dataset-details">${c.pkg.version}</td>
</tr>
<tr py:if="c.eu_country">
<td class="dataset-label">Country</td>
<td class="dataset-details">${h.code_to_country(c.eu_country)}</td>
</tr>
<tr py:if="h.check_access('package_update',{'id':c.pkg.id})">
<td class="dataset-label">State</td>
<td class="dataset-details">${c.pkg.state}</td>
</tr>
<tr py:if="c.harvest_catalogue_name">
<td class="dataset-label">Harvest Source</td>
<td class="dataset-details">
<a href="${c.harvest_dataset_url}">Dataset page</a> on
<a href="${c.harvest_catalogue_url}">${c.harvest_catalogue_name}</a>
</td>
</tr>
<tr py:for="i, (key, value) in enumerate(c.pkg_extras)"
rel="dc:relation" resource="_:extra${i}">
<td class="dataset-label" property="rdfs:label">${_(key)}</td>
<td class="dataset-details" property="rdf:value">${value}</td>
</tr>
</tbody>
</table>
</div>
</div> <!-- /dataset -->
</html>