Mercurial > p > roundup > code
changeset 7928:c05ea62b4c7a
fix: issue2551347 - make _generic.help.html work without property settings
This lets the classhelp() method run in read only mode to provide
information on a Link property without updating the property.
Updating the property can be done by selecting the proper value using
the drop-down.
Update classic and minimal templates to allow this to work.
Update upgrading and reference docs.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 02 May 2024 22:11:37 -0400 |
| parents | ea4e3dc4b59e |
| children | 5ac2af6c7f97 |
| files | CHANGES.txt doc/reference.txt doc/upgrading.txt share/roundup/templates/classic/html/_generic.help.html share/roundup/templates/minimal/html/_generic.help.html |
| diffstat | 5 files changed, 48 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Thu May 02 21:54:16 2024 -0400 +++ b/CHANGES.txt Thu May 02 22:11:37 2024 -0400 @@ -190,6 +190,12 @@ parameter. So you can start a demo tracker that is available from your network using 'roundup-demo ... -B hostname -H hostname'. (John Rouillard) +- issue2551347 - make _generic.help.html work without property + settings. THis applies to classic or minimal trackers. It allows use + of classhelp without the property seting for informtion only + (e.g. description of what a priority or status means) without being + able to select the property in the classhelper. Good for adding help + for Link properties. (John Rouilllard) 2023-07-13 2.3.0
--- a/doc/reference.txt Thu May 02 21:54:16 2024 -0400 +++ b/doc/reference.txt Thu May 02 22:11:37 2024 -0400 @@ -2756,9 +2756,16 @@ The popup window is resizable and scrollable. - If the "property" arg is given, it's passed through to the - JavaScript help_window function. This allows updating of a - property in the calling HTML page. + If the "property" arg is given, it's passed through to + the JavaScript help_window function. This allows + updating of a property in the calling HTML + page. "property" is optional. If not provided, the + resulting window will be read only. This is useful for + Link properties where selection can be done by drop-down, + but descriptions of the values can be seen in the popup. + Note that some tracker templates may generate an error + if the property is missing. Version 2.4.0 of Roundup + fixed these templates. If the "form" arg is given, it's passed through to the JavaScript help_window function - it's the name of the form
--- a/doc/upgrading.txt Thu May 02 21:54:16 2024 -0400 +++ b/doc/upgrading.txt Thu May 02 22:11:37 2024 -0400 @@ -367,6 +367,20 @@ `issue2551320 <https://issues.roundup-tracker.org/issue2551320>`_ to fix your template. +Update for _generic.help.html (optional) +---------------------------------------- + +Using the ``_generic.help.html`` template with ``classhelper()`` to +provide information on a property without selecting a property caused +an error when processing the template. Using the help template with +Link properties can provide description or other information that the +user can use to determine the right setting. + +If your tracker is based on the minimal or classic tracker and you have +not changed the _generic.help.html file, you can copy it into place +from the template directory. + + Fix static_files use of '-' directory (info) --------------------------------------------
--- a/share/roundup/templates/classic/html/_generic.help.html Thu May 02 21:54:16 2024 -0400 +++ b/share/roundup/templates/classic/html/_generic.help.html Thu May 02 22:11:37 2024 -0400 @@ -1,12 +1,12 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html tal:define="property request/form/property/value" > +<html tal:define="property request/form/property/value | nothing" > <head> <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:'property' in request.form"> <title i18n:translate=""><tal:x i18n:name="property" - tal:content="property" i18n:translate="" /> help - <span i18n:name="tracker" + tal:content="property | default" i18n:translate="" /> help - <span i18n:name="tracker" tal:replace="config/TRACKER_NAME" /></title> <script language="Javascript" type="text/javascript" tal:content="structure string: @@ -23,7 +23,7 @@ tal:define="batch request/batch; props python:request.form['properties'].value.split(',')"> - <div id="classhelp-controls"> + <div tal:condition="property" id="classhelp-controls"> <!--input type="button" name="btn_clear" value="Clear" onClick="clearList()"/ --> <input type="text" name="text_preview" size="24" class="preview" @@ -40,7 +40,7 @@ <th> <a tal:define="prev batch/previous" tal:condition="prev" tal:attributes="href python:request.indexargs_url(request.classname, - {'@template':'help', 'property': request.form['property'].value, + {'@template':'help', 'property': property, 'properties': request.form['properties'].value, 'form': request.form['form'].value, 'type': request.form['type'].value, @@ -56,7 +56,7 @@ <th> <a tal:define="next batch/next" tal:condition="next" tal:attributes="href python:request.indexargs_url(request.classname, - {'@template':'help', 'property': request.form['property'].value, + {'@template':'help', 'property': property, 'properties': request.form['properties'].value, 'form': request.form['form'].value, 'type': request.form['type'].value, @@ -69,12 +69,12 @@ <table class="classhelp"> <tr> - <th> <b>x</b></th> + <th tal:condition="property"> <b>x</b></th> <th tal:repeat="prop props" tal:content="prop" i18n:translate=""></th> </tr> <tr tal:repeat="item batch"> <tal:block tal:define="attr python:item[props[0]]" > - <td> + <td tal:condition="property"> <input name="check" onclick="updatePreview();" tal:attributes="type python:request.form['type'].value; @@ -88,7 +88,7 @@ </tal:block> </tr> <tr> - <th> <b>x</b></th> + <th tal:condition="property"> <b>x</b></th> <th tal:repeat="prop props" tal:content="prop" i18n:translate=""></th> </tr> </table> @@ -96,3 +96,4 @@ </form> </body> </html> +<!-- SHA: b98bdbeee81ffdf2acc9e9c8b17a6110bf60ac7a -->
--- a/share/roundup/templates/minimal/html/_generic.help.html Thu May 02 21:54:16 2024 -0400 +++ b/share/roundup/templates/minimal/html/_generic.help.html Thu May 02 22:11:37 2024 -0400 @@ -1,12 +1,12 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html tal:define="property request/form/property/value" > +<html tal:define="property request/form/property/value | nothing" > <head> <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:'property' in request.form"> <title i18n:translate=""><tal:x i18n:name="property" - tal:content="property" i18n:translate="" /> help - <span i18n:name="tracker" + tal:content="property | default" i18n:translate="" /> help - <span i18n:name="tracker" tal:replace="config/TRACKER_NAME" /></title> <script language="Javascript" type="text/javascript" tal:content="structure string: @@ -23,7 +23,7 @@ tal:define="batch request/batch; props python:request.form['properties'].value.split(',')"> - <div id="classhelp-controls"> + <div tal:condition="property" id="classhelp-controls"> <!--input type="button" name="btn_clear" value="Clear" onClick="clearList()"/ --> <input type="text" name="text_preview" size="24" class="preview" @@ -40,7 +40,7 @@ <th> <a tal:define="prev batch/previous" tal:condition="prev" tal:attributes="href python:request.indexargs_url(request.classname, - {'@template':'help', 'property': request.form['property'].value, + {'@template':'help', 'property': property, 'properties': request.form['properties'].value, 'form': request.form['form'].value, 'type': request.form['type'].value, @@ -56,7 +56,7 @@ <th> <a tal:define="next batch/next" tal:condition="next" tal:attributes="href python:request.indexargs_url(request.classname, - {'@template':'help', 'property': request.form['property'].value, + {'@template':'help', 'property': property, 'properties': request.form['properties'].value, 'form': request.form['form'].value, 'type': request.form['type'].value, @@ -69,12 +69,12 @@ <table class="classhelp"> <tr> - <th> <b>x</b></th> + <th tal:condition="property"> <b>x</b></th> <th tal:repeat="prop props" tal:content="prop" i18n:translate=""></th> </tr> <tr tal:repeat="item batch"> <tal:block tal:define="attr python:item[props[0]]" > - <td> + <td tal:condition="property"> <input name="check" onclick="updatePreview();" tal:attributes="type python:request.form['type'].value; @@ -88,7 +88,7 @@ </tal:block> </tr> <tr> - <th> <b>x</b></th> + <th tal:condition="property"> <b>x</b></th> <th tal:repeat="prop props" tal:content="prop" i18n:translate=""></th> </tr> </table> @@ -96,3 +96,4 @@ </form> </body> </html> +<!-- SHA: b98bdbeee81ffdf2acc9e9c8b17a6110bf60ac7a -->
