forked from expo/troggle
Start to change dataformat for caves, along with there editing. Start to change survex reader to cope better with equates/tags.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
{% extends "cavebase.html" %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
{% block contentheader %}
|
||||
<table id="cavepage">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{{ ent.entrance_letter|safe }}
|
||||
{% if ent.entrance.name %}
|
||||
{{ ent.entrance.name|safe }}
|
||||
{% endif %}
|
||||
{% endif %}<a href="{% url editentrance ent.entrance.slug %}">Edit</a>
|
||||
<dl>
|
||||
{% if ent.entrance.marking %}
|
||||
<dt>Marking</dt><dd>{{ ent.entrance.marking_val|safe }}</dd>
|
||||
|
||||
38
templates/dataformat/cave.xml
Normal file
38
templates/dataformat/cave.xml
Normal file
@@ -0,0 +1,38 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<!-- Only put one cave in this file -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
<body>
|
||||
<cave>
|
||||
<non_public>{{ cave.non_public }}</non_public>{% for slug in cave.caveslug_set.all %}
|
||||
<caveslug>{{ slug.slug|default_if_none:""|safe }}</caveslug>{% endfor %}
|
||||
<official_name>{{ cave.official_name|default_if_none:""|safe }}</official_name>{% for area in cave.area.all %}
|
||||
<area>{{ area.short_name|default_if_none:""|safe }}</area>{% endfor %}
|
||||
<kataster_code>{{ cave.kataster_code|default_if_none:""|safe }}</kataster_code>
|
||||
<kataster_number>{{ cave.kataster_number|default_if_none:""|safe }}</kataster_number>
|
||||
<unofficial_number>{{ cave.unofficial_number|default_if_none:""|safe }}</unofficial_number>
|
||||
{% for ce in cave.entrances.all %}
|
||||
<entrance>
|
||||
<entranceslug>{{ ce.entrance.slug|default_if_none:""|safe }}</entranceslug>
|
||||
<letter>{{ ce.entrance_letter|default_if_none:""|safe }}</letter>
|
||||
</entrance>
|
||||
{% endfor %}
|
||||
<explorers>{{ cave.explorers|default_if_none:""|safe }}</explorers>
|
||||
<underground_description>{{ cave.underground_description|default_if_none:""|safe }}</underground_description>
|
||||
<equipment>{{ cave.equipment|default_if_none:""|safe }}</equipment>
|
||||
<references>{{ cave.references|default_if_none:""|safe }}</references>
|
||||
<survey>{{ cave.survey|default_if_none:""|safe }}</survey>
|
||||
<kataster_status>{{ cave.kataster_status|default_if_none:""|safe }}</kataster_status>
|
||||
<underground_centre_line>{{ cave.underground_centre_line|default_if_none:""|safe }}</underground_centre_line>
|
||||
<notes>{{ cave.notes|default_if_none:""|safe }}</notes>
|
||||
<length>{{ cave.length|default_if_none:""|safe }}</length>
|
||||
<depth>{{ cave.depth|default_if_none:""|safe }}</depth>
|
||||
<extent>{{cave.extent|default_if_none:""|safe }}</extent>
|
||||
<survex_file>{{ cave.survex_file|default_if_none:""|safe }}</survex_file>
|
||||
<description_file>{{ cave.description_file|default_if_none:""|safe }}</description_file>
|
||||
<url>{{ cave.url|default_if_none:""|safe }}</url>
|
||||
</cave>
|
||||
</body>
|
||||
</html>
|
||||
47
templates/dataformat/entrance.xml
Normal file
47
templates/dataformat/entrance.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<!-- Only put one entrance in this file -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
<body>
|
||||
<entrance>
|
||||
<non_public>{{ entrance.non_public }}</non_public>{% for slug in entrance.entranceslug_set.all %}
|
||||
<slug>{{ slug.slug|default_if_none:""|safe }}</slug>{% endfor %}
|
||||
<name>{{ entrance.name|default_if_none:""|safe }}</name>
|
||||
<entrance_description>{{ entrance.entrance_description|default_if_none:""|safe }}</entrance_description>
|
||||
<explorers>{{ entrance.explorers|default_if_none:""|safe }}</explorers>
|
||||
<map_description>{{ entrance.map_description|default_if_none:""|safe }}</map_description>
|
||||
<location_description>{{ entrance.location_description|default_if_none:""|safe }}</location_description>
|
||||
<approach>{{ entrance.approach|default_if_none:""|safe }}</approach>
|
||||
<underground_description>{{ entrance.underground_description|default_if_none:""|safe }}</underground_description>
|
||||
<photo>{{ entrance.photo|default_if_none:""|safe }}</photo>
|
||||
<!-- marking options: P = Paint,
|
||||
P? = Paint (?),
|
||||
T = Tag,
|
||||
T? = Tag (?),
|
||||
R = Retagged,
|
||||
S = Spit,
|
||||
S? = Spit (?),
|
||||
U = Unmarked,
|
||||
? = Unknown" -->
|
||||
<marking>{{ entrance.marking|default_if_none:""|safe }}</marking>
|
||||
<marking_comment>{{ entrance.marking_comment|default_if_none:""|safe }}</marking_comment>
|
||||
<!-- findability options: ? = To be confirmed ...,
|
||||
S = Surveyed,
|
||||
L = Lost,
|
||||
R = Refindable" -->
|
||||
<findability>{{ entrance.findability|default_if_none:""|safe }}</findability>
|
||||
<findability_description>{{ entrance.findability_description|default_if_none:""|safe }}</findability_description>
|
||||
<alt>{{ entrance.alt|default_if_none:""|safe }}</alt>
|
||||
<northing>{{ entrance.northing|default_if_none:""|safe }}</northing>
|
||||
<easting>{{ entrance.easting|default_if_none:""|safe }}</easting>
|
||||
<tag_station>{{ entrance.tag_station|default_if_none:""|safe }}</tag_station>
|
||||
<exact_station>{{ entrance.exact_station|default_if_none:""|safe }}</exact_station>
|
||||
<other_station>{{ entrance.other_station|default_if_none:""|safe }}</other_station>
|
||||
<other_description>{{ entrance.other_description|default_if_none:""|safe }}</other_description>
|
||||
<bearings>{{ entrance.bearings|default_if_none:""|safe }}</bearings>
|
||||
<url>{{ entrance.url|default_if_none:""|safe }}</url>
|
||||
</entrance>
|
||||
</body>
|
||||
</html>
|
||||
@@ -9,9 +9,9 @@
|
||||
<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<strong> This form does not do anything .... yet ....</strong>
|
||||
<form action="" method="post">{% csrf_token %}
|
||||
<table>{{ form }}{{caveAndEntranceFormSet}}</table>
|
||||
{{ versionControlForm }}
|
||||
<p><input type="submit" value="Sumbit" /></p>
|
||||
</form>
|
||||
|
||||
|
||||
18
templates/editentrance.html
Normal file
18
templates/editentrance.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{% extends "cavebase.html" %}
|
||||
{% load csrffaker %}
|
||||
{% block title %}Edit Entrance{% endblock %}
|
||||
{% block extraheaders %}
|
||||
|
||||
<link rel="stylesheet" href="{{ settings.MEDIA_URL }}css/ui-lightness/jquery-ui-1.8.12.custom.css" type="text/css" media="all" />
|
||||
<script src="{{ settings.MEDIA_URL }}js/jquery-ui-1.8.12.custom.min.js" type="text/javascript"></script>
|
||||
<script src="{{ settings.MEDIA_URL }}js/jquery.formset.min.js" type="text/javascript"></script>
|
||||
<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<form action="" method="post">{% csrf_token %}
|
||||
<table>{{ form }}</table>
|
||||
{{ versionControlForm }}
|
||||
<p><input type="submit" value="Sumbit" /></p>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user