mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2024-11-30 13:51:58 +00:00
6776111c6e
Got rid of the url tags in template, replaced them with get_absolute_url method calls where possible. Adding get_absolute_url in models enables direct link to the public model views in admin. The use of get_absolute_url, which is the correct Django way of doing things, eliminates any need for the redundant "href" fields we were using. Those fields now need to be deleted from the models and from the parsers. Made the context processor to pass settings to all templates actually work, although this was a little uglier than expected. I had to put in a new render_response to replace render_to_response. This is because Django uses Context, not RequestContext by default. I wish they would change this, it's annoying. Anyway, I deleted all the manual settings passing in the views. I also eliminated a couple of unnecessary methods and stuff like that.
68 lines
1.8 KiB
HTML
68 lines
1.8 KiB
HTML
{% extends "cavebase.html" %}
|
|
{% load wiki_markup %}
|
|
|
|
{% block content %}
|
|
|
|
<div id="col2">
|
|
<h3>All trips done in this cave</h3>
|
|
<table>
|
|
{% for logbookentry in cave.logbookentry_set.all %}
|
|
{% if logbookentry.title %}
|
|
<tr>
|
|
<td>{{logbookentry.date}}</td>
|
|
<td><a href="{{ logbookentry.get_absolute_url }}">{{logbookentry.title|safe}}</a></td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
|
|
{% if cave.entrances %}
|
|
<h2>Entrances</h2>
|
|
{% for ent in cave.entrances %}
|
|
<a href = "./{{ ent.entrance_letter|wiki_to_html_short }}">{{ ent.entrance_letter|wiki_to_html_short }}</a>
|
|
{% if ent.entrance.marking %}
|
|
Marking: {{ ent.entrance.marking_val|wiki_to_html_short }}
|
|
{% endif %}
|
|
<br>
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% if cave.explorers %}
|
|
<h2>Explorers</h2>
|
|
{{ cave.explorers|wiki_to_html }}
|
|
{% endif %}
|
|
{% if cave.underground_description %}
|
|
<h2>Underground Description</h2>
|
|
{{ cave.underground_description|wiki_to_html }}
|
|
{% endif %}
|
|
{% if cave.equipment %}
|
|
<h2>Equipment</h2>
|
|
{{ cave.equipment|wiki_to_html }}
|
|
{% endif %}
|
|
{% if cave.references %}
|
|
<h2>References</h2>
|
|
{{ cave.references|wiki_to_html }}
|
|
{% endif %}
|
|
{% if cave.survey %}
|
|
<h2>Survey</h2>
|
|
{{ cave.survey|wiki_to_html }}
|
|
{% endif %}
|
|
{% if cave.kataster_status %}
|
|
<h2>Kataster_status</h2>
|
|
{{ cave.kataster_status|wiki_to_html }}
|
|
{% endif %}
|
|
{% if cave.underground_centre_line %}
|
|
<h2>Underground Centre Line</h2>
|
|
{{ cave.underground_centre_line|wiki_to_html }}
|
|
{% endif %}
|
|
{% if cave.survex_file %}
|
|
<h2>Survex File</h2>
|
|
{{ cave.survex_file|wiki_to_html }}
|
|
{% endif %}
|
|
{% if cave.notes %}
|
|
<h2>Notes</h2>
|
|
{{ cave.notes|wiki_to_html }}
|
|
{% endif %}
|
|
{% endblock %}
|