#65 KML Import
This commit is contained in:
@@ -59,6 +59,10 @@
|
||||
|
||||
<li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_create'%}" class="LP-Link"><span class="LP-Link__Text">{% translate 'Create place' %}</span></a></li>
|
||||
<li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_list'%}" class="LP-Link"><span class="LP-Link__Text">{% translate 'All places' %}</span></a></li>
|
||||
|
||||
{% if user.is_superuser %}
|
||||
<li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'import_upload'%}" class="LP-Link"><span class="LP-Link__Text">{% translate 'Import KML File' %}</span></a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
|
@@ -0,0 +1,33 @@
|
||||
{% extends 'global.html'%}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
{% load svg_icon %}
|
||||
|
||||
{% block maincontent %}
|
||||
<h1 class="LP-Headline">
|
||||
{{ import_type}} from {{import.imported_when|date:"d F Y"}} by {{import.explorer.user.username}}
|
||||
</h1>
|
||||
|
||||
<p class="SP-Paragraph">
|
||||
{{import.place_list.all|length}} places where import in this import
|
||||
</p>
|
||||
<p class="SP-Paragraph">
|
||||
{{import.description}}
|
||||
</p>
|
||||
|
||||
<div class="LP-PlaceList">
|
||||
<h1 class="LP-Headline">{% translate 'Places imported' %}</h1>
|
||||
<ul class="LP-PlaceList__List">
|
||||
{% for place in paginated_places %}
|
||||
<li class="LP-PlaceList__Item">
|
||||
{% include 'partials/place_teaser.html' with place=place extended=True %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% include 'partials/nav/pagination.html' with page_obj=paginated_places is_paginated=True %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock maincontent %}
|
@@ -0,0 +1,33 @@
|
||||
{% extends 'global.html'%}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
{% load svg_icon %}
|
||||
|
||||
{% block maincontent %}
|
||||
<form class="LP-Form" method="POST" enctype="multipart/form-data">
|
||||
<fieldset class="LP-Form__Fieldset">
|
||||
<legend class="LP-Form__Legend">{% translate 'Import Places from KML File' %}</legend>
|
||||
{% csrf_token %}
|
||||
|
||||
<div class="LP-Form__Composition LP-Form__Composition--breakable">
|
||||
<div class="LP-Form__Field">
|
||||
{% include 'partials/form/inputField.html' with field=upload_form.description %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="LP-Form__Composition LP-Form__Composition--breakable">
|
||||
<div class="LP-Form__Field">
|
||||
{% include 'partials/form/inputField.html' with field=upload_form.map_file %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% translate 'Create' as action %}
|
||||
<div class="LP-Form__Composition LP-Form__Composition--buttons">
|
||||
{% include 'partials/form/submit.html' with referrer=request.META.HTTP_REFERER action=action %}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
{% endblock maincontent %}
|
@@ -49,7 +49,6 @@
|
||||
{% include '../partials/tagging.html' with config=tagging_config %}
|
||||
</section>
|
||||
|
||||
{{votingplace.vote}}
|
||||
<section class="LP-Section">
|
||||
{% include '../partials/voting.html' with voting=placevoting %}
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user