2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 08:41:51 +00:00

Clean up unused templates. All checked.

This commit is contained in:
Philip Sargent 2022-12-29 15:07:58 +00:00
parent de74cd4867
commit 1ab7528f7b
5 changed files with 21 additions and 97 deletions

View File

@ -444,17 +444,21 @@ def ent(request, cave_id, ent_letter):
'entrance': cave_and_ent.entrance,
'letter': cave_and_ent.entrance_letter,})
def entranceSlug(request, slug):
entrance = Entrance.objects.get(entranceslug__slug = slug)
if entrance.non_public and not request.user.is_authenticated:
return render(request,'nonpublic.html', {'instance': entrance})
else:
return render(request,'entranceslug.html', {'entrance': entrance})
# def entranceSlug(request, slug):
# '''This seems to be a fossil, but I am not sure...
# '''
# entrance = Entrance.objects.get(entranceslug__slug = slug)
# if entrance.non_public and not request.user.is_authenticated:
# return render(request,'nonpublic.html', {'instance': entrance})
# else:
# return render(request,'entranceslug.html', {'entrance': entrance})
def surveyindex(request):
surveys=Survey.objects.all()
expeditions=Expedition.objects.order_by("-year")
return render(request,'survey.html',locals())
# def surveyindex(request):
# '''The template does not exist, there is no URL which calls this, so it is a fossil
# '''
# surveys=Survey.objects.all()
# expeditions=Expedition.objects.order_by("-year")
# return render(request,'survey.html',locals())
def get_entrances(request, caveslug):
try:

View File

@ -1,36 +0,0 @@
<p>{% if cave.explorers %}
<h2>Explorers</h2>
{{ cave.explorers|safe }}
{% endif %}
{% if cave.underground_description %}
<h2>Underground Description</h2>
{{ cave.underground_description|safe }}
{% endif %}
{% if cave.equipment %}
<h2>Equipment</h2>
{{ cave.equipment|safe }}
{% endif %}
{% if cave.references %}
<h2>References</h2>
{{ cave.references|safe }}
{% endif %}
{% if cave.survey %}
<h2>Survey</h2>
{{ cave.survey|safe }}
{% endif %}
{% if cave.kataster_status %}
<h2>Kataster_status</h2>
{{ cave.kataster_status|safe }}
{% endif %}
{% if cave.underground_centre_line %}
<h2>Underground Centre Line</h2>
{{ cave.underground_centre_line|safe }}
{% endif %}
{% if cave.survex_file %}
<h2>Survex File</h2>
{{ cave.survex_file|safe }}
{% endif %}
{% if cave.notes %}
<h2>Notes</h2>
{{ cave.notes|safe }}
{% endif %}</p>

View File

@ -1,10 +1,11 @@
{% extends "admin/base.html" %}
{% load i18n %}
<!-- This overrides a Django-built-in template. Do not delete. -->
{% block title %}{{ title }} | {% trans 'Troggle site admin' %}{% endblock %}
{% block branding %}
<h1 id="site-name">{% trans 'Troggle administration' %}</h1>
<h1 id="site-name">{% trans 'Troggle database administration' %}</h1>
{% endblock %}
{% block nav-global %}{% endblock %}

View File

@ -1,50 +0,0 @@
{% extends 'base.html' %}
{% block title %}Troggle Debug - Generic page{% endblock %}
{% block content %}
<div class='middle'>
<h2>Troggle Debug Page</h2>
</div>
<div class='middle3 login'>
<div class='space'></div>
<div class='align-center'>
<h3>This is temporary debugging output. There has NOT been an error.</h3>
<h4>
<font color="red">
{% if message %}
<pre>
{{message}}
</pre>
{% else %}
<p>Placeholder. </p>
{% endif %}
</font>
</h4>
<div class='space'><p>&nbsp;</div>
<h3>What you should do now</h3>
<p>Please report this by emailing the nerds at
<a href="mailto:expo-tech@lists.wookware.org">expo-tech@lists.wookware.org</a> with this information:
<ol>
<li>The message written in <font color="red">red</font> above.
<li>The previous page URL: <font color="red">
<script type="text/javascript">
document.write(document.referrer);
</script></font>
<li>Go back to this previous page <script type="text/javascript">
document.write("<a href='",document.referrer,"'>",document.referrer,"</a>");
</script>
and see if you can tell whether the page causing the debug output was in HTML text which had been written manually, or whether it appeared to be a programming intention.
</ol>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,5 +1,10 @@
<div class="HTMLarea">
{% include "django/forms/widgets/textarea.html" %}
<!-- this overrides django/forms/widgets/textarea.html
This is used by the HTML editor stuff that Martin wrote
-->
{% if preview %}
<iframe class="HTMLpreview"></iframe>
{% endif %}