Code

Simplify.
authorstefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 4 Nov 2010 21:30:16 +0000 (21:30 +0000)
committerstefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 4 Nov 2010 21:30:16 +0000 (21:30 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4569 57a73879-2fb5-44c3-a270-3262357dd7e2

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

index cfa941cf9d89a4d4adce576d28d3f7f37f448f09..b5b626709ce896153f6ff792bd2fe67ba9b8f4d1 100644 (file)
@@ -1,77 +1,28 @@
 <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')">
- <form name="frm_help" action="#"
-       tal:define="batch request/batch;
-                   props python:request.form['properties'].value.split(',')">
-
-     <div id="classhelp-controls" tal:condition="context/is_edit_ok">
-       <!--input type="button" name="btn_clear"
-              value="Clear" onClick="clearList()"/ -->
-       <input type="text" name="text_preview" size="24" class="preview"
-              onchange="reviseList(this.value);"/>
-       <input type="button" name="btn_reset"
-              value=" Cancel " onclick="resetList(); parent.close();"
-              i18n:attributes="value" />
-       <input type="button" name="btn_apply" class="apply"
-              value=" Apply " onclick="updateList(); parent.close();"
-              i18n:attributes="value" />
-     </div>
-     <table width="100%">
-      <tr class="navigation">
-       <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,
-            'properties': request.form['properties'].value,
-            'form': request.form['form'].value,
-            'type': request.form['type'].value,
-            '@startwith':prev.first, '@pagesize':prev.size})"
-           i18n:translate="" >&lt;&lt; previous</a>
-        &nbsp;
-       </th>
-       <th i18n:translate=""><span tal:replace="batch/start" i18n:name="start"
-        />..<span tal:replace="python: batch.start + batch.length -1" i18n:name="end"
-        /> out of <span tal:replace="batch/sequence_length" i18n:name="total"
-        />
-       </th>
-       <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,
-            'properties': request.form['properties'].value,
-            'form': request.form['form'].value,
-            'type': request.form['type'].value,
-            '@startwith':next.first, '@pagesize':next.size})"
-           i18n:translate="" >next &gt;&gt;</a>
-        &nbsp;
-       </th>
-      </tr>
-     </table>
-
-     <table class="classhelp">
-       <tr>
-           <th tal:condition="context/is_edit_ok">&nbsp;<b>x</b></th>
-           <th tal:repeat="prop props" tal:content="prop" i18n:translate=""></th>
-       </tr>
+ <form name="frm_help" action="#">
+     <table class="classhelp"
+            tal:define="props python:request.form['properties'].value.split(',');
+                        legend templates/help/macros/legend;
+                        navigation templates/help/macros/batch_navi;
+                       batch request/batch;">
+      <thead>
+       <tr metal:use-macro="legend"/>
+       <tr metal:use-macro="navigation"/>
+      </thead>
+      <tfoot>
+       <tr metal:use-macro="navigation"/>
+       <tr metal:use-macro="legend"/>
+      </tfoot>
        <tr tal:repeat="item batch">
          <tal:block tal:define="attr python:item[props[0]]" >
-           <td tal:condition="context/is_edit_ok">
-             <input name="check"
-                 onclick="updatePreview();"
-                 tal:attributes="type python:request.form['type'].value;
-                                 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>
-       <tr>
-           <th>&nbsp;<b>x</b></th>
-           <th tal:repeat="prop props" tal:content="prop" i18n:translate=""></th>
+           <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>
      </table>
 
index e262bf4113732df81a1dac5547d5ab36eeefc233..a279d8cefdbace73cd47f9337fa5c0b3d90fac3e 100644 (file)
@@ -3,12 +3,12 @@
   allowed to view this page.</p>
 
   <tal:if condition="context/is_view_ok">
-   <tal:def define="batch request/batch">
     <form>
      <table class="classhelp"
             tal:define="props python:request.form['properties'].value.split(',');
                         legend templates/query/macros/legend;
-                        navigation templates/query/macros/navigation;">
+                        navigation templates/query/macros/navigation;
+                       batch request/batch;">
       <thead>
        <tr metal:use-macro="navigation"/>
         <tr metal:use-macro="legend"/>
@@ -35,7 +35,6 @@
        </tbody>
      </table>
     </form>
-   </tal:def> <!-- batch -->
   </tal:if>
 </tal:block>