Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
521761b7
Commit
521761b7
authored
Jan 09, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added option for tabular vs record reports
parent
ad3bca87
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
60 deletions
+69
-60
lib/python/Shared/DC/ZRDB/Aqueduct.py
lib/python/Shared/DC/ZRDB/Aqueduct.py
+23
-15
lib/python/Shared/DC/ZRDB/Search.py
lib/python/Shared/DC/ZRDB/Search.py
+9
-4
lib/python/Shared/DC/ZRDB/customDefaultReport.dtml
lib/python/Shared/DC/ZRDB/customDefaultReport.dtml
+31
-39
lib/python/Shared/DC/ZRDB/searchAdd.dtml
lib/python/Shared/DC/ZRDB/searchAdd.dtml
+6
-2
No files found.
lib/python/Shared/DC/ZRDB/Aqueduct.py
View file @
521761b7
...
...
@@ -10,8 +10,8 @@
##############################################################################
__doc__
=
'''Shared Aqueduct classes and functions
$Id: Aqueduct.py,v 1.1
6 1997/12/12 23:38:0
4 jim Exp $'''
__version__
=
'$Revision: 1.1
6
$'
[
11
:
-
2
]
$Id: Aqueduct.py,v 1.1
7 1998/01/09 13:58:1
4 jim Exp $'''
__version__
=
'$Revision: 1.1
7
$'
[
11
:
-
2
]
from
Globals
import
HTMLFile
,
Persistent
import
DocumentTemplate
,
DateTime
,
regex
,
regsub
,
string
,
urllib
,
rotor
...
...
@@ -191,7 +191,7 @@ def default_input_form(id,arguments,action='query',
custom_default_report_src
=
DocumentTemplate
.
File
(
dtml_dir
+
'customDefaultReport.dtml'
)
def
custom_default_report
(
id
,
result
,
action
=
''
):
def
custom_default_report
(
id
,
result
,
action
=
''
,
no_table
=
0
):
columns
=
result
.
_searchable_result_columns
()
__traceback_info__
=
columns
heading
=
(
'<tr>
\
n
%s</tr>'
%
...
...
@@ -202,19 +202,24 @@ def custom_default_report(id, result, action=''):
''
)
)
row
=
(
'<tr>
\
n
%s</tr>'
%
string
.
joinfields
(
map
(
lambda
c
:
'
\
t
\
t
<td><!--#var %s%s--></td>
\
n
'
%
(
urllib
.
quote
(
c
[
'name'
]),
c
[
'type'
]
!=
's'
and
' null=""'
or
''
,
),
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>'
else
:
tr
,
_tr
=
'<tr>'
,
'</p>'
row
=
(
'%s
\
n
%s
\
t
\
t
%s'
%
(
tr
,
string
.
joinfields
(
map
(
lambda
c
,
td
=
td
,
_td
=
_td
:
'
\
t
\
t
%s<!--#var %s%s-->%s
\
n
'
%
(
td
,
urllib
.
quote
(
c
[
'name'
]),
c
[
'type'
]
!=
's'
and
' null=""'
or
''
,
_td
),
columns
),
delim
),
_tr
))
return
custom_default_report_src
(
id
=
id
,
heading
=
heading
,
row
=
row
,
action
=
action
)
id
=
id
,
heading
=
heading
,
row
=
row
,
action
=
action
,
no_table
=
no_table
)
def
detypify
(
arg
):
l
=
string
.
find
(
arg
,
':'
)
...
...
@@ -360,6 +365,9 @@ def delimited_output(results,REQUEST,RESPONSE):
##############################################################################
#
# $Log: Aqueduct.py,v $
# Revision 1.17 1998/01/09 13:58:14 jim
# added option for tabular vs record reports
#
# Revision 1.16 1997/12/12 23:38:04 jim
# Added debugging info.
#
...
...
lib/python/Shared/DC/ZRDB/Search.py
View file @
521761b7
...
...
@@ -10,15 +10,16 @@
##########################################################################
__doc__
=
'''Aqueduct Search Interface Wizard
$Id: Search.py,v 1.
2 1998/01/07 16:32:48
jim Exp $'''
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
$Id: Search.py,v 1.
3 1998/01/09 13:58:15
jim Exp $'''
__version__
=
'$Revision: 1.
3
$'
[
11
:
-
2
]
from
Globals
import
HTMLFile
from
Aqueduct
import
custom_default_report
,
nicify
from
string
import
join
addForm
=
HTMLFile
(
'searchAdd'
,
globals
())
def
add
(
self
,
report_id
,
report_title
,
input_id
,
input_title
,
queries
=
[],
def
add
(
self
,
report_id
,
report_title
,
report_style
,
input_id
,
input_title
,
queries
=
[],
REQUEST
=
None
):
'add a report'
...
...
@@ -56,7 +57,8 @@ def add(self, report_id, report_title, input_id, input_title, queries=[],
report_id
,
report_title
,
(
'<!--#var standard_html_header-->
\
n
%s
\
n
'
'<!--#var standard_html_footer-->'
%
join
(
map
(
lambda
q
:
custom_default_report
(
q
.
id
,
q
),
qs
),
join
(
map
(
lambda
q
,
report_style
=
report_style
:
custom_default_report
(
q
.
id
,
q
,
no_table
=
report_style
),
qs
),
'
\
n
<hr>
\
n
'
)))
if
REQUEST
:
return
self
.
manage_main
(
self
,
REQUEST
)
...
...
@@ -171,6 +173,9 @@ def default_input_form(arguments,action='query',
##############################################################################
#
# $Log: Search.py,v $
# Revision 1.3 1998/01/09 13:58:15 jim
# added option for tabular vs record reports
#
# Revision 1.2 1998/01/07 16:32:48 jim
# Brought up to date with latest Principia models.
#
...
...
lib/python/Shared/DC/ZRDB/customDefaultReport.dtml
View file @
521761b7
<!--#in %(id)s size=50 start=query_start-->
<!--#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-->
<table border>
%(heading)s
<!--#/if sequence-start-->
%(row)s
<!--#if sequence-end-->
</table>
<!--#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-->
<!--#else-->
There was no data matching this <!--#var title_or_id--> query.
<!--#/in-->
<!--#in %(id)s size=50 start=query_start-->
<!--#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)]
<!--#/if sequence-start-->
%(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-->
<!--#else-->
There was no data matching this <!--#var title_or_id--> query.
<!--#/in-->
lib/python/Shared/DC/ZRDB/searchAdd.dtml
View file @
521761b7
...
...
@@ -11,7 +11,7 @@ and a report for a searchable object.
<table>
<tr> <th>Select one or more searchable objects</th>
<td><select name="queries:list" size=
5
multiple>
<td><select name="queries:list" size=
4
multiple>
<!--#in aqueductQueryIds-->
<option><!--#var sequence-item--></option>
<!--#/in aqueductQueryIds-->
...
...
@@ -20,11 +20,15 @@ and a report for a searchable object.
<td><input name="report_id" size="40"></td></tr>
<tr> <th><em>Report Title<em></th>
<td><input name="report_title" size="40"></td></tr>
<tr> <th>Report Style</th>
<td><select name='report_style:int'>
<option value="0">Tabular</option>
<option value="1">Records</option>
</select></td></tr>
<tr> <th>Search Input ID</th>
<td><input name="input_id" size="40"></td></tr>
<tr> <th><em>Search Input Title</em></th>
<td><input name="input_title" size="40"></td></tr>
<!--#var smallRolesWidget-->
<tr><td></td><td><input type="SUBMIT" name="SUBMIT" value="Add"></td></tr>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment