ajack       2003/10/13 17:07:27

  Modified:    python/gump document.py
  Log:
  1) Escape only description (not link)
  2) Add start/end times to work page
  3) split CLASSPATH ": " for ":"
  
  Revision  Changes    Path
  1.71      +15 -5     jakarta-gump/python/gump/document.py
  
  Index: document.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/document.py,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- document.py       13 Oct 2003 20:34:48 -0000      1.70
  +++ document.py       14 Oct 2003 00:07:27 -0000      1.71
  @@ -507,7 +507,7 @@
       
       # Provide a description/link back to the module site.
       startSectionXDoc(x,'Description') 
  -    description=str(module.description)    
  +    description=escape(str(module.description))
       if not description.strip().endswith('.'):
           description+='. '    
       if not description:
  @@ -517,7 +517,7 @@
       else:
           description+=' (No module URL provided).'
               
  -    paragraphXDoc(x,description)
  +    xparagraphXDoc(x,description)
       endSectionXDoc(x)
       
           
  @@ -623,7 +623,7 @@
        
       # Provide a description/link back to the module site.
       startSectionXDoc(x,'Description') 
  -    description=str(project.description) or str(module.description)
  +    description=escape(str(project.description) or str(module.description))
       if not description.strip().endswith('.'):
           description+='. '
       if not description:
  @@ -633,7 +633,7 @@
       else:        
           description=' (No project URL provided.)'   
               
  -    paragraphXDoc(x,description)
  +    xparagraphXDoc(x,description)
       endSectionXDoc(x)
   
       documentAnnotations(x,projectcontext.annotations)
  @@ -758,6 +758,10 @@
           headerXDoc(x, workTypeName(work.type) + ' : ' + work.command.name)
           startSectionXDoc(x,'Details')
           paragraphXDoc(x,"Status: " + stateName(work.status))
  +        paragraphXDoc(x,"Start Time" + time.strftime(setting.datetimeformat, \
  +                    time.localtime(work.result.start_time)))
  +        paragraphXDoc(x,"End Time" + time.strftime(setting.datetimeformat, \
  +                    time.localtime(work.result.end_time)))
           endSectionXDoc(x)
           
           startListXDoc(x)
  @@ -799,7 +803,10 @@
                   x.write(name)
                   x.write('</td><td>')
                   if value:
  -                    x.write(value)
  +                    # :TODO: Hack for CLASSPATH
  +                    if name == "CLASSPATH":
  +                        value=': '.join(value.split(':'))
  +                    x.write(escape(value))
                   else:
                       x.write('N/A')
                   x.write('</td></tr>\n')        
  @@ -1265,6 +1272,9 @@
       
   def paragraphXDoc(f, content):
       f.write('    <p>%s</p>\n' % (escape(content)))
  +    
  +def xparagraphXDoc(f, content):
  +    f.write('    <p>%s</p>\n' % (content))
       
   def endSectionXDoc(f):
       f.write('    </section>\n')
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to