{% extends 'app_admin/base.html' %}

{% load i18n static localcosmos_tags%}

{% block extra_head_script %}
	<link rel="stylesheet" href="{% static 'maps/leaflet/leaflet.css' %}" />
	<script src="{% static 'maps/leaflet/leaflet.js' %}"></script>
	<script src="{% static 'maps/MapManager.js' %}"></script>
{% endblock %}

{% block content %}
	<div class="container">
		<div class="row">
			<div class="col-12">
				<h2>{% trans 'Observation' %} #{{ dataset.id }}</h2>
				{% trans 'by' %}
				{% if dataset.user %}
					{{ dataset.user }}
				{% else %}
					{% trans 'anonymous user' %}
				{% endif %}
				<div>
					<small>
						{% if dataset.user.first_name %}
							{{ dataset.user.first_name }}
						{% endif %}
						{% if dataset.user.last_name %}
							{{ dataset.user.last_name }}
						{% endif %}
					</small>
				</div>
				
				{% if dataset.user %}
					<div>
						<a href="mailto:{{ dataset.user.email }}">
							{% trans 'contact user' %}
						</a>
					</div>					
				{% endif %}
			</div>
		</div>
		<hr>
		<div class="row mt-3 mb-5">
			<div id="ctype-{{ dataset|ctype_id }}-{{ dataset.id }}" class="col-12">
				{% include 'datasets/validation/ajax/dataset_form.html' %}
			</div>
		</div>
	</div>
{% endblock %}
