-
Notifications
You must be signed in to change notification settings - Fork 2k
/
read.html
163 lines (147 loc) · 7.94 KB
/
read.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!DOCTYPE html>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:i18n="http://genshi.edgewall.org/i18n"
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="../page.html" />
<head>
<title>${c.pkg_dict.title or c.pkg_dict.name} - Datasets</title>
</head>
<body>
<nav class="toolbar">
<ol class="breadcrumb">
<li>${h.nav_link(_('Datasets'), controller='package', action='search', highlight_actions = 'new index')}</li>
<li class="active"><a href="">${c.pkg_dict.title or c.pkg_dict.name}</a></li>
</ol>
<ul class="actions">
<li>${h.nav_link(_('History'), controller='package', action='history', id=c.pkg.id, class_='btn', icon='rewind')}</li>
<li>${h.nav_link(_('Edit'), controller='package', action='edit', id=c.pkg.id, class_='btn', icon='tools', condition=h.check_access('package_update',{'id':c.pkg.id}))}</li>
<li><a class="btn" href=""><i class="ckan-icon ckan-icon-flag"></i> Report Issue</a></li>
</ul>
</nav>
<div class="primary test" data-cake="test">
<div py:if="c.pkg_revision_id" class="widget info">
<p py:if="c.pkg_revision_not_latest" class="content">This is an old revision of this dataset, as edited at ${h.render_datetime(c.pkg_revision_timestamp, with_hours=True)}. It may differ significantly from the <a href="${h.url(controller='package', action='read', id=c.pkg.name)}">current revision</a>.</p>
<p py:if="not c.pkg_revision_not_latest" class="content">This is the current revision of this dataset, as edited at ${h.render_datetime(c.pkg_revision_timestamp, with_hours=True)}.</p>
</div>
<article class="module prose">
<section class="content">
<h1>${c.pkg_dict.title or c.pkg_dict.name}</h1>
<div class="notes" py:if="str(c.pkg_notes_formatted).strip()">
${c.pkg_notes_formatted}
</div>
<span class="insert-comment-thread"></span>
</section>
<section id="dataset-resources" class="resources content">
<h3>Data and Resources</h3>
<ul class="resource-list" py:if="c.pkg_dict.resources">
<li class="resource-item" py:for="res in c.pkg_dict.resources" py:with="url=h.url_for(controller='package', action='resource_read', id=c.pkg_dict['name'], resource_id=res['id'])">
<a class="heading" href="${url}" title="${res.name or res.description}">
${h.resource_display_name(res)}<span py:if="res.format" class="format-label" property="dc:format" data-format="${res.format.lower()}">${res.format}</span>
<!--! TODO: Correctly pass localised views into this snippet -->
<py:if test="True" py:with="title=('%s views' % 10)">${h.snippet('snippets/popular.html', title=title)}</py:if>
</a>
<p class="description">
<py:choose test="">
<!-- only show description if name is given as we show
the description for the name if none is given -->
<py:if test="res.name">
${h.markdown_extract(res.description, extract_length=80)}
</py:if>
<py:otherwise><span class="empty">No description for this resource</span></py:otherwise>
</py:choose>
</p>
<a class="btn btn-primary" href="${url}">Explore Data</a>
</li>
</ul>
<py:if test="not c.pkg_dict.resources">
<p>This dataset has no data, <a href="#">why not add some?</a></p>
</py:if>
</section>
<section class="tags content" py:if="len(c.pkg_dict.tags)">
${h.snippet('snippets/tag_list.html', tags=c.pkg_dict.tags)}
</section>
<section class="content additional-info">
<h3>Additional Info</h3>
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Field</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr py:if="c.pkg.url">
<th class="dataset-label">Source</th>
<td class="dataset-details" property="foaf:homepage">${c.pkg_url_link}</td>
</tr>
<tr py:if="c.pkg_author_link">
<th class="dataset-label">Author</th>
<td class="dataset-details" property="dc:creator">${c.pkg_author_link}</td>
</tr>
<tr py:if="c.pkg_maintainer_link">
<th class="dataset-label">Maintainer</th>
<td class="dataset-details" property="dc:contributor">${c.pkg_maintainer_link}</td>
</tr>
<tr py:if="c.pkg.version">
<th class="dataset-label">Version</th>
<td class="dataset-details">${c.pkg.version}</td>
</tr>
<tr py:if="c.eu_country">
<th class="dataset-label">Country</th>
<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">
<th class="dataset-label">Harvest Source</th>
<td class="dataset-details" i18n:msg="harvest_catalogue_name">
<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}">
<th class="dataset-label" property="rdfs:label">${_(key)}</th>
<td class="dataset-details" property="rdf:value">${value}</td>
</tr>
</tbody>
</table>
</section>
</article>
</div>
<aside class="secondary">
<section class="module subscribe">
<h2 class="heading"><i class="ckan-icon ckan-icon-add"></i> Subscribe</h2>
<ul class="nav nav-simple">
<li><a href="#"><i class="ckan-icon ckan-icon-email"></i> Email</a></li>
<li><a href="#"><i class="ckan-icon ckan-icon-feed"></i> RSS</a></li>
</ul>
</section>
${h.snippet('snippets/social.html')}
<section class="module info related" py:if="True">
<h2 class="heading"><i class="ckan-icon ckan-icon-photo"></i> Related <a class="action" href="#">Add Related</a></h2>
<p class="content">Some interesting summary of this featured item. This
may or may not have a slideshow.</p>
</section>
<section class="module info related empty" py:if="True">
<h2 class="heading"><i class="ckan-icon ckan-icon-photo"></i> Related</h2>
<div class="content">
<p>No apps, ideas, news stories or images have been
related to this dataset yet, why not add one now?</p>
<p class="action"><a class="btn" href="#">Add Item</a></p>
</div>
</section>
<section class="module info license" py:if="c.pkg.license_id">
<h2 class="heading"><i class="ckan-icon ckan-icon-large-lock"></i> License</h2>
<p class="content">${h.snippet('snippets/license.html', dataset=c.pkg_dict)}</p>
</section>
<section class="module disqus-trackback">
<h2 class="heading"><i class="ckan-icon ckan-icon-clipboard"></i> Trackback URL</h2>
<div class="field"><input type="text" value="http://trackback.com" /></div>
</section>
</aside>
</body>
</html>