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
7a4ebe6c
Commit
7a4ebe6c
authored
Jan 20, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bugs in fetching headers, footers, and leaves.
parent
6f3548e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
19 deletions
+33
-19
lib/python/TreeDisplay/TreeTag.py
lib/python/TreeDisplay/TreeTag.py
+33
-19
No files found.
lib/python/TreeDisplay/TreeTag.py
View file @
7a4ebe6c
...
...
@@ -9,8 +9,8 @@
# rights reserved.
#
############################################################################
__rcs_id__
=
'$Id: TreeTag.py,v 1.2
0 1997/12/22 15:09:52
jim Exp $'
__version__
=
'$Revision: 1.2
0
$'
[
11
:
-
2
]
__rcs_id__
=
'$Id: TreeTag.py,v 1.2
1 1998/01/20 16:13:10
jim Exp $'
__version__
=
'$Revision: 1.2
1
$'
[
11
:
-
2
]
from
DocumentTemplate.DT_Util
import
*
from
DocumentTemplate.DT_String
import
String
...
...
@@ -265,8 +265,12 @@ def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data,
else
:
h
=
''
if
have_arg
(
'header'
):
if
md
.
has_key
(
args
[
'header'
]):
output
(
md
.
getitem
(
args
[
'header'
],
0
)(
doc
=
args
[
'header'
]
if
hasattr
(
self
,
doc
):
doc
=
getattr
(
self
,
doc
)
elif
md
.
has_key
(
doc
):
doc
=
md
.
getitem
(
args
[
'header'
],
0
)
else
:
doc
=
None
if
doc
is
not
None
:
output
(
doc
(
self
,
md
,
standard_html_header
=
(
'<TR>%s<TD WIDTH="16"></TD>'
...
...
@@ -279,19 +283,25 @@ def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data,
if
items
==
1
:
# leaves
treeData
[
'-tree-substate-'
]
=
sub
treeData
[
'tree-level'
]
=
level
md
.
_push
(
treeData
)
output
(
md
.
getitem
(
args
[
'leaves'
],
0
)(
self
,
md
,
standard_html_header
=
(
'<TR>%s<TD WIDTH="16"></TD>'
'<TD%s VALIGN="TOP">'
%
(
h
,
(
dataspan
>
1
and
(
' COLSPAN="%s"'
%
dataspan
)
or
''
))),
standard_html_footer
=
'</TD></TR>'
,
))
md
.
_pop
(
1
)
doc
=
args
[
'leaves'
]
if
hasattr
(
self
,
doc
):
doc
=
getattr
(
self
,
doc
)
elif
md
.
has_key
(
doc
):
doc
=
md
.
getitem
(
args
[
'header'
],
0
)
else
:
doc
=
None
if
doc
is
not
None
:
treeData
[
'-tree-substate-'
]
=
sub
treeData
[
'tree-level'
]
=
level
md
.
_push
(
treeData
)
output
(
doc
(
self
,
md
,
standard_html_header
=
(
'<TR>%s<TD WIDTH="16"></TD>'
'<TD%s VALIGN="TOP">'
%
(
h
,
(
dataspan
>
1
and
(
' COLSPAN="%s"'
%
dataspan
)
or
''
))),
standard_html_footer
=
'</TD></TR>'
,
))
md
.
_pop
(
1
)
elif
have_arg
(
'expand'
):
treeData
[
'-tree-substate-'
]
=
sub
treeData
[
'tree-level'
]
=
level
...
...
@@ -318,8 +328,12 @@ def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data,
if
not
ids
(
substate
[
i
][
0
]):
del
substate
[
i
]
if
have_arg
(
'footer'
):
if
md
.
has_key
(
args
[
'footer'
]):
output
(
md
.
getitem
(
args
[
'footer'
],
0
)(
doc
=
args
[
'footer'
]
if
hasattr
(
self
,
doc
):
doc
=
getattr
(
self
,
doc
)
elif
md
.
has_key
(
doc
):
doc
=
md
.
getitem
(
args
[
'header'
],
0
)
else
:
doc
=
None
if
doc
is
not
None
:
output
(
doc
(
self
,
md
,
standard_html_header
=
(
'<TR>%s<TD WIDTH="16"></TD>'
...
...
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