-
Notifications
You must be signed in to change notification settings - Fork 0
/
_resourcebase_info_panel.html
199 lines (170 loc) · 7.21 KB
/
_resourcebase_info_panel.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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
{% load i18n %}
{% block content %}
<dl class="dl-horizontal">
{% if resource.title %}
<dt>{% trans "Title" %}</dt>
<dd itemprop="name">{{ resource.title|truncatechars:80 }}</dd>
{% endif %}
{% if resource.srid and SRID_DETAIL == 'above' %}
<dt>{% trans "SRID" %}</dt>
<dd>{{ resource.srid }}</dd>
{% endif %}
{% if LICENSES_ENABLED and LICENSES_DETAIL == 'above' and resource.license %}
<dt>{% trans "License" %}</dt>
<dd itemprop="license">{{ resource.license.name_long }} <a href="#license-more-above" data-toggle="collapse" data-target=".license-more-above"><i class="fa fa-info-circle"></i></a></dd>
{% endif %}
<dd class="license-more-above collapse">
{% for bullet in resource.license.description_bullets %}
{{ bullet }}<br/><br/>
{% endfor %}
{% if resource.license.url %}
+ {% trans "For more info see" %} <a href="{{ resource.license.url }}">{{ resource.license.url }}</a>.
{% endif %}
</dd>
{% if resource.abstract %}
<dt>{% trans "Abstract" %}</dt>
<dd itemprop="description">{{ resource.abstract|escape|urlize|linebreaks|safe|truncatechars:500 }}</dd>
{% endif %}
{% if resource.date %}
<dt>{% trans resource.date_type|title %} {% trans "Date" %}</dt>
{% if resource.date_type == 'creation' %}
<dd itemprop="dateCreated" datetime="{{ resource.date|date:"c"}}">{{ resource.date }}</dd>
{% elif resource.date_type == 'publication' %}
<dd itemprop="datePublished" datetime="{{ resource.date|date:"c"}}">{{ resource.date }}</dd>
{% else %}
<dd itemprop="dateModified" datetime="{{ resource.date|date:"c"}}">{{ resource.date }}</dd>
{% endif %}
{% endif %}
{% if resource.display_type %}
<dt>{% trans "Type" %}</dt>
<dd>{{ resource.display_type }}</dd>
{% endif %}
{% if resource.keywords.count > 0 or resource.tkeywords.count > 0 %}
<dt>{% trans "Keywords" %}</dt>
<dd itemprop="keywords">
{% for keyword in resource.keywords.all %}
<a itemscope itemtype="http://schema.org/Text" href="{% url "search" %}?keywords__slug__in={{ keyword.slug }}" >
{{ keyword.name }}
</a>
{% if not forloop.last %},{% endif %}
{% endfor %}
{% if THESAURI_FILTERS %}
{% if resource.tkeywords.count > 0 %}
{% get_current_language as LANGUAGE_CODE %}
{% for keyword in resource.tkeywords.all %}
<a itemscope itemtype="http://schema.org/Text" href="{% url "search" %}?tkeywords__id__in={{ keyword.id }}">
{% for label in keyword.labels %}
{% if forloop.first %},{% endif %}
{% if label.lang == LANGUAGE_CODE %}
{{ label }}
{% endif %}
{% endfor %}
</a>
{% endfor %}
{% endif %}
{% endif %}
</dd>
{% endif %}
{% if resource.category %}
<dt>{% trans "Category" %}</dt>
<dd><a href="{% url "search" %}?category__identifier__in={{ resource.category.identifier }}">{{ resource.category }}</a> {% if resource.category.description %}<a href="#category-more" data-toggle="collapse" data-target=".category-more"><i class="fa fa-info-circle"></i></a>{% endif %}</dd>
{% if resource.category.description %}
<dd class="category-more collapse">
{{ resource.category.description }}
</dd>
{% endif %}
{% endif %}
{% if resource.regions.all %}
<dt>{% trans "Regions" %}</dt>
<dd itemprop="keywords">
{% for region in resource.regions.all %}
<a itemscope itemtype="http://schema.org/Text" href="{% url "search" %}?regions__name__in={{ region.name }}">
{{ region.name }}
</a>
{% if not forloop.last %},{% endif %}
{% endfor %}
</dd>
{% endif %}
{% if resource.owner %}
<dt>{% trans "Owner" %}</dt>
<!-- <dd><a itemprop="author" href="{{ resource.owner.get_absolute_url }}">Resilience Academy</a></dd> -->
<!--<dd><a itemprop="author" href="#">{{resource.owner}}</a></dd>-->
{% if resource.group %}
<!--<dt>{% trans "Group" %}</dt>-->
<dd><a href="/groups/group/{{ resource.group.name }}/activity/">{{ group }}</a> </dd>
{% endif %}
{% endif %}
{% if resource.poc.user %}
<dt>{% trans "Point of Contact" %}</dt>
<dd><a href="{{ resource.poc.user.get_absolute_url }}">{{ resource.owner.username}}</a></dd>
{% endif %}
<!--{% if resource.group %}
<dt>{% trans "Group" %}</dt>
<dd><a href="/groups/group/{{ resource.group.name }}/activity/">{{ group }}</a> </dd>
{% endif %}-->
</dl>
<dl class="dl-horizontal">
<dt><a href="#more" data-toggle="collapse" data-target=".more">{% trans "More info" %}</a></dt>
<dd>-</dd>
</dl>
<dl class="dl-horizontal">
<div class="more collapse">
{% if resource.srid and SRID_DETAIL == 'below' %}
<dt>{% trans "SRID" %}</dt>
<dd>{{ resource.srid }}</dd>
{% endif %}
{% if LICENSES_ENABLED and LICENSES_DETAIL == 'below' and resource.license %}
<dt>{% trans "License" %}</dt>
<dd>{{ resource.license.name_long }} <a href="#license-more-below" data-toggle="collapse" data-target=".license-more-below"><i class="fa fa-info-circle"></i></a></dd>
<dd class="license-more-below collapse">
{% for bullet in resource.license.description_bullets %}
{{ bullet }}<br/><br/>
{% endfor %}
{% if resource.license.url %}
+ {% trans "For more info see" %} <a href="{{ resource.license.url }}">{{ resource.license.url }}</a>.
{% endif %}
</dd>
{% endif %}
{% if resource.maintenance_frequency %}
<dt>{% trans "Maintenance Frequency" %}</dt>
<dd>{{ resource.maintenance_frequency_title }}</dd>
{% endif %}
{% if resource.restriction_code_type or resource.constraints_other %}
<dt>{% trans "Restrictions" %}</dt>
<dd>{% if resource.constraints_other %}
{{ resource.constraints_other }}
{% else %}
{{ resource.restriction_code_type }}
{% endif %}</dd>
{% endif %}
{% if resource.edition %}
<dt>{% trans "Edition" %}</dt>
<dd>{{ resource.edition}}</dd>
{% endif %}
{% if resource.purpose %}
<dt>{% trans "Purpose" %}</dt>
<dd>{{ resource.purpose|escape|urlize|linebreaks|safe|truncatechars:160 }}</dd>
{% endif %}
{% if resource.language %}
<dt>{% trans "Language" %}</dt>
<dd>{{ resource.language_title }}</dd>
{% endif %}
{% if resource.temporal_extent_start and resource.temporal_extent_end %}
<dt>{% trans "Temporal Extent" %}</dt>
<dd>{{ resource.temporal_extent_start }} - {{ resource.temporal_extent_end }}</dd>
{% endif %}
{% if resource.data_quality_statement %}
<dt>{% trans "Data Quality" %}</dt>
<dd>{{ resource.data_quality_statement }}</dd>
{% endif %}
{% if resource.supplemental_information %}
<dt>{% trans "Supplemental Information" %}</dt>
<dd>{{ resource.supplemental_information|truncatechars:160|escape|urlize|linebreaks|safe }}</dd>
{% endif %}
{% if resource.spatial_representation_type %}
<dt>{% trans "Spatial Representation Type" %}</dt>
<dd>{{ resource.spatial_representation_type }}</dd>
{% endif %}
</div>
</dl>
{% endblock %}