[Cdd-commits] r834 - in cdd/trunk/webtools: . templates
CDD Subversion Commit
noreply at alioth.debian.org
Wed Jun 18 15:12:27 UTC 2008
Author: tille
Date: Wed Jun 18 15:12:27 2008
New Revision: 834
Removed:
cdd/trunk/webtools/tasks_idx.py
Modified:
cdd/trunk/webtools/tasks.py
cdd/trunk/webtools/templates/tasks_idx.xhtml
Log:
Do the whole work in one script
Modified: cdd/trunk/webtools/tasks.py
==============================================================================
--- cdd/trunk/webtools/tasks.py (original)
+++ cdd/trunk/webtools/tasks.py Wed Jun 18 15:12:27 2008
@@ -89,6 +89,13 @@
send a description of that project to the <a href="mailto:%s">%s mailing list</a>""") % \
(data['projectname'], data['projectlist'], data['projectname']))
+ data['gtstrTasksPage'] = _('Tasks page')
+ data['gtstrProject'] = _('Project')
+ data['projectadvertising'] = _("""Help us to see Debian used by medical practicioners and researchers!
+Join us on the
+<a href="%s">Alioth page</a>.""") % (data['aliothurl'])
+
+
COLORCODES = { 'official' : _('Green: The project is <a href="#official-debs">available as an official Debian package</a>'),
'unofficial' : _('Yellow: The project is <a href="#unofficial-debs">available as an unofficial Debian package</a>'),
'prospective' : _('Red: The project is <a href="#prospective-debs">not (yet) available as a Debian package</a>'),
@@ -107,6 +114,22 @@
)
data['packages'] = _('Packages')
+ # Create the index page
+ # Make sure that strings that need to be rendered as they are because they might
+ # contain several html tags will be marked correctly
+ VERBATIM=('projectadvertising', )
+ for verbatim in VERBATIM:
+ data[verbatim] = Markup(data[verbatim])
+ for task in data['tasks'].keys():
+ data['tasks'][task]['LongDesc'] = Markup(data['tasks'][task]['LongDesc'])
+
+ template = loader.load('tasks_idx.xhtml')
+
+ outputfile = OUTPUTDIR[CDD] + '/index_' + lang + '.html'
+ f = open('index_' + lang + '.html', 'w')
+ print >> f, template.generate(**data).render('xhtml')
+ f.close()
+
for task in tasks:
data['task'] = task
data['projectkeys'] = cdeps.GetListOfDepsForTask(task, dependencytypes=())
@@ -136,3 +159,4 @@
print >> f, template.generate(**data).render('xhtml')
f.close()
+
Modified: cdd/trunk/webtools/templates/tasks_idx.xhtml
==============================================================================
--- cdd/trunk/webtools/templates/tasks_idx.xhtml (original)
+++ cdd/trunk/webtools/templates/tasks_idx.xhtml Wed Jun 18 15:12:27 2008
@@ -20,7 +20,7 @@
<table class="columns">
<tr>
<td class="left">
- <span class="section">$gtstrSummary</span>
+ <span class="section">$summary</span>
<div class="section">
<div class="sectionTop"></div>
<div class="row">
More information about the Cdd-commits
mailing list