view website/issues/html/_generic.help-list.html @ 4587:a2eb4fb3e6d8

New Chameleon templating engine, engine is now configurable. We now have two configurable templating engines, the old Zope TAL templates (called zopetal in the config) and the new Chameleon (called chameleon in the config). A new config-option "template_engine" under [main] can take these config-options, the default is zopetal. Thanks to Cheer Xiao for the idea of making this configurable *and* for the actual implementation! Cheer Xiao commit log: - The original TAL engine ported from Zope is thereafter referred to as "zopetal", in speech and in code - A new option "template_engine" under [main] introduced - Zopetal-specific code stripped from cgi/templating.py to form the new cgi/engine_zopetal.py - Interface to Chameleon in cgi/engine_chameleon.py - Engines are supposed to provide a Templates class that mimics the behavior of the old cgi.templating.Templates. The Templates class is preferably subclassed from cgi.templating.TemplatesBase. - New function cgi.templating.get_templates to get the appropriate engine's Templates instance according to the engine name
author Ralf Schlatterbeck <rsc@runtux.com>
date Thu, 23 Feb 2012 18:10:03 +0100
parents 6e3e4f24c753
children baa3e51d0f38
line wrap: on
line source

<!-- vim: sw=2 ts=8 et -->
<html tal:define="vok context/is_view_ok">
  <head>
    <title>Search result for user helper</title>
    <link rel="stylesheet" type="text/css" href="@@file/style.css" />
    <script language="Javascript" type="text/javascript"
        tal:content="structure string:<!--
        // this is the name of the field in the original form that we're working on
        form  = parent.opener.document.${request/form/form/value};
        field  = '${request/form/property/value}';
    //-->"></script>
    <script src="@@file/help_controls.js" type="text/javascript"></script>
<script type="text/javascript"><!--
var text_field = parent.submit.document.frm_help.text_preview;
//--></script>
  </head>
  <body>
    <pre tal:content="request/env/QUERY_STRING" tal:condition=false />

  <p tal:condition="not:vok" i18n:translate="">You are not
  allowed to view this page.</p>

  <tal:if condition="context/is_view_ok">
  <tal:def define="batch request/batch;">
  <form name=dummyform>
    <table width="100%"
      tal:define="template string:help-list"
      metal:use-macro="templates/help/macros/batch_navi"
      >
      <tr class="navigation">
       <th>
        <a href="#">&lt;&lt; previous</a>
       </th>
       <th i18n:translate="">1..25 out of 50
       </th>
       <th>
        <a href="#">next &gt;&gt;</a>
       </th>
      </tr>
     </table>

  <form name=dummyform>
  <table class="classhelp"
    tal:define="
       props python:request.form['properties'].value.split(',');
       legend templates/help/macros/legend;
    "><thead>
      <tr metal:use-macro="legend">
         <th>&nbsp;<b>x</b></th>
         <th tal:repeat="prop props" tal:content="prop" i18n:translate=""></th>
       </tr>
     </thead>
     <tfoot tal:condition=true>
       <tr metal:use-macro="legend" />
     </tfoot>
     <tbody>
       <tr tal:repeat="item batch">
         <tal:block tal:define="attr python:item[props[0]]" >
           <td>
             <input name="check"
             onclick="switch_val(text_field, this);" type="checkbox"
             tal:attributes="value attr; id string:id_$attr" />
             </td>
             <td tal:repeat="prop props">
                 <label class="classhelp-label"
                        tal:attributes="for string:id_$attr"
                        tal:content="structure python:item[prop]"></label>
             </td>
           </tal:block>
         </tr>
       </tbody>
     </table>
   </form>
     </tal:def>
     </tal:if>
     
     <pre tal:content=request tal:condition=false />
     <script type="text/javascript"><!--
       parent.submit.document.frm_help.cb_listpresent.checked=true;
       reviseList_framed(document.dummyform, text_field)
     //--></script>
  </body>
</html>

Roundup Issue Tracker: http://roundup-tracker.org/