-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Be able to put an HTML separator between the children of a RepeatingW…
…idget. We also need to support it for the CompoundWidget since it uses the same template
- Loading branch information
Showing
7 changed files
with
50 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
<?python | ||
num = len(w.children) | ||
?> | ||
<div xmlns:py="http://genshi.edgewall.org/" py:attrs="w.attrs"> | ||
<py:for each="c in w.children">${c.display()}</py:for> | ||
</div> | ||
<py:for each="i,c in enumerate(w.children)">${c.display()} | ||
<py:if test="w.separator and i != (num-1)">${w.separator}</py:if> | ||
</py:for> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<div {{w.attrs | xmlattr }}> | ||
{% for c in w.children %} | ||
{{c.display()}} | ||
{% if w.separator and not loop.last %}{{w.separator|safe}}{% endif %} | ||
{% endfor %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
<?python | ||
num = len(w.children) | ||
?> | ||
<div xmlns:py="http://genshi.edgewall.org/" py:attrs="w.attrs"> | ||
<py:for each="c in w.children">${c.display()}</py:for> | ||
</div> | ||
<py:for each="i,c in enumerate(w.children)">${c.display()} | ||
<py:if test="w.separator and i != (num-1)">${w.separator}</py:if> | ||
</py:for> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<div tal:define="compile import: tw2.core.mako_util" tal:omit-tag=""></div> | ||
<div tal:attributes="id w.attrs.get('id')"><span | ||
tal:repeat="c w.children" | ||
tal:content="structure c.display()" | ||
tal:omit-tag="" | ||
></span></div> | ||
<div tal:attributes="id w.attrs.get('id')"> | ||
<loop tal:repeat="c w.children" tal:omit-tag=""> | ||
<span tal:replace="c.display()"></span> | ||
<span tal:condition="w.separator and not repeat.c.end" tal:replace="structure w.separator"></span> | ||
</loop></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters