{% load i18n localcosmos_tags %}
<div class="card">
	<div class="card-body">
		<h5 class="card-title">
			{% if dataset.taxon_latname %}
				{% get_app_vernacular dataset.taxon as vernacular %}
				{% if vernacular %}
					{{ vernacular }} ({{ dataset.taxon_latname }})
				{% else %}
					{{ dataset.taxon_latname }}
				{% endif %}
			{% else %}
				{% trans 'Observation without taxon' %}
			{% endif %}
		</h5>
		<div class="text-muted">
			{% trans 'observed at' %}: <h6 class="card-subtitle mb-2">{{ dataset.timestamp }}</h6>
		</div>
		<div class="text-muted">
			{% trans 'submitted at' %}: <h6 class="card-subtitle mb-2">{{ dataset.created_at }}</h6>
		</div>
		
		<p class="card-text">
			{% if dataset.validation_step == 'completed' %}
				{% if dataset.is_valid %}
					<span class="badge badge-success">{% trans 'valid' %}</span>
				{% else %}
					<span class="badge badge-danger">{% trans 'invalid' %}</span>
				{% endif %}
			{% else %}
				
			{% endif %}
			<div class="mt-2">
				{% trans 'observed by' %}:
				{% if dataset.user %}
					{{ dataset.user }}
				{% else %}
					{% trans 'Anonymous user' %}
				{% endif %}
			</div>
		</p>
		{% block links %}
			<a href="{% url 'datasets:edit_dataset' request.app.uid dataset.id %}" class="btn btn-sm btn-outline-primary">{% trans 'Show' %}</a>
		{% endblock %}
	</div>
</div>
