diff --git a/core/models.py b/core/models.py index fa961ed..8778aa1 100644 --- a/core/models.py +++ b/core/models.py @@ -180,7 +180,7 @@ class PersonExpedition(TroggleModel): def GetPersonChronology(self): res = { } for persontrip in self.persontrip_set.all(): - a = res.setdefault(persontrip.date, { }) + a = res.setdefault(persontrip.date(), { }) a.setdefault("persontrips", [ ]).append(persontrip) for personrole in self.personrole_set.all(): a = res.setdefault(personrole.survex_block.date, { }) @@ -236,7 +236,7 @@ class PersonExpedition(TroggleModel): class LogbookEntry(TroggleModel): date = models.DateField() expedition = models.ForeignKey(Expedition,blank=True,null=True) # yes this is double- - author = models.ForeignKey(PersonExpedition,blank=True,null=True) # the person who writes it up doesn't have to have been on the trip. + = models.ForeignKey(PersonExpedition,blank=True,null=True) # the person who writes it up doesn't have to have been on the trip. # Re: the above- so this field should be "typist" or something, not "author". - AC 15 jun 09 title = models.CharField(max_length=200) cave = models.ForeignKey('Cave',blank=True,null=True) @@ -287,9 +287,6 @@ class PersonTrip(TroggleModel): else: return self.logbook_entry.place - #persontrip_next = models.ForeignKey('PersonTrip', related_name='pnext', blank=True,null=True) - #persontrip_prev = models.ForeignKey('PersonTrip', related_name='pprev', blank=True,null=True) - def __unicode__(self): return "%s %s (%s)" % (self.person_expedition, self.place(), self.date()) diff --git a/media/css/main3.css b/media/css/main3.css index 17779bd..fae73df 100644 --- a/media/css/main3.css +++ b/media/css/main3.css @@ -405,6 +405,11 @@ div#related color:#666666; } +div#related table +{ + border-collapse:separate +} + .addlink { padding-left: 12px; background: url(../icon_addlink.gif) 0 .2em no-repeat; 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 %} - + + -
+
{% block contentheader %} {% endblock %} + + {% 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 %}| Edit cave {{cave|wiki_to_html_short}}{% endblock %} -{% block content %} -
-

All logbook entries regarding this cave ({{cave.logbookentry_set.count}})

+{% block related %} +

All logbook entries regarding this cave ({{cave.logbookentry_set.count}})

{% for logbookentry in cave.logbookentry_set.all %} {% if logbookentry.title %} @@ -15,7 +14,9 @@ {% endif %} {% endfor %}
-
+{% endblock %} + +{% block content %} {% if cave.entrances %}

Entrances

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 %}Edit expedition {{expedition|wiki_to_html_short}}{% endblock %} -{% block content %} -

{{expedition.name}}: {{expedition.date_from}} - {{expedition.date_to}}

-
+{% block related %} - - + + @@ -24,7 +23,11 @@ {% endfor %}
{% if expedition_prev %}< < {{expedition_prev.year}}{% endif %}{% if expedition_next %}> > {{expedition_next.year}}{% endif %}{% if expedition_prev %}< < {{ expedition_prev|link }} {% endif %}{% if expedition_next %}> > {{ expedition_next|link }} {% endif %}
-
+{% endblock %} + +{% block content %} +

{{expedition.name}}: {{expedition.date_from}} - {{expedition.date_to}}

+

Logbook entries

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 %} - - + {% endblock %} + +{% block content %} + +
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 @@

{{logbookentry.title|safe}}

-
+