diff --git a/core/views_survex.py b/core/views_survex.py
index 89831e1..464b870 100644
--- a/core/views_survex.py
+++ b/core/views_survex.py
@@ -383,19 +383,15 @@ def survexcaveslist(request):
def survexcavesingle(request, survex_cave):
'''parsing all the survex files of a single cave and showing that it's consistent and can find all
- the files and people. Currently not showing Explorers or Titles. link test from SurvexFile page
- is "dates and explorers". Should explicity fix the kataster number thing.
+ the files and people. Should explicity fix the kataster number thing.
'''
sc = survex_cave
- breload = False
- if breload:
- parsers.survex.ReloadSurvexCave(sc) # does not exit now, needs re-writing to work.
try:
cave = Cave.objects.get(kataster_number=sc)
return render_to_response('svxcavesingle.html', {'settings': settings, "cave":cave })
except ObjectDoesNotExist:
# can get here if the survex file is in a directory labelled with unofficial number not kataster number.
- # maybe - and _ mixed up, or CUCC-2017- instead of 2017-CUCC-, or CUCC2015DL01 ??
+ # maybe - and _ mixed up, or CUCC-2017- instead of 2017-CUCC-, or CUCC2015DL01 . Let's not get carried away..
for unoff in [sc, sc.replace('-','_'), sc.replace('_','-')]:
try:
cave = Cave.objects.get(unofficial_number=unoff)
diff --git a/templates/svxcavesingle.html b/templates/svxcavesingle.html
index bf505dd..319cb4b 100644
--- a/templates/svxcavesingle.html
+++ b/templates/svxcavesingle.html
@@ -6,74 +6,77 @@
{% block content %}
-
Surveys for cave - kataster number:{{cave}}
+{% autoescape off %}
+
+{% endautoescape %}
+
+Cave description: {{cave.url}}
+
{% for survexdirectory in cave.survexdirectory_set.all %}
{{survexdirectory.path}}
{% endfor %}
-
{% for survexdirectory in cave.survexdirectory_set.all %}
-{{survexdirectory.path}}
+ {{survexdirectory.path}}
+
+ Survex file | Block | Date | Explorers | length | Titles | Scans |
+ {% for survexfile in survexdirectory.survexfile_set.all %}
+
+ {% if survexfile.exists %}
+
+ {% else %}
+ |
+ {% endif %}
-
-Survex file | Block | Date | Explorers | length | Titles | Scans |
-
-{% for survexfile in survexdirectory.survexfile_set.all %}
-
- {% if survexfile.exists %}
-
- {% else %}
- |
- {% endif %}
-
- {% ifequal survexfile survexdirectory.primarysurvexfile %}
- {{survexfile.path}}
- {% else %}
- {{survexfile.path}}
- {% endifequal %}
- |
-
-
-{% for survexblock in survexfile.survexblock_set.all %}
-
- {{survexblock.name}} |
-
- {% if survexblock.expedition %}
- {{survexblock.date|date:"D d M Y"}}
- {% else %}
-
- {% endif %}
- |
-
-
- {% for personrole in survexblock.survexpersonrole_set.all %}
- {% if personrole.personexpedition %}
- {{personrole.personname}}
- {% else %}
- {{personrole.personname}}
- {% endif %}
- {% endfor %}
- |
-
- {{survexblock.legslength|stringformat:".1f"}} |
-
-
- {{survexblock.title}}
- |
-
-
- {% if survexblock.scansfolder %}
- {{survexblock.scansfolder.walletname}}
- {% endif %}
- |
-
+ {% ifequal survexfile survexdirectory.primarysurvexfile %}
+ {% url "svx" survexfile.path %}
+ {% else %}
+ {% url "svx" survexfile.path %}
+ {% endifequal %}
+
+
+ {% for survexblock in survexfile.survexblock_set.all %}
+
+
+ {{survexblock.name}} |
+
+
+
+ {% if survexblock.expedition %}
+ {{survexblock.date|date:"D d M Y"}}
+ {% else %}
+
+ {% endif %}
+ |
+
+
+ {% for personrole in survexblock.survexpersonrole_set.all %}
+ {% if personrole.personexpedition %}
+ {{personrole.personname}}
+ {% else %}
+ {{personrole.personname}}
+ {% endif %}
+ {% endfor %}
+ |
+
+ {{survexblock.legslength|stringformat:".1f"}} |
+
+
+
+ {{survexblock.title}}
+ |
+
+
+ {% if survexblock.scansfolder %}
+ {{survexblock.scansfolder.walletname}}
+ {% endif %}
+ |
+
+ {% endfor %}
+ {% endfor %}
+
{% endfor %}
-{% endfor %}
- |
-
-{% endfor %}
-
{% endblock %}
-