-
Notifications
You must be signed in to change notification settings - Fork 2k
/
read_base.html
72 lines (58 loc) · 2.68 KB
/
read_base.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
{% extends "package/base.html" %}
{% block subtitle %}{{ pkg.title or pkg.name }} - {{ super() }}{% endblock %}
{% block links -%}
{{ super() }}
<link rel="alternate" type="application/rdf+xml" href="{{ h.url_for(controller='package', action='read', id=pkg.id, format='rdf', qualified=True) }}"/>
{% endblock -%}
{% block head_extras -%}
{{ super() }}
{% set description = h.markdown_extract(pkg.notes, extract_length=200)|forceescape %}
<meta property="og:title" content="{{ h.dataset_display_name(pkg) }} - {{ g.site_title }}">
<meta property="og:description" content="{{ description|forceescape|trim }}">
{% endblock -%}
{% block content_action %}
{% if h.check_access('package_update', {'id':pkg.id }) %}
{% link_for _('Manage'), controller='package', action='edit', id=pkg.name, class_='btn', icon='wrench' %}
{% endif %}
{% endblock %}
{% block content_primary_nav %}
{{ h.build_nav_icon('dataset_read', _('Dataset'), id=pkg.name) }}
{{ h.build_nav_icon('dataset_groups', _('Groups'), id=pkg.name) }}
{{ h.build_nav_icon('dataset_activity', _('Activity Stream'), id=pkg.name) }}
{{ h.build_nav_icon('related_list', _('Related'), id=pkg.name) }}
{% endblock %}
{% block primary_content_inner %}
{% block package_revision_info %}
{% if c.pkg_revision_id %}
<div class="module info alert alert-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 %}
</p>
</div>
{% endif %}
{% endblock %}
{% endblock %}
{% block secondary_content %}
{% block secondary_help_content %}{% endblock %}
{% block package_info %}
{% snippet 'package/snippets/info.html', pkg=pkg %}
{% endblock %}
{% block package_organization %}
{% if pkg.organization %}
{% set org = h.get_organization(pkg.organization.name) %}
{% snippet "snippets/organization.html", organization=org, has_context_title=true %}
{% endif %}
{% endblock %}
{% block package_social %}
{% snippet "snippets/social.html" %}
{% endblock %}
{% block package_license %}
{% snippet "snippets/license.html", pkg_dict=pkg %}
{% endblock %}
{% endblock %}