-
Notifications
You must be signed in to change notification settings - Fork 2k
/
read.html
91 lines (77 loc) · 3.34 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
{% extends "page.html" %}
{% set pkg = c.pkg_dict %}
{% block subtitle %}{{ pkg.title or pkg.name }}{% endblock %}
{% block breadcrumb_content %}
{% set dataset = pkg.title or pkg.name %}
<li>{% link_for _('Datasets'), controller='package', action='search', highlight_actions = 'new index' %}</li>
<li class="active"><a href="" title="{{ dataset }}">{{ dataset|truncate(35) }}</a></li>
{% endblock %}
{% block actions_content %}
<li>{% link_for _('Related'), controller='related', action='list', id=pkg.name, class_='btn', icon='picture' %}</li>
{# NOTE: Not implemented in stage 1 #}
{# <li>{% link_for _('History'), controller='package', action='history', id=pkg.name, class_='btn', icon='undo' %}</li> #}
{% if h.check_access('package_update', {'id':pkg.id }) %}
<li>{% link_for _('Edit'), controller='package', action='edit', id=pkg.name, class_='btn', icon='wrench' %}</li>
{% endif %}
<li>{% link_for _('Followers'), controller='package', action='followers', id=pkg.name, class_='btn', icon='group' %}</li>
<li>{{ h.follow_button('dataset', pkg.id) }}</li>
{% endblock %}
{% block primary_content %}
{% block package_revision_info %}
{% if c.pkg_revision_id %}
<div class="module info">
<p class="module-content">
{% set timestamp = h.render_datetime(c.pkg_revision_timestamp, with_hours=True) %}
{% set url = h.url(controller='package', action='read', id=pkg.name) %}
{% if c.pkg_revision_not_latest %}
{% trans timestamp=timestamp, url=url %}This is an old revision of this dataset, as edited at {{ timestamp }}. It may differ significantly from the <a href="{{ url }}">current revision</a>.{% endtrans %}
{% else %}
{% trans timestamp=timestamp %}This is the current revision of this dataset, as edited at {{ timestamp }}.{% endtrans %}
{% endif %}
</div>
</div>
{% endif %}
{% endblock %}
<article class="module prose">
{% block package_description %}
<section class="module-content">
<h1>{{ pkg.title or pkg.name }}
{% if pkg.state.startswith('draft') %}
[{{ _('Draft') }}]
{% endif %}
</h1>
{% if c.pkg_notes_formatted %}
<div class="notes embedded-content">
{{ c.pkg_notes_formatted }}
</div>
{% endif %}
<span class="insert-comment-thread"></span>
</section>
{% endblock %}
{% block package_resources %}
{% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources %}
{% endblock %}
{% block package_tags %}
{% snippet "package/snippets/tags.html", tags=pkg.tags %}
{% endblock %}
{% block package_additional_info %}
{% snippet "package/snippets/additional_info.html", pkg_dict=pkg %}
{% endblock %}
</article>
{% endblock %}
{% block secondary_content %}
{% block package_groups %}
{% for group in pkg.groups %}
{% snippet "snippets/group.html", group=group, truncate=70 %}
{% endfor %}
{% endblock %}
{% block package_social %}
{% snippet "snippets/social.html" %}
{% endblock %}
{% block package_related %}
{% snippet "snippets/related.html", item=c.pkg.related|last, pkg_name=pkg.name %}
{% endblock %}
{% block package_license %}
{% snippet "snippets/license.html", pkg_dict=pkg %}
{% endblock %}
{% endblock %}