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
69f09184
Commit
69f09184
authored
Mar 20, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new meaning for else tag when next or previous are used.
parent
d0c29667
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
3 deletions
+24
-3
lib/python/DocumentTemplate/DT_In.py
lib/python/DocumentTemplate/DT_In.py
+24
-3
No files found.
lib/python/DocumentTemplate/DT_In.py
View file @
69f09184
...
...
@@ -280,9 +280,23 @@
Missing values are either 'None' or the attribute 'Value'
of the module 'Missing', if present.
'else' continuation tag within in
An 'else' tag may be used as a continuation tag in the 'in' tag.
The source after the 'else' tag is inserted if:
- The sequence given to the 'in' tag is of zero length, or
- The 'previous' attribute was used and their are no
previous batches, or
- The 'next' attribute was used and their are no
next batches, or
'''
#'
__rcs_id__
=
'$Id: DT_In.py,v 1.2
1 1998/02/18 15:17:54
jim Exp $'
__rcs_id__
=
'$Id: DT_In.py,v 1.2
2 1998/03/20 17:52:29
jim Exp $'
############################################################################
# Copyright
...
...
@@ -336,7 +350,7 @@ __rcs_id__='$Id: DT_In.py,v 1.21 1998/02/18 15:17:54 jim Exp $'
# (540) 371-6909
#
############################################################################
__version__
=
'$Revision: 1.2
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
2
$'
[
11
:
-
2
]
from
DT_Util
import
*
from
string
import
find
,
atoi
,
join
...
...
@@ -461,6 +475,8 @@ class In:
kw
[
'previous-sequence-end-index'
]
=
pend
-
1
kw
[
'previous-sequence-size'
]
=
pend
+
1
-
pstart
result
=
section
(
None
,
md
)
elif
self
.
elses
:
result
=
self
.
elses
(
None
,
md
)
else
:
result
=
''
elif
next
:
try
:
...
...
@@ -475,7 +491,9 @@ class In:
kw
[
'next-sequence-end-index'
]
=
pend
-
1
kw
[
'next-sequence-size'
]
=
pend
+
1
-
pstart
result
=
section
(
None
,
md
)
except
:
result
=
''
except
:
if
self
.
elses
:
result
=
self
.
elses
(
None
,
md
)
else
:
result
=
''
else
:
result
=
[]
for
index
in
range
(
first
,
end
):
...
...
@@ -856,6 +874,9 @@ class sequence_variables:
############################################################################
# $Log: DT_In.py,v $
# Revision 1.22 1998/03/20 17:52:29 jim
# Added new meaning for else tag when next or previous are used.
#
# Revision 1.21 1998/02/18 15:17:54 jim
# Added sequence-step-start-index and sequence-step-end-index and
# their documentation.
...
...
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