-
Notifications
You must be signed in to change notification settings - Fork 2k
/
additional_info.html
95 lines (88 loc) · 3.57 KB
/
additional_info.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
<section class="additional-info">
<h3>{{ _('Additional Info') }}</h3>
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th scope="col">{{ _('Field') }}</th>
<th scope="col">{{ _('Value') }}</th>
</tr>
</thead>
<tbody>
{% block package_additional_info %}
{% if pkg_dict.url %}
<tr>
<th scope="row" class="dataset-label">{{ _('Source') }}</th>
{% if h.is_url(pkg_dict.url) %}
<td class="dataset-details" property="foaf:homepage">
<a href="{{ pkg_dict.url }}" rel="foaf:homepage" target="_blank">
{{ pkg_dict.url }}
</a>
</td>
{% else %}
<td class="dataset-details" property="foaf:homepage">{{ pkg_dict.url }}</td>
{% endif %}
</tr>
{% endif %}
{% if pkg_dict.author_email %}
<tr>
<th scope="row" class="dataset-label">{{ _("Author") }}</th>
<td class="dataset-details" property="dc:creator">{{ h.mail_to(email_address=pkg_dict.author_email, name=pkg_dict.author) }}</td>
</tr>
{% elif pkg_dict.author %}
<tr>
<th scope="row" class="dataset-label">{{ _("Author") }}</th>
<td class="dataset-details" property="dc:creator">{{ pkg_dict.author }}</td>
</tr>
{% endif %}
{% if pkg_dict.maintainer_email %}
<tr>
<th scope="row" class="dataset-label">{{ _('Maintainer') }}</th>
<td class="dataset-details" property="dc:contributor">{{ h.mail_to(email_address=pkg_dict.maintainer_email, name=pkg_dict.maintainer) }}</td>
</tr>
{% elif pkg_dict.maintainer %}
<tr>
<th scope="row" class="dataset-label">{{ _('Maintainer') }}</th>
<td class="dataset-details" property="dc:contributor">{{ pkg_dict.maintainer }}</td>
</tr>
{% endif %}
{% if pkg_dict.version %}
<tr>
<th scope="row" class="dataset-label">{{ _("Version") }}</th>
<td class="dataset-details">{{ pkg_dict.version }}</td>
</tr>
{% endif %}
{% if h.check_access('package_update',{'id':pkg_dict.id}) %}
<tr>
<th scope="row" class="dataset-label">{{ _("State") }}</th>
<td class="dataset-details">{{ _(pkg_dict.state) }}</td>
</tr>
{% endif %}
{% if pkg_dict.metadata_modified %}
<tr>
<th scope="row" class="dataset-label">{{ _("Last Updated") }}</th>
<td class="dataset-details">
{% snippet 'snippets/local_friendly_datetime.html', datetime_obj=pkg_dict.metadata_modified %}
</td>
</tr>
{% endif %}
{% if pkg_dict.metadata_created %}
<tr>
<th scope="row" class="dataset-label">{{ _("Created") }}</th>
<td class="dataset-details">
{% snippet 'snippets/local_friendly_datetime.html', datetime_obj=pkg_dict.metadata_created %}
</td>
</tr>
{% endif %}
{% block extras scoped %}
{% for extra in h.sorted_extras(pkg_dict.extras) %}
{% set key, value = extra %}
<tr rel="dc:relation" resource="_:extra{{ i }}">
<th scope="row" class="dataset-label" property="rdfs:label">{{ _(key|e) }}</th>
<td class="dataset-details" property="rdf:value">{{ value }}</td>
</tr>
{% endfor %}
{% endblock %}
{% endblock %}
</tbody>
</table>
</section>