[Cdd-commits] r1141 - in cdd/trunk/webtools: . templates
CDD Subversion Commit
noreply at alioth.debian.org
Wed Oct 22 08:42:59 UTC 2008
Author: tille
Date: Wed Oct 22 08:42:58 2008
New Revision: 1141
Modified:
cdd/trunk/webtools/bugs.py
cdd/trunk/webtools/templates/bugs.xhtml
Log:
Add bug numbers to index entries
Modified: cdd/trunk/webtools/bugs.py
==============================================================================
--- cdd/trunk/webtools/bugs.py (original)
+++ cdd/trunk/webtools/bugs.py Wed Oct 22 08:42:58 2008
@@ -84,7 +84,7 @@
data['taskskeys'] = cdeps.metapackagekeys
data['lang'] = 'en'
data['othertasks'] = _("Links to other tasks")
-data['indexlink'] = _("Index of all tasks")
+data['taskslink'] = _("Tasks")
data['updatetimestamp'] = _('Last update:') + ' ' + formatdate(time.mktime(t.timetuple()))
if data['advertising'] != None:
# If data['advertising'] is enclosed in _() gettext tries to ask for translations of 'advertising'
@@ -124,8 +124,8 @@
for task in packages.keys():
data['task'] = task
data['pkgbugs'] = allbugs[task]
- data['nbugs'] = nbugs[task]
- data['ndone'] = ndone[task]
+ data['nbugs'] = nbugs
+ data['ndone'] = ndone
template = loader.load('bugs.xhtml')
f = open(outputdir + '/' + task + '.html', 'w')
print >> f, template.generate(**data).render('xhtml')
Modified: cdd/trunk/webtools/templates/bugs.xhtml
==============================================================================
--- cdd/trunk/webtools/templates/bugs.xhtml (original)
+++ cdd/trunk/webtools/templates/bugs.xhtml Wed Oct 22 08:42:58 2008
@@ -31,15 +31,15 @@
</div>
<div class="row">
Total bugs:
- <strong>${nbugs+ndone}</strong>
+ <strong>${nbugs[task]+ndone[task]}</strong>
</div>
<div class="row">
Open bugs:
- <strong>$nbugs</strong>
+ <strong>${nbugs[task]}</strong>
</div>
<div class="row">
Fixed bugs:
- <strong>$ndone</strong>
+ <strong>${ndone[task]}</strong>
</div>
</div>
@@ -47,11 +47,12 @@
<div class="section">
<div class="sectionTop"/>
<div class="row">
- <div class="link"><a href="index.html">${indexlink}</a></div>
+ <div class="link"><a href="../tasks/index.html">${taskslink}</a></div>
<py:for each="t in taskskeys">
<div py:choose="t">
- <span py:when="task" class="curlink"><a href="${t}.html">${tasks[t].metapkg.PrintedName.capitalize()}</a></span>
- <span py:otherwise="" class="link"><a href="${t}.html">${tasks[t].metapkg.PrintedName.capitalize()}</a></span>
+ <span py:when="task"
+ class="curlink"><a href="${t}.html">${tasks[t].metapkg.PrintedName.capitalize()}</a> ${nbugs[t]} (${ndone[t]})</span>
+ <span py:otherwise="" class="link"><a href="${t}.html">${tasks[t].metapkg.PrintedName.capitalize()}</a> ${nbugs[t]} (${ndone[t]})</span>
</div>
</py:for>
</div>
@@ -62,7 +63,7 @@
<h1>Summary bugs page of ${tasks[task].metapkg.PrintedName.capitalize()} meta package</h1>
<span py:choose="">
- <span py:when="nbugs > 0">
+ <span py:when="nbugs[task] > 0">
<h2>Open bugs</h2>
<table class="bugs">
<py:for each="pkgbug in pkgbugs">
@@ -86,7 +87,7 @@
</span>
<span py:choose="">
-<span py:when="ndone > 0">
+<span py:when="ndone[task] > 0">
<h2>Fixed bugs</h2>
<table class="bugs">
<py:for each="pkgbug in pkgbugs">
More information about the Cdd-commits
mailing list