2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-15 23:47:14 +00:00

[svn] full checkin. animations disabled, sorry

This commit is contained in:
goatchurch
2009-07-27 13:43:43 +01:00
parent 68060d6118
commit 7158a79a34
11 changed files with 255 additions and 173 deletions

View File

@@ -45,13 +45,23 @@ def todo(request):
totallogbookentries = LogbookEntry.objects.count()
return render_with_context(request,'index.html', {'expeditions':expeditions, 'all':'all', 'totallogbookentries':totallogbookentries, "message":message})
def calendar(request,year):
def calendar(request, year):
week=['S','S','M','T','W','T','F']
if year:
expedition=Expedition.objects.get(year=year)
PersonExpeditions=expedition.personexpedition_set.all()
expedition = Expedition.objects.get(year=year)
personexpeditions = expedition.personexpedition_set.all()
return render_with_context(request,'calendar.html', locals())
listdays = [ ] # the columns of the table
date = expedition.date_from
while date <= expedition.date_to:
listdays.append(date)
date += datetime.timedelta(days=1)
personexpeditiondays = [ ]
for personexpedition in personexpeditions:
pelistdays = [ (personexpedition.date_from and (personexpedition.date_from <= date < personexpedition.date_to)) for date in listdays ]
personexpeditiondays.append([personexpedition, pelistdays])
return render_with_context(request,'calendar.html', {"expedition":expedition, "listdays":listdays, "personexpeditiondays":personexpeditiondays})
def controlPanel(request):
jobs_completed=[]