Commit b8757f3a authored by Jim Fulton's avatar Jim Fulton

cleaned up formatting of generated reports and fixed bug for record reports

parent 2af8d36c
......@@ -96,8 +96,8 @@
##############################################################################
__doc__='''Shared classes and functions
$Id: Aqueduct.py,v 1.29 1998/12/29 17:02:55 jim Exp $'''
__version__='$Revision: 1.29 $'[11:-2]
$Id: Aqueduct.py,v 1.30 1998/12/29 19:55:01 jim Exp $'''
__version__='$Revision: 1.30 $'[11:-2]
import Globals, os
from Globals import HTMLFile, Persistent
......@@ -235,10 +235,10 @@ def default_input_form(id,arguments,action='query',
string.joinfields(
map(
lambda a:
('<tr><th>%s</th>\n'
' <td><input name="%s"\n'
' width=30 value="%s">'
'</td></tr>'
('<tr> <th>%s</th>\n'
' <td><input name="%s"\n'
' width=30 value="%s">'
' </td></tr>'
% (nicify(a[0]),
(
a[1].has_key('type') and
......@@ -286,29 +286,26 @@ def custom_default_report(id, result, action='', no_table=0,
):
columns=result._searchable_result_columns()
__traceback_info__=columns
heading=('<tr>\n%s\n</tr>' %
heading=('<tr>\n%s </tr>' %
string.joinfields(
map(lambda c:
' <th>%s</th>\n' % nicify(c['name']),
' <th>%s</th>\n' % nicify(c['name']),
columns),
''
)
)
if no_table: tr, _tr, td, _td, delim = '<p>', '</p>', '', '', ', '
else: tr, _tr, td, _td, delim = '<tr>', '</tr>', '<td>', '</td>', ''
if no_table: tr='<p>', '</p>'
else: tr, _tr = '<tr>', '</tr>'
if no_table: tr, _tr, td, _td, delim = '<p>', '</p>', '', '', ',\n'
else: tr, _tr, td, _td, delim = '<tr>', '</tr>', '<td>', '</td>', '\n'
row=[]
for c in columns:
n=c['name']
if goofy(n) >= 0: n='expr="_vars[\'%s]"' % (`'"'+n`[2:])
row.append(' %s<!--#var %s%s-->%s\n'
row.append(' %s<!--#var %s%s-->%s'
% (td,n,c['type']!='s' and ' null=""' or '',_td))
row=('%s\n%s\n%s' % (tr,string.joinfields(row,delim), _tr))
row=(' %s\n%s\n %s' % (tr,string.joinfields(row,delim), _tr))
return custom_default_report_src(
id=id,heading=heading,row=row,action=action,no_table=no_table)
......@@ -446,7 +443,6 @@ def decapitate(html, RESPONSE=None,
return html
def delimited_output(results,REQUEST,RESPONSE):
delim=REQUEST['output-delimiter']
try: output_type=REQUEST['output-type']
......
......@@ -2,12 +2,15 @@
<!--#if sequence-start-->
<!--#if previous-sequence-->
<a href="<!--#var URL--><!--#var sequence-query
-->query_start=<!--#var
previous-sequence-start-number-->">
(Previous <!--#var previous-sequence-size--> results)
</a>
<!--#/if previous-sequence-->
%(else no_table)[<table border>
%(heading)s
%(else)]
......@@ -17,13 +20,17 @@
%(row)s
<!--#if sequence-end-->
%(else no_table)[</table>%(else)]
<!--#if next-sequence-->
<a href="<!--#var URL--><!--#var sequence-query
-->query_start=<!--#var
next-sequence-start-number-->">
(Next <!--#var next-sequence-size--> results)
</a>
<!--#/if next-sequence-->
<!--#/if sequence-end-->
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment