Mercurial > p > roundup > code
changeset 5413:7a41dd2abbbd
Python 3 preparation: HTML templates.
line wrap: on
line diff
--- a/share/roundup/templates/classic/html/_generic.help-submit.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/classic/html/_generic.help-submit.html Wed Jul 25 00:37:54 2018 +0000 @@ -3,7 +3,7 @@ <link rel="stylesheet" type="text/css" href="@@file/style.css" /> <meta http-equiv="Content-Type" tal:attributes="content string:text/html;; charset=${request/client/charset}" /> - <tal:block tal:condition="python:request.form.has_key('property')"> + <tal:block tal:condition="python:'property' in request.form"> <title>Generic submit page for framed helper windows</title> <script language="Javascript" type="text/javascript" tal:content="structure string:<!--
--- a/share/roundup/templates/classic/html/_generic.help.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/classic/html/_generic.help.html Wed Jul 25 00:37:54 2018 +0000 @@ -4,7 +4,7 @@ <link rel="stylesheet" type="text/css" href="@@file/style.css" /> <meta http-equiv="Content-Type" tal:attributes="content string:text/html;; charset=${request/client/charset}" /> - <tal:block tal:condition="python:request.form.has_key('property')"> + <tal:block tal:condition="python:'property' in request.form"> <title i18n:translate=""><tal:x i18n:name="property" tal:content="property" i18n:translate="" /> help - <span i18n:name="tracker" tal:replace="config/TRACKER_NAME" /></title>
--- a/share/roundup/templates/classic/html/_generic.item.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/classic/html/_generic.item.html Wed Jul 25 00:37:54 2018 +0000 @@ -45,7 +45,7 @@ </form> <tal:block tal:condition="context/id" - tal:define="limit python:[10, None][request.form.has_key('show_all_history')]" + tal:define="limit python:[10, None]['show_all_history' in request.form]" tal:replace="structure python:context.history(limit=limit)" /> <p tal:condition="not:exists:request/form/show_all_history" i18n:translate="">Showing 10 items. <a tal:attributes="href string:${context/_classname}${context/id}?show_all_history=yes">Show all history</a>
--- a/share/roundup/templates/classic/html/file.item.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/classic/html/file.item.html Wed Jul 25 00:37:54 2018 +0000 @@ -34,7 +34,7 @@ <input type="hidden" name="@template" value="item"> <input type="hidden" name="@required" value="name,type"> <input type="hidden" name="@multilink" - tal:condition="python:request.form.has_key('@multilink')" + tal:condition="python:'@multilink' in request.form" tal:attributes="value request/form/@multilink/value"> </td> <td tal:content="structure context/submit">submit button here</td>
--- a/share/roundup/templates/classic/html/issue.index.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/classic/html/issue.index.html Wed Jul 25 00:37:54 2018 +0000 @@ -108,7 +108,7 @@ tal:attributes="action request/classname"> <table class="form" tal:define="n_sort python:2"> - <tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch"> + <tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch"> <tr tal:define="key python:len(request.sort)>n and request.sort[n]"> <th> <tal:block tal:condition="not:n" i18n:translate="">Sort on:</tal:block> @@ -129,7 +129,7 @@ </td> </tr> </tal:block> - <tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch"> + <tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch"> <tr tal:define="key python:len(request.group)>n and request.group[n]"> <th> <tal:block tal:condition="not:n" i18n:translate="">Group on:</tal:block>
--- a/share/roundup/templates/classic/html/keyword.item.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/classic/html/keyword.item.html Wed Jul 25 00:37:54 2018 +0000 @@ -9,7 +9,7 @@ <table class="otherinfo" tal:define="keywords db/keyword/list" tal:condition="keywords"> <tr><th colspan="4" class="header" i18n:translate="">Existing Keywords</th></tr> - <tr tal:repeat="start python:range(0, len(keywords), 4)"> + <tr tal:repeat="start python:list(range(0, len(keywords), 4))"> <td width="25%" tal:define="batch python:utils.Batch(keywords, 4, start)" tal:repeat="keyword batch"> <a tal:attributes="href string:keyword${keyword/id}"
--- a/share/roundup/templates/classic/html/user.help.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/classic/html/user.help.html Wed Jul 25 00:37:54 2018 +0000 @@ -8,7 +8,7 @@ <link rel="stylesheet" type="text/css" href="@@file/style.css" /> <meta http-equiv="Content-Type" tal:attributes="content string:text/html;; charset=${request/client/charset}" /> - <tal:block tal:condition="python:request.form.has_key('property')"> + <tal:block tal:condition="python:'property' in request.form"> <title><tal:x i18n:translate=""><tal:x i18n:name="property" tal:content="property" i18n:translate="" /> help - <span i18n:name="tracker" tal:replace="config/TRACKER_NAME" /></tal:x></title>
--- a/share/roundup/templates/devel/html/_generic.help-submit.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/devel/html/_generic.help-submit.html Wed Jul 25 00:37:54 2018 +0000 @@ -3,7 +3,7 @@ <link rel="stylesheet" type="text/css" href="@@file/style.css" /> <meta http-equiv="Content-Type" tal:attributes="content string:text/html;; charset=${request/client/charset}" /> - <tal:block tal:condition="python:request.form.has_key('property')"> + <tal:block tal:condition="python:'property' in request.form"> <title>Generic submit page for framed helper windows</title> <script language="Javascript" type="text/javascript" tal:content="structure string:<!--
--- a/share/roundup/templates/devel/html/_generic.help.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/devel/html/_generic.help.html Wed Jul 25 00:37:54 2018 +0000 @@ -1,6 +1,6 @@ <tal:block metal:use-macro="templates/help/macros/frame"> <tal:block metal:fill-slot="content"> -<tal:block tal:condition="python:request.form.has_key('property')"> +<tal:block tal:condition="python:'property' in request.form"> <form name="frm_help" action="#"> <table class="classhelp" tal:define="props python:request.form['properties'].value.split(','); @@ -33,7 +33,7 @@ text_field.value=original_field; //--></script> </tal:block> - <tal:block tal:condition="python:not request.form.has_key('property')"> + <tal:block tal:condition="python:'property' not in request.form"> <tal:block tal:define="batch request/batch; props python:request.form['properties'].value.split(',')"> <table width="100%">
--- a/share/roundup/templates/devel/html/bug.index.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/devel/html/bug.index.html Wed Jul 25 00:37:54 2018 +0000 @@ -123,7 +123,7 @@ <table class="form" tal:define="n_sort python:2"> <!-- -<tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch"> +<tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch"> <tr tal:define="key python:len(request.sort)>n and request.sort[n]"> <th> <tal:block tal:condition="not:n" i18n:translate="">Sort on:</tal:block> @@ -145,7 +145,7 @@ </tr> </tal:block> --> - <tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch"> + <tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch"> <tr tal:define="key python:len(request.group)>n and request.group[n]"> <th> <tal:block tal:condition="not:n" i18n:translate="">Group on:</tal:block>
--- a/share/roundup/templates/devel/html/file.item.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/devel/html/file.item.html Wed Jul 25 00:37:54 2018 +0000 @@ -39,7 +39,7 @@ <input type="hidden" name="@template" value="item"> <input type="hidden" name="@required" value="name,type"> <input type="hidden" name="@multilink" - tal:condition="python:request.form.has_key('@multilink')" + tal:condition="python:'@multilink' in request.form" tal:attributes="value request/form/@multilink/value"> </td> <td tal:content="structure context/submit">submit button here</td>
--- a/share/roundup/templates/devel/html/milestone.index.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/devel/html/milestone.index.html Wed Jul 25 00:37:54 2018 +0000 @@ -88,7 +88,7 @@ <table class="form" tal:define="n_sort python:2"> <!-- -<tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch"> +<tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch"> <tr tal:define="key python:len(request.sort)>n and request.sort[n]"> <th> <tal:block tal:condition="not:n" i18n:translate="">Sort on:</tal:block> @@ -110,7 +110,7 @@ </tr> </tal:block> --> - <tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch"> + <tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch"> <tr tal:define="key python:len(request.group)>n and request.group[n]"> <th> <tal:block tal:condition="not:n" i18n:translate="">Group on:</tal:block>
--- a/share/roundup/templates/devel/html/patch.item.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/devel/html/patch.item.html Wed Jul 25 00:37:54 2018 +0000 @@ -47,7 +47,7 @@ <input type="hidden" name="@template" value="item"> <input type="hidden" name="@required" value="name,type"> <input type="hidden" name="@multilink" - tal:condition="python:request.form.has_key('@multilink')" + tal:condition="python:'@multilink' in request.form" tal:attributes="value request/form/@multilink/value"> </td> <td tal:content="structure context/submit">submit button here</td> @@ -135,7 +135,7 @@ <input type="hidden" name="@template" value="item"> <input type="hidden" name="@required" value="name,type"> <input type="hidden" name="@multilink" - tal:condition="python:request.form.has_key('@multilink')" + tal:condition="python:'@multilink' in request.form" tal:attributes="value request/form/@multilink/value"> </td> <td tal:content="structure context/submit">submit button here</td>
--- a/share/roundup/templates/devel/html/task.index.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/devel/html/task.index.html Wed Jul 25 00:37:54 2018 +0000 @@ -123,7 +123,7 @@ <table class="form" tal:define="n_sort python:2"> <!-- -<tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch"> +<tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch"> <tr tal:define="key python:len(request.sort)>n and request.sort[n]"> <th> <tal:block tal:condition="not:n" i18n:translate="">Sort on:</tal:block> @@ -145,7 +145,7 @@ </tr> </tal:block> --> - <tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch"> + <tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch"> <tr tal:define="key python:len(request.group)>n and request.group[n]"> <th> <tal:block tal:condition="not:n" i18n:translate="">Group on:</tal:block>
--- a/share/roundup/templates/devel/html/user.forgotten.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/devel/html/user.forgotten.html Wed Jul 25 00:37:54 2018 +0000 @@ -5,7 +5,7 @@ i18n:translate="">Password reset request</span> <td class="content" metal:fill-slot="content"> -<tal:askforinfo tal:condition="python:options['error_message'] or not request.form.has_key('@action')"> +<tal:askforinfo tal:condition="python:options['error_message'] or '@action' not in request.form"> <p i18n:translate="">You have two options if you have forgotten your password. If you know the email address you registered with, enter it below.</p>
--- a/share/roundup/templates/jinja2/html/file.item.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/jinja2/html/file.item.html Wed Jul 25 00:37:54 2018 +0000 @@ -25,7 +25,7 @@ <input type="hidden" name="@template" value="item"> <input type="hidden" name="@required" value="name,type"> - {% if request.form.has_key('@multilink') %} + {% if '@multilink' in request.form %} <input type="hidden" name="@multilink" value='request.form.@multilink.value()'> {% endif %}
--- a/share/roundup/templates/minimal/html/_generic.help.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/minimal/html/_generic.help.html Wed Jul 25 00:37:54 2018 +0000 @@ -4,7 +4,7 @@ <link rel="stylesheet" type="text/css" href="@@file/style.css" /> <meta http-equiv="Content-Type" tal:attributes="content string:text/html;; charset=${request/client/charset}" /> - <tal:block tal:condition="python:request.form.has_key('property')"> + <tal:block tal:condition="python:'property' in request.form"> <title i18n:translate=""><tal:x i18n:name="property" tal:content="property" i18n:translate="" /> help - <span i18n:name="tracker" tal:replace="config/TRACKER_NAME" /></title>
--- a/share/roundup/templates/minimal/html/_generic.item.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/minimal/html/_generic.item.html Wed Jul 25 00:37:54 2018 +0000 @@ -45,7 +45,7 @@ </form> <tal:block tal:condition="context/id" - tal:define="limit python:[10, None][request.form.has_key('show_all_history')]" + tal:define="limit python:[10, None]['show_all_history' in request.form]" tal:replace="structure python:context.history(limit=limit)" /> <p tal:condition="not:exists:request/form/show_all_history" i18n:translate="">Showing 10 items. <a tal:attributes="href string:${context/_classname}${context/id}?show_all_history=yes">Show all history</a>
--- a/share/roundup/templates/responsive/html/_generic.help-submit.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/responsive/html/_generic.help-submit.html Wed Jul 25 00:37:54 2018 +0000 @@ -3,7 +3,7 @@ <link rel="stylesheet" type="text/css" href="@@file/style.css" /> <meta http-equiv="Content-Type" tal:attributes="content string:text/html;; charset=${request/client/charset}" /> - <tal:block tal:condition="python:request.form.has_key('property')"> + <tal:block tal:condition="python:'property' in request.form"> <title>Generic submit page for framed helper windows</title> <script language="Javascript" type="text/javascript" tal:content="structure string:<!--
--- a/share/roundup/templates/responsive/html/_generic.help.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/responsive/html/_generic.help.html Wed Jul 25 00:37:54 2018 +0000 @@ -1,6 +1,6 @@ <tal:block metal:use-macro="templates/help/macros/frame"> <tal:block metal:fill-slot="content"> -<tal:block tal:condition="python:request.form.has_key('property')"> +<tal:block tal:condition="python:'property' in request.form"> <form name="frm_help" action="#"> <table class="table" tal:define="props python:request.form['properties'].value.split(','); @@ -33,7 +33,7 @@ text_field.value=original_field; //--></script> </tal:block> - <tal:block tal:condition="python:not request.form.has_key('property')"> + <tal:block tal:condition="python:'property' not in request.form"> <tal:block tal:define="batch request/batch; props python:request.form['properties'].value.split(',')"> <table width="100%">
--- a/share/roundup/templates/responsive/html/bug.index.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/responsive/html/bug.index.html Wed Jul 25 00:37:54 2018 +0000 @@ -111,7 +111,7 @@ <table class="form" tal:define="n_sort python:2"> <!-- -<tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch"> +<tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch"> <tr tal:define="key python:len(request.sort)>n and request.sort[n]"> <th> <tal:block tal:condition="not:n" i18n:translate="">Sort on:</tal:block> @@ -133,7 +133,7 @@ </tr> </tal:block> --> - <tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch"> + <tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch"> <tr tal:define="key python:len(request.group)>n and request.group[n]"> <th> <tal:block tal:condition="not:n" i18n:translate="">Group on:</tal:block>
--- a/share/roundup/templates/responsive/html/file.item.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/responsive/html/file.item.html Wed Jul 25 00:37:54 2018 +0000 @@ -39,7 +39,7 @@ <input type="hidden" name="@template" value="item"> <input type="hidden" name="@required" value="name,type"> <input type="hidden" name="@multilink" - tal:condition="python:request.form.has_key('@multilink')" + tal:condition="python:'@multilink' in request.form" tal:attributes="value request/form/@multilink/value"> </td> <td tal:content="structure context/submit">submit button here</td>
--- a/share/roundup/templates/responsive/html/milestone.index.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/responsive/html/milestone.index.html Wed Jul 25 00:37:54 2018 +0000 @@ -86,7 +86,7 @@ <table class="form" tal:define="n_sort python:2"> <!-- -<tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch"> +<tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch"> <tr tal:define="key python:len(request.sort)>n and request.sort[n]"> <th> <tal:block tal:condition="not:n" i18n:translate="">Sort on:</tal:block> @@ -108,7 +108,7 @@ </tr> </tal:block> --> - <tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch"> + <tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch"> <tr tal:define="key python:len(request.group)>n and request.group[n]"> <th> <tal:block tal:condition="not:n" i18n:translate="">Group on:</tal:block>
--- a/share/roundup/templates/responsive/html/patch.item.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/responsive/html/patch.item.html Wed Jul 25 00:37:54 2018 +0000 @@ -47,7 +47,7 @@ <input type="hidden" name="@template" value="item"> <input type="hidden" name="@required" value="name,type"> <input type="hidden" name="@multilink" - tal:condition="python:request.form.has_key('@multilink')" + tal:condition="python:'@multilink' in request.form" tal:attributes="value request/form/@multilink/value"> </td> <td tal:content="structure context/submit">submit button here</td> @@ -133,7 +133,7 @@ <input type="hidden" name="@template" value="item"> <input type="hidden" name="@required" value="name,type"> <input type="hidden" name="@multilink" - tal:condition="python:request.form.has_key('@multilink')" + tal:condition="python:'@multilink' in request.form" tal:attributes="value request/form/@multilink/value"> </td> <td tal:content="structure context/submit">submit button here</td>
--- a/share/roundup/templates/responsive/html/task.index.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/responsive/html/task.index.html Wed Jul 25 00:37:54 2018 +0000 @@ -106,7 +106,7 @@ <table class="form" tal:define="n_sort python:2"> <!-- -<tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch"> +<tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch"> <tr tal:define="key python:len(request.sort)>n and request.sort[n]"> <th> <tal:block tal:condition="not:n" i18n:translate="">Sort on:</tal:block> @@ -128,7 +128,7 @@ </tr> </tal:block> --> - <tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch"> + <tal:block tal:repeat="n python:list(range(n_sort))" tal:condition="batch"> <tr tal:define="key python:len(request.group)>n and request.group[n]"> <th> <tal:block tal:condition="not:n" i18n:translate="">Group on:</tal:block>
--- a/share/roundup/templates/responsive/html/user.forgotten.html Wed Jul 25 00:36:40 2018 +0000 +++ b/share/roundup/templates/responsive/html/user.forgotten.html Wed Jul 25 00:37:54 2018 +0000 @@ -5,7 +5,7 @@ i18n:translate="">Password reset request</span> <td class="content" metal:fill-slot="content"> -<tal:askforinfo tal:condition="python:options['error_message'] or not request.form.has_key('@action')"> +<tal:askforinfo tal:condition="python:options['error_message'] or '@action' not in request.form"> <p i18n:translate="">You have two options if you have forgotten your password. If you know the email address you registered with, enter it below.</p>
