mirror of
https://github.com/HaitiData/haitidata.git
synced 2026-10-26 17:35:17 +00:00
100 lines
3.7 KiB
HTML
100 lines
3.7 KiB
HTML
{% extends "maps/map_base.html" %}
|
|
{% load i18n %}
|
|
{% load bootstrap_tags %}
|
|
|
|
{% block title %}{{ block.super }} {{ map.title }} - {% trans "Edit Metadata" %}{% endblock %}
|
|
{% block page-title %}
|
|
{% trans "Edit Metadata" %}
|
|
{% if user.is_authenticated %}
|
|
<div class="btn-group pull-right">
|
|
<a class="btn btn-primary btn-icon" href="{% url "new_map" %}">
|
|
<i class="fa fa-plus" title="Create Map"></i>
|
|
</a>
|
|
<a class="btn btn-primary" href="{% url "new_map" %}">
|
|
{% trans "Create Map" %}
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block body_class %}metadata{% endblock %}
|
|
|
|
{% block body_outer %}
|
|
<div class="page-header">
|
|
<a href="{% url "maps_browse" %}" class="btn btn-primary pull-right">{% trans "Explore Maps" %}</a>
|
|
<h2 class="page-title">{% trans "Edit Metadata" %}</h2>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-8">
|
|
<p class="lead">
|
|
{% blocktrans with map.title as map_title %}
|
|
Editing details for {{ map_title }}
|
|
{% endblocktrans %}
|
|
</p>
|
|
<form class="form-horizontal" action="{{ map.get_absolute_url }}/metadata" method="POST">
|
|
{% if map.metadata_uploaded %}
|
|
<div style="background-color: orange;">{% blocktrans %}Note: this map's orginal metadata was populated by importing a metadata XML file.
|
|
GeoNode's metadata import supports a subset of ISO, FGDC, and Dublin Core metadata elements.
|
|
Some of your original metadata may have been lost.{% endblocktrans %}</div>
|
|
{% endif %}
|
|
|
|
{% if map_form.errors or category_form.errors %}
|
|
<div style="background-color: pink">{% blocktrans %}Error updating metadata. Please check the following fields: {% endblocktrans %}
|
|
<ul>
|
|
{% for field in map_form %}
|
|
{% if field.errors %}
|
|
<li>{{ field.label }}</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% if category_form.errors %}
|
|
<li>{{ category_form.errors.as_ul }}</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
<div class="form-actions">
|
|
<input type="submit" class="btn btn-primary" value="{% trans "Update" %}"/>
|
|
</div>
|
|
{% csrf_token %}
|
|
<div class="form-controls">
|
|
{{ map_form|as_bootstrap }}
|
|
</div>
|
|
<fieldset class="form-controls modal-forms modal hide fade" id="poc_form" >
|
|
<h2>{% trans "Point of Contact" %}</h2>
|
|
{{ poc_form|as_bootstrap }}
|
|
<button type='button' class="modal-cloose-btn btn btn-primary">Done</button>
|
|
</fieldset>
|
|
<fieldset class="form-controls modal-forms modal hide fade" id="metadata_form">
|
|
<h2>{% trans "Metadata Provider" %}</h2>
|
|
{{ author_form|as_bootstrap }}
|
|
<button type='button' class="modal-cloose-btn btn btn-primary">Done</button>
|
|
</fieldset>
|
|
<fieldset id="category_form">
|
|
<label class="control-label required-field">{% trans "Category" %}</label><br/>
|
|
{% autoescape off %}
|
|
<div style="clear:both;padding-left:175px;">
|
|
{% for choice in category_form.category_choice_field.field.choices %}
|
|
<div style="width:50%;float:left;padding-bottom:5px;">
|
|
<input type="radio" name="category_choice_field" value="{{ choice.0 }}"
|
|
{% ifequal category_form.initial choice.0 %}
|
|
checked="checked"
|
|
{% endifequal %}>
|
|
{{ choice.1 }}
|
|
</input>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endautoescape %}
|
|
</fieldset>
|
|
<div class="form-actions">
|
|
<input type="submit" class="btn btn-primary" value="{% trans "Update" %}"/>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
{% block extra_script %}
|
|
{% include 'metadata_form_js.html' %}
|
|
{% endblock %}
|