{% extends "app/logged_in_base.html" %}
{% load i18n %}
{% load render_bundle from webpack_loader %}

{% block content %}
	{% if no_processingnodes %}
		<h3>{% trans 'Welcome!' %}</h3>
	{% else %}
		<h3>{% trans 'Dashboard' %}</h3>
	{% endif %}
	
	{% if no_processingnodes %}
		{% trans 'Add a Processing Node' as add_processing_node %}
		{% with nodeodm_link='<a href="https://github.com/pierotofy/node-OpenDroneMap" target="_blank">node-OpenDroneMap</a>' api_link='<a href="https://github.com/pierotofy/node-OpenDroneMap/blob/master/docs/index.adoc" target="_blank">API</a>' %}
			<p>
			{% blocktrans %} 
				To get started, "{{ add_processing_node }}". A processing node is a computer running an instance of {{ nodeodm_link }} or some other software that implements this {{ api_link }}.
			{% endblocktrans %}
			</p>
		{% endwith %}
		<button class="btn btn-primary" onclick="location.href='{% url "admin:nodeodm_processingnode_add" %}';"><i class="fa fa-plus-circle"></i> {{ add_processing_node }}</button>
		
	{% else %}
		
		{% if no_tasks %}
			{% trans 'Upload Images' as upload_images %}
			<p>
				{% blocktrans %} To create a map, press the "{{ upload_images }}" button, or drag and drop some images into a project. {% endblocktrans %}
			</p>
			<p>
				<ul>
					<li>{% trans 'You need at least 5 images' %}</li>
					<li>{% trans 'Images must overlap by 60% or more' %}</li>
				</ul>
			</p>
		{% endif %}

		<div id="dashboard-app" data-dashboard></div>
	    {% render_bundle 'main' %}

	{% endif %}
{% endblock %}
