Skip to content

Commit 3a1cbb2

Browse files
committed
Python 3 preparation: HTML templates.
1 parent 66e0954 commit 3a1cbb2

26 files changed

+37
-37
lines changed

share/roundup/templates/classic/html/_generic.help-submit.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<link rel="stylesheet" type="text/css" href="@@file/style.css" />
44
<meta http-equiv="Content-Type"
55
tal:attributes="content string:text/html;; charset=${request/client/charset}" />
6-
<tal:block tal:condition="python:request.form.has_key('property')">
6+
<tal:block tal:condition="python:'property' in request.form">
77
<title>Generic submit page for framed helper windows</title>
88
<script language="Javascript" type="text/javascript"
99
tal:content="structure string:<!--

share/roundup/templates/classic/html/_generic.help.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<link rel="stylesheet" type="text/css" href="@@file/style.css" />
55
<meta http-equiv="Content-Type"
66
tal:attributes="content string:text/html;; charset=${request/client/charset}" />
7-
<tal:block tal:condition="python:request.form.has_key('property')">
7+
<tal:block tal:condition="python:'property' in request.form">
88
<title i18n:translate=""><tal:x i18n:name="property"
99
tal:content="property" i18n:translate="" /> help - <span i18n:name="tracker"
1010
tal:replace="config/TRACKER_NAME" /></title>

share/roundup/templates/classic/html/_generic.item.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
</form>
4646

4747
<tal:block tal:condition="context/id"
48-
tal:define="limit python:[10, None][request.form.has_key('show_all_history')]"
48+
tal:define="limit python:[10, None]['show_all_history' in request.form]"
4949
tal:replace="structure python:context.history(limit=limit)" />
5050
<p tal:condition="not:exists:request/form/show_all_history" i18n:translate="">Showing 10 items.
5151
<a tal:attributes="href string:${context/_classname}${context/id}?show_all_history=yes">Show all history</a>

share/roundup/templates/classic/html/file.item.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<input type="hidden" name="@template" value="item">
3535
<input type="hidden" name="@required" value="name,type">
3636
<input type="hidden" name="@multilink"
37-
tal:condition="python:request.form.has_key('@multilink')"
37+
tal:condition="python:'@multilink' in request.form"
3838
tal:attributes="value request/form/@multilink/value">
3939
</td>
4040
<td tal:content="structure context/submit">submit button here</td>

share/roundup/templates/classic/html/issue.index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
tal:attributes="action request/classname">
109109

110110
<table class="form" tal:define="n_sort python:2">
111-
<tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch">
111+
<tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch">
112112
<tr tal:define="key python:len(request.sort)>n and request.sort[n]">
113113
<th>
114114
<tal:block tal:condition="not:n" i18n:translate="">Sort on:</tal:block>
@@ -129,7 +129,7 @@
129129
</td>
130130
</tr>
131131
</tal:block>
132-
<tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch">
132+
<tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch">
133133
<tr tal:define="key python:len(request.group)>n and request.group[n]">
134134
<th>
135135
<tal:block tal:condition="not:n" i18n:translate="">Group on:</tal:block>

share/roundup/templates/classic/html/keyword.item.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<table class="otherinfo" tal:define="keywords db/keyword/list"
1010
tal:condition="keywords">
1111
<tr><th colspan="4" class="header" i18n:translate="">Existing Keywords</th></tr>
12-
<tr tal:repeat="start python:range(0, len(keywords), 4)">
12+
<tr tal:repeat="start python:list(range(0, len(keywords), 4))">
1313
<td width="25%" tal:define="batch python:utils.Batch(keywords, 4, start)"
1414
tal:repeat="keyword batch">
1515
<a tal:attributes="href string:keyword${keyword/id}"

share/roundup/templates/classic/html/user.help.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<link rel="stylesheet" type="text/css" href="@@file/style.css" />
99
<meta http-equiv="Content-Type"
1010
tal:attributes="content string:text/html;; charset=${request/client/charset}" />
11-
<tal:block tal:condition="python:request.form.has_key('property')">
11+
<tal:block tal:condition="python:'property' in request.form">
1212
<title><tal:x i18n:translate=""><tal:x i18n:name="property"
1313
tal:content="property" i18n:translate="" /> help - <span i18n:name="tracker"
1414
tal:replace="config/TRACKER_NAME" /></tal:x></title>

share/roundup/templates/devel/html/_generic.help-submit.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<link rel="stylesheet" type="text/css" href="@@file/style.css" />
44
<meta http-equiv="Content-Type"
55
tal:attributes="content string:text/html;; charset=${request/client/charset}" />
6-
<tal:block tal:condition="python:request.form.has_key('property')">
6+
<tal:block tal:condition="python:'property' in request.form">
77
<title>Generic submit page for framed helper windows</title>
88
<script language="Javascript" type="text/javascript"
99
tal:content="structure string:<!--

share/roundup/templates/devel/html/_generic.help.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<tal:block metal:use-macro="templates/help/macros/frame">
22
<tal:block metal:fill-slot="content">
3-
<tal:block tal:condition="python:request.form.has_key('property')">
3+
<tal:block tal:condition="python:'property' in request.form">
44
<form name="frm_help" action="#">
55
<table class="classhelp"
66
tal:define="props python:request.form['properties'].value.split(',');
@@ -33,7 +33,7 @@
3333
text_field.value=original_field;
3434
//--></script>
3535
</tal:block>
36-
<tal:block tal:condition="python:not request.form.has_key('property')">
36+
<tal:block tal:condition="python:'property' not in request.form">
3737
<tal:block tal:define="batch request/batch;
3838
props python:request.form['properties'].value.split(',')">
3939
<table width="100%">

share/roundup/templates/devel/html/bug.index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123

124124
<table class="form" tal:define="n_sort python:2">
125125
<!--
126-
<tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch">
126+
<tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch">
127127
<tr tal:define="key python:len(request.sort)>n and request.sort[n]">
128128
<th>
129129
<tal:block tal:condition="not:n" i18n:translate="">Sort on:</tal:block>
@@ -145,7 +145,7 @@
145145
</tr>
146146
</tal:block>
147147
-->
148-
<tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch">
148+
<tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch">
149149
<tr tal:define="key python:len(request.group)>n and request.group[n]">
150150
<th>
151151
<tal:block tal:condition="not:n" i18n:translate="">Group on:</tal:block>

0 commit comments

Comments
 (0)