{% extends "base.html.twig" %}
{% block css %}
<link id="bsdp-css" href="https://unpkg.com/bootstrap-datepicker@1.9.0/dist/css/bootstrap-datepicker3.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/@yaireo/tagify@3.7.3/dist/tagify.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.css" />
{% endblock %}
{% block title %} {{ 'Soortenlijst'|trans }} {% if app.request.locale == 'nl' %}{{ title.namenl }}{% else %}{{ title.nameen }}{% endif %} {% endblock %}
{% block body %}
<p> </p>
<div class="row flex-md-row h-md-250 position-relative">
<div class="col-md-9 position-static">
<!-- Begin Page Content -->
{% if type == 'epoch' or type == 'stage' %}
{% for parent in parents %}
<a href="{{ path('specieslist_item', { 'type': parent.type, 'id': parent.id })}}">< {% if app.request.locale == 'nl' %}{{ parent.namenl }}{% else %}{{ parent.nameen }}{% endif %}</a>
{% endfor %}
<br>
{% endif %}
{% if type == 'era' or type == 'epoch' or type == 'stage' %}
<picture>
<source media="(min-width: 1200px)" srcset="/images/bar/era/{{ periodname }}.png">
<source media="(min-width: 992px)" srcset="/images/bar/era/{{ periodname }}.png">
<source media="(min-width: 768px)" srcset="/images/bar/era/{{ periodname }}.png">
<source media="(min-width: 576px)" srcset="/images/bar/era/{{ periodname }}_small.png">
<source media="(max-width: 575px)" srcset="/images/bar/era/{{ periodname }}_small.png">
<img src="/images/default.png" alt="Era" style="width:auto;" >
</picture>
{% endif %}
<h2>{{ 'Soortenlijst'|trans }}
{% if type == 'location' %}<a href="{{ path('locations_fossil', { 'id': title.id })}}">
{% elseif type == 'era' %}<a href="{{ path('glossary', { 'id': title.glossary.id, 'url': title.glossary.url })}}">
{% endif %}
{% if app.request.locale == 'nl' %}{{ title.namenl }}{% else %}{{ title.nameen }}{% endif %}
</a>
</h2>
<p></p>
<p>
{{ 'Wil je fossielen toevoegen aan de Fossielendatabase dat kan op <a href="{link}">deze pagina<a>.'|trans({'{link}' : path('fossildb_add')})|raw }}</p>
</p>
{% for taxanomy_item in taxonomies %}
<div class="row">
<div class="col-sm-12">
{% if taxanomy_item.taxanomy is not null %}<a href="{{ path('specieslist_species',{ 'type' : type, 'id' : id, 'taxanomyid' : taxanomy_item.taxanomy.id }) }}"><img src="/images/icons/fossil/has_{{ taxanomy_item.taxanomy.namescientific|lower }}{{ taxanomy_item.taxanomy.namescientificclarification }}.png">{% if app.request.locale == 'nl' %}{{ taxanomy_item.taxanomy.namenl }}{% else %}{{ taxanomy_item.taxanomy.nameen }}{% endif %}</a>{#{% else %}<a href="{{ path('specieslist_species',{ 'type' : type, 'id' : id, 'taxanomyid' : 0 }) }}"><img src="/images/icons/fossil/has_incertae sedis.png">Incerta Sedis ({{ 'Onbekend'|trans }})</a>#}{% endif %}
</div>
</div>
<p></p>
{% endfor %}
<!-- END Page Content -->
</div>
{% include 'sidebar.html.twig' %}
</div>
{% endblock %}
{% block javascript %}
<script src="https://cdn.jsdelivr.net/autocomplete.js/0/autocomplete.jquery.min.js"></script>
<script src="https://unpkg.com/bootstrap-datepicker@1.9.0/dist/js/bootstrap-datepicker.min.js"></script>
<script>
jQuery(document).ready(function() {
$('.js-datepicker').datepicker({
calendarWeeks: true,
autoclose: true,
clearBtn: true,
todayHighlight: true,
format: "dd-mm-yyyy",
});
$('.js-autocomplete').each(function() {
var autocompleteUrl = $(this).data('autocomplete-url');
$(this).autocomplete({hint: false}, [
{
source: function(query, cb) {
$.ajax({
url: autocompleteUrl+'?query='+query,
}).then(function(data) {
cb(data.pages);
});
},
displayKey: 'id',
name: 'page',
debounce: 500 // only request every 1/2 second
}
])
});
});
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.min.js"></script>
<script>
$(document).on('click', '[data-toggle="lightbox"]', function(event) {
event.preventDefault();
$(this).ekkoLightbox({
wrapping: true,
});
});
</script>
{% endblock %}