-
Notifications
You must be signed in to change notification settings - Fork 12
/
display.html
693 lines (683 loc) · 30.9 KB
/
display.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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
{% extends theme('layouts/1-column.html') %}
{% from theme('macros/dataset_information.html') import information_col, information_section, information_accordion %}
{% from theme('macros/follow.html') import follow_btn with context %}
{% from theme('macros/integrate.html') import integrate_btn with context %}
{% from theme('macros/paginator.html') import paginator with context %}
{% from theme('macros/breadcrumb.html') import breadcrumb with context %}
{% from theme('macros/banner_info.html') import banner_info %}
{% from theme('macros/banner_warning.html') import banner_warning %}
{% from theme('macros/quality_score_with_warning_below.html') import quality_score_with_warning_below %}
## FIXME: remove inspire:indentifier robots condition when geo.data.gouv.fr is shutdown
{% set meta = {
'title': dataset.full_title,
'description': dataset.description|mdstrip(60)|forceescape,
'image': dataset.organization and dataset.organization.logo(external=True) or '',
'keywords': [_('dataset')] + dataset.tags,
'robots': 'noindex, ' if dataset.is_hidden or 'inspire:identifier' in dataset.extras else '',
} %}
{% set bundle = 'dataset' %}
{% set body_class = 'dataset-display' %}
{% set community_subtitle = _('Explore with %(certifier)s', certifier=config.SITE_TITLE ) %}
{% set read_only_mode = config.READ_ONLY_MODE %}
{# Harvesting source #}
{% block extra_head %}
{% cache cache_duration, 'dataset-extra-head', dataset.id|string, g.lang_code, dataset.last_modified|string %}
<link rel="canonical" href="{{ url_for('datasets.show', dataset=dataset) }}" />
<link rel="alternate" type="application/json+oembed" href="{{ url_for('api.oembed', url=dataset.external_url) }}"
title="{{ dataset.title | urlencode }}" />
{% endcache %}
{% endblock %}
{% block breadcrumb %}
{% cache cache_duration, 'dataset-breadcrumb', dataset.id|string, g.lang_code, dataset.last_modified|string %}
<li>
<a class="fr-breadcrumb__link" href="{{ url_for('datasets.list') }}">
{{ _('Datasets') }}
</a>
</li>
<li>
<a class="fr-breadcrumb__link" aria-current="page">
{{ dataset.acronym or dataset.title|truncate(128) }}
</a>
</li>
{% endcache %}
{% endblock %}
{% block toolbar %}
{{ follow_btn(dataset) }}
{{ hook('dataset.display.explore-button') }}
{% if can_edit %}
<div class="fr-col-auto fr-ml-3v">
<a
class="fr-btn fr-btn--sm fr-btn--secondary fr-btn--secondary-warning-425 fr-icon-pencil-line fr-btn--icon-left"
href="{{ url_for('admin.index', path='dataset/{id}/'.format(id=dataset.id)) }}"
>
{{ _('Edit') }}
</a>
</div>
{% endif %}
{% endblock %}
{% block content %}
{% cache cache_duration, 'dataset-content', dataset.id|string, reuses.page|string, g.lang_code, current_user.slug or 'anonymous', dataset.last_modified|string %}
{{ breadcrumb(self) }}
<div class="content fr-container fr-mb-10v">
{% if dataset.private or dataset.deleted or dataset.archived %}
<div class="fr-grid-row">
{% if dataset.private %}
<div class="fr-col-auto fr-mr-1w">
<p class="fr-tag"
title="{{ _('This dataset is private and will not be visible by other users') }}">{{ _('Private') }}
</p>
</div>
{% endif %}
{% if dataset.deleted %}
<div class="fr-col-auto fr-mr-1w">
<p class="fr-tag"
title="{{ _('This dataset has been deleted. This will be permanent in the next 24 hours') }}">{{ _('Deleted') }}
</p>
</div>
{% endif %}
{% if dataset.archived %}
{% set title = _('This dataset has been archived automatically because it has been deleted from the remote platform.')
if dataset.harvest and dataset.harvest.archived == 'not-on-remote' else
_('This dataset has been archived.') %}
<div class="fr-col-auto fr-mr-1w">
<p class="fr-tag" title="{{ title }}">
{{ _('Archived') }}
</p>
</div>
{% endif %}
</div>
{% endif %}
<div class="fr-grid-row fr-grid-row--gutters vuejs">
<section class="fr-col-12 fr-col-md-8">
<h1 class="fr-mb-5v fr-h3">
{{ dataset.title }}
{% if dataset.acronym %}<small>{{ dataset.acronym }}</small>{% endif %}
</h1>
<h2 id="description" class="subtitle fr-mb-1w">{{ _('Description') }}</h2>
<read-more max-height="description" class="fr-mb-n1w">
<markdown-viewer data-content="{{dataset.description|to_json}}"></markdown-viewer>
</read-more>
<noscript>{{ dataset.description | markdown }}</noscript>
</section>
<section class="fr-col-12 fr-col-md-4" data-read-more-max-height="description">
{% if sysadmin %}
<div class="fr-m-0">
<featured-button subject-id="{{ dataset.id }}" subject-type="dataset" :featured="{{ dataset.featured|tojson|safe }}"></featured-button>
</div>
{% endif %}
{% if dataset.organization %}
<h2 id="producer" class="subtitle fr-mb-1v">{{ _('Producer') }}</h2>
{% with organization=dataset.organization, producer_type='organization' %}
{% include theme('organization/producer-name-with-logo.html') %}
{% endwith %}
{% elif dataset.owner %}
<h2 id="author" class="subtitle fr-mb-1w">{{ _('Author') }}</h2>
{% with organization=dataset.owner, producer_type='owner' %}
{% include theme('organization/producer-name-with-logo.html') %}
{% endwith %}
<p class="well well-grey-100 fr-py-3v fr-my-3v">
{% trans
date=dataset.created_at|dateformat(format='long'),
update=dataset.last_modified|dateformat(format='long'),
author=dataset.owner.fullname
%}This dataset has been published on the initiative and under the responsibility of
{{author}}<br />Published on {{date}} and updated on {{update}}{% endtrans %}
</p>
{% endif %}
{% if external_source(dataset) %}
<div class="fr-my-3v fr-text--sm">
{{ banner_info(
"fr-icon-external-link-line",
_("This dataset come from an external portal. <a href='{external_source}'>View the original source.</a>")
.format(external_source=external_source(dataset))
)}}
</div>
{% endif %}
{# FIXME: remove when geo.data.gouv.fr is shutdown #}
{% if 'geop:dataset_id' in dataset.extras %}
<p class="well well-warning fr-py-3v fr-my-3v fr-text--sm">
⚠️ {{ _("This dataset is handled by the <a href='{geo_link}'>geo.data.gouv.fr</a> platform.
This platform is not actively maintained and as a result, you may find some bogus data or metadata.
More information about <a href='{blog_link}'>the shutdown of geo.data.gouv.fr is available here.</a>").format(
geo_link='https://geo.data.gouv.fr',
blog_link='https://www.data.gouv.fr/fr/posts/extinction-de-geo-data-gouv-fr/'
)}}
</p>
{% endif %}
<div class="fr-my-3v fr-text--sm">
{{ hook('dataset.display.transport-banner') }}
</div>
<h2 class="subtitle fr-mt-3v fr-mb-1v">{{ _('Latest update') }}</h2>
<p class="fr-text--sm fr-mt-0 fr-mb-3v">
{{ dataset.last_update|dateformat(format='long') }}
</p>
{% if dataset.license %}
<h2 class="subtitle fr-mt-3v fr-mb-1v">{{ _('License') }}</h2>
<p class="fr-text--sm fr-mt-0 fr-mb-3v">
<code class="bg-alt-grey fr-px-1v text-grey-380">
{% if dataset.license.url %}<a href="{{ dataset.license.url }}">{% endif %}
{{ dataset.license.title }}
{% if dataset.license.url %}</a>{% endif %}
</code>
</p>
{% endif %}
{{quality_score_with_warning_below(dataset)}}
</section>
</div>
</div>
<div class="fr-mb-10v">
{{ hook('dataset.display.after-description') }}
</div>
<div class="fr-tabs fr-tabs--full-page">
<div class="fr-container">
<ul class="fr-tabs__list" role="tablist" aria-label="{{ _('In-page navigation') }}">
<li role="presentation">
{% set count_resources = dataset.resources | length %}
<button
id="resources"
class="fr-tabs__tab"
tabindex="0"
role="tab"
{% if is_current_tab(request, "reuses_page") %}
aria-selected="false"
{% else %}
aria-selected="true"
{% endif %}
aria-controls="resources-panel"
data-update-url="resources"
data-previous-url="resource-"
>
{{ _('Files') }}
<sup>{{count_resources}}</sup>
</button>
</li>
<li role="presentation">
<button
id="community-reuses"
class="fr-tabs__tab"
tabindex="-1"
role="tab"
{% if is_current_tab(request, "reuses_page") %}
aria-selected="true"
{% else %}
aria-selected="false"
{% endif %}
aria-controls="community-reuses-panel"
data-update-url="community-reuses"
>
{{ _('Reuses') }}
<sup>{{ total_reuses }}</sup>
</button>
</li>
<li role="presentation">
<button
id="discussions"
class="fr-tabs__tab"
tabindex="-1"
role="tab"
aria-selected="false"
aria-controls="discussions-panel"
data-update-url="discussions"
data-previous-url="discussion-"
>
{{_('Discussions')}}
<sup>{{ dataset.metrics.discussions or 0 }}</sup>
</button>
</li>
<li role="presentation">
<button
id="community-resources"
class="fr-tabs__tab"
tabindex="-1"
role="tab"
aria-selected="false"
aria-controls="community-resources-panel"
data-update-url="community-resources"
>
{{ _('Community resources') }}
<sup>{{ dataset.community_resources|length }}</sup>
</button>
</li>
<li role="presentation">
<button
id="information"
class="fr-tabs__tab"
tabindex="-1"
role="tab"
aria-selected="false"
aria-controls="information-panel"
data-update-url="information"
>
{{ _("Information") }}
</button>
</li>
</ul>
<ul class="fr-tabs__list" role="navigation" aria-label="{{ _('In-page navigation') }}">
<li role="presentation">
{% set count_resources = dataset.resources | length %}
<a
id="resources"
class="fr-tabs__tab"
href="#resources-panel"
>
{{ _('Files') }}
<sup>{{count_resources}}</sup>
</a>
</li>
<li role="presentation">
<a
id="community-reuses"
class="fr-tabs__tab"
href="#community-reuses-panel"
>
{{ _('Reuses') }}
<sup>{{ total_reuses }}</sup>
</a>
</li>
<li role="presentation">
<a
id="discussions"
class="fr-tabs__tab"
href="#discussions-panel"
>
{{_('Discussions')}}
<sup>{{ dataset.metrics.discussions or 0 }}</sup>
</a>
</li>
<li role="presentation">
<a
id="community-resources"
class="fr-tabs__tab"
href="#community-resources-panel"
>
{{ _('Community resources') }}
<sup>{{ dataset.community_resources|length }}</sup>
</a>
</li>
<li role="presentation">
<a
id="information"
class="fr-tabs__tab"
href="#information-panel"
>
{{ _("Information") }}
</a>
</li>
</ul>
</div>
<div
id="resources-panel"
class="fr-tabs__panel"
role="tabpanel"
aria-labelledby="resources"
tabindex="0"
>
<div class="fr-container">
<div class="ressources-files vuejs fr-mb-5v">
<dataset-resource-from-hash
dataset-id="{{ dataset.id }}"
type-label="{{ type_label }}"
:can-edit="{{ can_edit.can()|tojson|safe }}"
></dataset-resource-from-hash>
{% set show_all_resources = request.args.get('resources') == 'all' %}
{% set grouped_resources = dataset.resources|group_resources_by_type %}
{% set nb_groups = grouped_resources.keys()|length %}
{% set has_multiple_groups = nb_groups > 1 %}
{% set resources_per_page = config.RESOURCES_DEFAULT_PAGE_SIZE %}
{% for (type, type_label), resources in grouped_resources.items() %}
<dataset-resources
dataset-id="{{ dataset.id }}"
type="{{ type }}"
type-label="{{ type_label }}"
:can-edit="{{ can_edit.can()|tojson|safe }}"
:show-total="{{ has_multiple_groups|tojson|safe }}"
:first-group="{{loop.first|tojson|safe}}"
>
</dataset-resources>
<noscript>
<h2 class="fr-mt-4w fr-mb-1w subtitle subtitle--uppercase">
{{ type_label }} {% if has_multiple_groups %}<sup>{{resources|length }}</sup>{% endif %}
</h2>
{% set max_resources_to_show = resources_per_page if not show_all_resources else resources|length %}
{% for resource in resources[:max_resources_to_show] %}
{% include theme('dataset/resource/card.html') %}
{% endfor %}
{% if resources|length > resources_per_page and not show_all_resources %}
<a class="fr-btn fr-btn--secondary fr-mt-2w" href="?resources=all">
{{ _('See the %(type)s', type=type_label|lower) }}
</a>
{% endif %}
</noscript>
{% else %}
<div class="fr-grid-row flex-direction-column fr-grid-row--middle fr-mt-5w">
{% include theme('svg/blank_state/resource.svg') %}
<p class="fr-h6 fr-mt-2w fr-mb-5v text-center">
{{ _('There are no files for this dataset yet.') }}
</p>
{% if can_edit %}
<p>
<a
class="fr-btn"
href="{{ url_for('admin.index', path='dataset/{id}/'.format(id=dataset.id)) }}"
>
{{ _('Add a file') }}
</a>
</p>
{% endif %}
</div>
{% endfor %}
</div>
{{ hook('dataset.display.after-files') }}
</div>
</div>
<div
id="community-reuses-panel"
class="fr-tabs__panel"
role="tabpanel"
aria-labelledby="community-reuses"
tabindex="0"
>
<div class="fr-container">
{{ hook('dataset.display.after-reuses') }}
{% if reuses|length %}
<div class="fr-grid-row fr-mb-3v">
<h2 class="subtitle subtitle--uppercase fr-col">{{ ngettext('%(num)d Reuse', '%(num)d Reuses', total_reuses) }}</h2>
{% if not read_only_mode %}
<div class="fr-col-12 fr-col-sm-6 fr-col-md-5 fr-col-lg-4 text-align-right">
<a class="fr-btn fr-btn--sm fr-btn--secondary fr-btn--secondary-grey-500 fr-icon-add-line fr-btn--icon-left"
href="{{ url_for('admin.index', path='reuse/new/', **{'dataset_id': dataset.id}) }}">
{{ _('Add a reuse') }}
</a>
</div>
{% endif %}
</div>
<div class="fr-grid-row fr-grid-row--gutters">
{% for reuse in reuses %}
<div class="fr-mb-3v fr-col-lg-3 fr-col-sm-6 fr-col-12">
{% include theme('reuse/card.html') %}
</div>
{% endfor %}
</div>
{{ paginator(reuses, arg_name='reuses_page', url='#community-reuses') }}
{% else %}
<div class="fr-grid-row flex-direction-column fr-grid-row--middle fr-mt-5w">
{% include theme('svg/blank_state/reuse.svg') %}
<p class="fr-h6 fr-mt-2w fr-mb-5v text-center">
{{ _('There are no reuses for this dataset yet.') }}
</p>
<p>
<a
class="fr-btn"
href="{{ url_for('admin.index', path='reuse/new/', **{'dataset_id': dataset.id}) }}"
>
{{ _('Publish a reuse') }}
</a>
<a
class="fr-btn fr-btn--secondary fr-btn--secondary-grey-500 fr-ml-1w"
href="{{ config.GUIDES_REUSE_URL }}"
>
{{ _("What's a reuse ?") }}
</a>
</p>
</div>
{% endif %}
</div>
</div>
<div
id="discussions-panel"
class="fr-tabs__panel"
role="tabpanel"
aria-labelledby="discussions"
tabindex="0"
>
<div class="fr-container vuejs">
{% if not dataset.metrics.discussions %}
<div class="fr-grid-row flex-direction-column fr-grid-row--middle fr-mt-5w" data-no-discussion>
{% include theme('svg/blank_state/discussion.svg') %}
<p class="fr-h6 fr-mt-2w fr-mb-5v text-center">
{{ _('There are no discussions for this dataset yet.') }}
</p>
</div>
{% endif %}
<discussion-threads
ref="discussions"
subject-id="{{ dataset.id }}"
subject-class="{{ dataset.__class__.__name__ }}"
>
</discussion-threads>
</div>
</div>
<div
id="community-resources-panel"
class="fr-tabs__panel"
role="tabpanel"
aria-labelledby="community-resources"
tabindex="0"
>
<div class="fr-container">
{% if dataset.community_resources|length %}
<div class="fr-mb-3v">
{{ banner_warning(
"fr-icon-alert-line",
_("These resources are published by the community and the producer isn't responsible for them.")
)}}
</div>
<div class="resource-list vuejs">
<dataset-resources
dataset-id="{{ dataset.id }}"
type="community"
type-label="{{ ngettext('%(num)d Community resource', '%(num)d Community resources', dataset.community_resources|length) }}"
:can-edit-resources='{{ dataset.community_resources|permissions|tojson|safe }}'
:first-group="true"
>
</dataset-resources>
<noscript>
{% for resource in dataset.community_resources %}
{% include theme('dataset/resource/card.html') %}
{% endfor %}
</noscript>
</div>
{% else %}
<div class="fr-grid-row flex-direction-column fr-grid-row--middle fr-mt-5w">
{% include theme('svg/blank_state/resource.svg') %}
<p class="fr-h6 fr-mt-2w fr-mb-5v text-center">
{{ _('There are no community resources for this dataset yet.') }}
</p>
<p>
<a
class="fr-btn"
href="{{ url_for('admin.index', path='community-resource/new/', **{'dataset_id': dataset.id}) }}"
>
{{ _('Share your resources') }}
</a>
<a
class="fr-btn fr-btn--secondary fr-btn--secondary-grey-500 fr-ml-1w"
href="{{ config.GUIDES_COMMUNITY_URL }}"
>
{{ _('Learn more about the community') }}
</a>
</p>
</div>
{% endif %}
</div>
</div>
<div
id="information-panel"
class="fr-tabs__panel"
role="tabpanel"
aria-labelledby="information"
tabindex="0"
>
<div class="fr-container">
{% call() information_section(_('Information')) %}
<h3 class="subtitle fr-mb-1v">{{_('Tags')}}</h3>
{% if dataset.tags %}
<ul class="fr-tags-group fr-mb-3v">
{% for tag in dataset.tags %}
<li>
<a
href="{{ url_for('datasets.list', tag=tag) }}"
title="{{ tag }}"
class="fr-tag fr-tag--sm"
>
{{ tag|truncate(35, True) }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
<div class="fr-grid-row fr-grid-row--gutters">
{% if dataset.license %}
{% call() information_col(_('License')) %}
<code class="bg-alt-grey fr-px-1v text-grey-380">
{% if dataset.license.url %}<a href="{{ dataset.license.url }}">{% endif %}
{{ dataset.license.title }}
{% if dataset.license.url %}</a>{% endif %}
</code>
{% endcall %}
{% endif %}
{% call() information_col(_('ID')) %}
{{dataset.id}}
{% endcall %}
{% if external_source(dataset) %}
{% call() information_col(_('Remote source'), 'text-overflow-ellipsis') %}
<a rel="" href="{{ external_source(dataset) }}">{{external_source(dataset)}}</a>
{% endcall %}
{% endif %}
</div>
{% endcall %}
{% call() information_section(_('Temporality')) %}
<div class="fr-grid-row fr-grid-row--gutters">
{% call() information_col(_('Creation')) %}
{{dataset.created_at|dateformat(format='long')}}
{% endcall %}
{% if dataset.frequency %}
{% call() information_col(_('Frequency')) %}
{{dataset.frequency_label}}
{% endcall %}
{% endif %}
{% if dataset.temporal_coverage %}
{% call() information_col(_('Temporal coverage')) %}
{{dataset.temporal_coverage|daterange(details=True)}}
{% endcall %}
{% endif %}
</div>
<div class="fr-grid-row fr-grid-row--gutters">
{% call() information_col(_('Latest update')) %}
{{ dataset.last_update|dateformat(format='long') }}
{% endcall %}
</div>
{% endcall %}
{% if dataset.spatial %}
{% call() information_section(_('Spatial coverage')) %}
<div class="fr-grid-row fr-grid-row--gutters">
{% if dataset.spatial.zones %}
{% call() information_col(_('Territorial coverage')) %}
{% for zone in dataset.spatial.zones %}
{{zone.name}}{% if not loop.last %},{% endif %}
{% endfor %}
{% endcall %}
{% endif %}
{% if dataset.spatial.granularity %}
{% call() information_col(_('Territorial coverage granularity')) %}
{{dataset.spatial.granularity_label}}
{% endcall %}
{% endif %}
</div>
{% endcall %}
{% endif %}
{% set schemas = dataset.resources|group_resources_by_schema%}
{% if schemas|length %}
{% call() information_section(_('Data schema')) %}
{% for name in schemas %}
<div class="fr-grid-row fr-grid-row--gutters fr-grid-row--middle">
<div class="fr-col">
<div class="fr-grid-row fr-grid-row--middle fr-mb-1w">
<p class="fr-text--xs fr-m-0">{{_('The dataset files are following the schema: ')}}</p>
<p class="fr-tag fr-tag--sm fr-icon-checkbox-circle-line fr-tag--icon-left">
{{name}}
</p>
</div>
<p class="fr-text--xs fr-m-0">
{{_('Schemas allow to describe data models,
discover how schemas improve your data quality and the available use cases
on <a href="{url}">schema.data.gouv.fr</a>')
.format(url=config.SCHEMA_DOCUMENTATION_URL)}}
</p>
</div>
<div class="fr-col-auto">
<a
class="fr-btn fr-btn--secondary fr-btn--secondary-grey-500 fr-btn--icon-left fr-icon-book-2-line"
href="{{config.SCHEMA_DOCUMENTATION_URL}}{{name}}"
>
{{ _('See schema documentation') }}
</a>
</div>
</div>
{% endfor %}
{% endcall %}
{% endif %}
{% call() information_section(_('Actions')) %}
<h3 class="subtitle fr-mb-1v">{{_('Embed')}}</h3>
{{integrate_btn(dataset)}}
{% endcall %}
{% if dataset.extras %}
{% call(slot) information_accordion(_('Extras')) %}
{% if slot == "button" %}
<button
data-accordion-button
role="button"
id="extras-accordion-button"
aria-controls="extras-accordion"
class="fr-btn fr-btn--tertiary-no-outline fr-btn--icon-left fr-btn--secondary-grey-500 accordion-button"
>
{{ _('See extras') }}
</button>
{% else %}
<div class="accordion-content" id="extras-accordion" aria-labelledby="extras-accordion-button">
{% call() information_section() %}
<div class="fr-grid-row fr-grid-row--gutters">
{% for extra_name, extra_value in dataset.extras.items() %}
{% call() information_col(extra_name) %}
{{extra_value}}
{% endcall %}
{% endfor %}
</div>
{% endcall %}
</div>
{% endif %}
{% endcall %}
{% endif %}
{% if dataset.harvest %}
{% call(slot) information_accordion(_('Harvest')) %}
{% if slot == "button" %}
<button
data-accordion-button
role="button"
id="harvest-extras-accordion-button"
aria-controls="harvest-extras-accordion"
class="fr-btn fr-btn--tertiary-no-outline fr-btn--icon-left fr-btn--secondary-grey-500 accordion-button"
>
{{ _('See harvest extras') }}
</button>
{% else %}
<div class="accordion-content" id="harvest-extras-accordion" aria-labelledby="harvest-extras-accordion-button">
{% call() information_section() %}
<div class="fr-grid-row fr-grid-row--gutters">
{% for harvest_extra_name, harvest_extra_value in dataset.harvest._data.items() %}
{% call() information_col(harvest_extra_name) %}
{{harvest_extra_value}}
{% endcall %}
{% endfor %}
</div>
{% endcall %}
</div>
{% endif %}
{% endcall %}
{% endif %}
{{ hook('dataset.display.metrics') }}
</div>
</div>
</div>
{% endcache %}
{% endblock %}