summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorsubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-07-03 00:50:56 +0100
committersubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-07-03 00:50:56 +0100
commita89139763f2b7206dc8962aa91ac41866cb71981 (patch)
tree18d2c9ae26a2f96835f284dfbc53c2dbcd38a4e7 /templates
parentdab138c7315ff3ec0ef08638e7b09d1802fb4359 (diff)
downloadtroggle-a89139763f2b7206dc8962aa91ac41866cb71981.tar.gz
troggle-a89139763f2b7206dc8962aa91ac41866cb71981.tar.bz2
troggle-a89139763f2b7206dc8962aa91ac41866cb71981.zip
[svn] Use template block "related" for related objects. Various cleanup, fix personexpedition date views.
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html10
-rw-r--r--templates/cave.html9
-rw-r--r--templates/expedition.html15
-rw-r--r--templates/frontpage.html12
-rw-r--r--templates/logbookentry.html2
-rw-r--r--templates/logbooksearch.html21
-rw-r--r--templates/personexpedition.html3
-rw-r--r--templates/qm.html12
-rw-r--r--templates/subcave.html29
9 files changed, 49 insertions, 64 deletions
diff --git a/templates/base.html b/templates/base.html
index 4fc24c5..9813c7e 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -13,7 +13,7 @@
{% block head %}{% endblock %}
</head>
-<body>
+<body onLoad="contentHeight();">
<div id="header">
<h1>CUCC Expeditions to Austria: 1976 - 2009</h1>
@@ -38,12 +38,18 @@
{% endblock %}
</div>
+
- <div id="content" >
+<div id="content" >
{% block contentheader %}
{% endblock %}
+<div id="related">
+{% block related %}
+{% endblock %}
+</div>
+
{% block content %}
REPLACE : The content
{% endblock %}
diff --git a/templates/cave.html b/templates/cave.html
index 8aaea22..9469118 100644
--- a/templates/cave.html
+++ b/templates/cave.html
@@ -1,10 +1,9 @@
{% extends "cavebase.html" %}
{% load wiki_markup %}
{% block editLink %}| <a href={{cave.get_admin_url}}>Edit cave {{cave|wiki_to_html_short}}</a>{% endblock %}
-{% block content %}
-<div id="col2">
- <h3>All logbook entries regarding this cave ({{cave.logbookentry_set.count}})</h3>
+{% block related %}
+ <h2>All logbook entries regarding this cave ({{cave.logbookentry_set.count}})</h2>
<table>
{% for logbookentry in cave.logbookentry_set.all %}
{% if logbookentry.title %}
@@ -15,7 +14,9 @@
{% endif %}
{% endfor %}
</table>
-</div>
+{% endblock %}
+
+{% block content %}
{% if cave.entrances %}
<h2>Entrances</h2>
diff --git a/templates/expedition.html b/templates/expedition.html
index 4f91abd..d208b7d 100644
--- a/templates/expedition.html
+++ b/templates/expedition.html
@@ -1,16 +1,15 @@
{% extends "base.html" %}
{% load wiki_markup %}
+{% load link %}
{% block title %}Expedition {{expedition.name}}{% endblock %}
{% block editLink %}<a href={{expedition.get_admin_url}}>Edit expedition {{expedition|wiki_to_html_short}}</a>{% endblock %}
-{% block content %}
-<h2>{{expedition.name}}: {{expedition.date_from}} - {{expedition.date_to}}</h2>
-<div id="col2">
+{% block related %}
<table class="prevnextexpeditions">
<tr>
- <td>{% if expedition_prev %}&lt; &lt; <a href="{{ expedition_prev.get_absolute_url }}">{{expedition_prev.year}}</a>{% endif %}</td>
- <td>{% if expedition_next %}&gt; &gt; <a href="{{ expedition_next.get_absolute_url }}">{{expedition_next.year}}</a>{% endif %}</td>
+ <td>{% if expedition_prev %}&lt; &lt; {{ expedition_prev|link }} {% endif %}</td>
+ <td>{% if expedition_next %}&gt; &gt; {{ expedition_next|link }} {% endif %}</td>
</tr>
</ul>
@@ -24,7 +23,11 @@
</tr>
{% endfor %}
</table>
-</div>
+{% endblock %}
+
+{% block content %}
+<h2>{{expedition.name}}: {{expedition.date_from}} - {{expedition.date_to}}</h2>
+
<div id="col1">
<h3>Logbook entries</h3>
diff --git a/templates/frontpage.html b/templates/frontpage.html
index bf04709..873f198 100644
--- a/templates/frontpage.html
+++ b/templates/frontpage.html
@@ -3,11 +3,7 @@
{% block title %}Cambridge Expeditions to Austria{% endblock %}
-
-
-{% block content %}
-
- <div id="related">
+ {% block related %}
<h2>Recent Actions</h2>
{% load log %}
{% get_admin_log 10 as admin_log %}
@@ -32,7 +28,11 @@
{% endfor %}
</ul>
{% endif %}
- </div>
+ {% endblock %}
+
+{% block content %}
+
+
<div id="col1">
diff --git a/templates/logbookentry.html b/templates/logbookentry.html
index 89069e8..9e632a4 100644
--- a/templates/logbookentry.html
+++ b/templates/logbookentry.html
@@ -7,7 +7,7 @@
<h2>{{logbookentry.title|safe}}</h2>
-<div id="col2">
+<div id="related">
<p><a href="{{ logbookentry.expedition.get_absolute_url }}">{{logbookentry.expedition.name}}</a></p>
{% if logbookentry.cave %}
diff --git a/templates/logbooksearch.html b/templates/logbooksearch.html
deleted file mode 100644
index 2fc00f8..0000000
--- a/templates/logbooksearch.html
+++ /dev/null
@@ -1,21 +0,0 @@
-{% extends "base.html" %}
-{% load wiki_markup %}
-{% block title %}Logbook search results for "{{ query_string }}"{% endblock%}
-
-{% block content %}
-
-<h1> Troggle logbook search </h1>
-
-<p>Your search string, <b>{{ query_string }}</b>,
-
-{% if found_entries %}
- was found in the following <b>{{entry.count}}</b> logbook titles and / or entries:</p>
- <ul>
- {% for entry in found_entries %}
- <li><a href="{{ settings.URL_ROOT }}logbookentry/{{ entry.pk }}">{{ entry|wiki_to_html_short }} </a></li>
- {% endfor %}
- </ul>
- {% else %}
- was not found in any logbook titles and / or entries. Please try again.
- {% endif %}
-{% endblock %} \ No newline at end of file
diff --git a/templates/personexpedition.html b/templates/personexpedition.html
index 4b762a4..a0245aa 100644
--- a/templates/personexpedition.html
+++ b/templates/personexpedition.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load wiki_markup %}
+{% load link %}
{% block title %}Person {{personexpedition.person|wiki_to_html_short}} for {{personexpedition.expedition}}{% endblock %}
@@ -18,7 +19,7 @@
{% ifequal otherpersonexpedition personexpedition %}
| <b>{{otherpersonexpedition.expedition.year}}</b>
{% else %}
- | <a href="{{ otherpersonexpedition.get_absolute_url }}">{{otherpersonexpedition.expedition.year}}</a>
+ | {{ otherpersonexpedition|link }}
{% endifequal %}
{% endfor %}
</p>
diff --git a/templates/qm.html b/templates/qm.html
index 52413f0..6e2a2fb 100644
--- a/templates/qm.html
+++ b/templates/qm.html
@@ -18,18 +18,14 @@
</table>
{% endblock %}
-{% block content %}
-
+{% block related %}
-<div id="col2">
-
- <h2>Related items</h2>
+{% endblock %}
+<h2>Related items</h2>
Parent cave: {{qm.found_by.cave|link}}
(todo: add parent survey and parent subcave)
-
-
-</div>
+{% block content %}
<h3>Location</h3>
{{qm.location_description}}
diff --git a/templates/subcave.html b/templates/subcave.html
index 4cd9be0..fbb8d1d 100644
--- a/templates/subcave.html
+++ b/templates/subcave.html
@@ -11,20 +11,7 @@
{% block content %}
-
-ok here comes the drilldown<br />
-{% drilldown_tree_for_node subcave as drilldown %}
-{% for each in drilldown %}
-{{ each }}>
-{% endfor %}
-
-
-<h2>{{subcave}}</h2>
-<p>
- {{subcave.description}}
-</p>
-
-<div id="col2">
+{% block related %}
<h2>Related places</h2>
@@ -55,6 +42,18 @@ ok here comes the drilldown<br />
</ul>
-</div>
+{% endblock %}
+
+ok here comes the drilldown<br />
+{% drilldown_tree_for_node subcave as drilldown %}
+{% for each in drilldown %}
+{{ each }}>
+{% endfor %}
+
+
+<h2>{{subcave}}</h2>
+<p>
+ {{subcave.description}}
+</p>
{% endblock content %} \ No newline at end of file