Skip to content
This repository has been archived by the owner on May 29, 2021. It is now read-only.

Commit

Permalink
support for better listing (by takeoff)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkm committed Apr 1, 2011
1 parent b7c8aab commit bf49585
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 9 additions & 1 deletion bin/parac3
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,16 @@ json_fiches_out = open("final/fiches.json", "w")
print >>json_fiches_out, json_fiches
json_fiches_out.close()

#order fiche by takeoff
fiches_by_takeoff = {}
for n,f in fiches.items():
tk_name = f[0].takeoff.name
tk_fiches = fiches_by_takeoff.get(tk_name, {})
tk_fiches[n] = f
fiches_by_takeoff[tk_name] = tk_fiches

t = Template(file='templates/index.cheetah')
t.allcross = fiches
t.allcross = fiches_by_takeoff
indexout = open("final/index.html", "w")
print >>indexout, t
indexout.close()
Expand Down
8 changes: 5 additions & 3 deletions templates/index.cheetah
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,17 @@
</div>

<div id="column">
<h1 class="head">All</h1>
<h1 class="head">Vols disponibles</h1>
<div class="border1">
</div>
<div class="border2">
</div>
<div class="contener1">
<br/>
#for $tk_name,$allX in $allcross.items()
Depuis $tk_name :
<ul>
#for $key,$val in $allcross.items()
#for $key,$val in $allX.items()
<li>
<a href="$val[4]">
#set d="%d" % $val[0].distance
Expand All @@ -141,7 +143,7 @@
</li>
#end for
</ul>

#end for
</div>

<div class="photo">
Expand Down

0 comments on commit bf49585

Please sign in to comment.