Skip to content

Commit 8d37a3b

Browse files
committed
Simplify.
1 parent ca0f680 commit 8d37a3b

File tree

2 files changed

+22
-72
lines changed

2 files changed

+22
-72
lines changed

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

Lines changed: 20 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,28 @@
11
<tal:block metal:use-macro="templates/help/macros/frame">
22
<tal:block metal:fill-slot="content">
33
<tal:block tal:condition="python:request.form.has_key('property')">
4-
<form name="frm_help" action="#"
5-
tal:define="batch request/batch;
6-
props python:request.form['properties'].value.split(',')">
7-
8-
<div id="classhelp-controls" tal:condition="context/is_edit_ok">
9-
<!--input type="button" name="btn_clear"
10-
value="Clear" onClick="clearList()"/ -->
11-
<input type="text" name="text_preview" size="24" class="preview"
12-
onchange="reviseList(this.value);"/>
13-
<input type="button" name="btn_reset"
14-
value=" Cancel " onclick="resetList(); parent.close();"
15-
i18n:attributes="value" />
16-
<input type="button" name="btn_apply" class="apply"
17-
value=" Apply " onclick="updateList(); parent.close();"
18-
i18n:attributes="value" />
19-
</div>
20-
<table width="100%">
21-
<tr class="navigation">
22-
<th>
23-
<a tal:define="prev batch/previous" tal:condition="prev"
24-
tal:attributes="href python:request.indexargs_url(request.classname,
25-
{'@template':'help', 'property': request.form['property'].value,
26-
'properties': request.form['properties'].value,
27-
'form': request.form['form'].value,
28-
'type': request.form['type'].value,
29-
'@startwith':prev.first, '@pagesize':prev.size})"
30-
i18n:translate="" >&lt;&lt; previous</a>
31-
&nbsp;
32-
</th>
33-
<th i18n:translate=""><span tal:replace="batch/start" i18n:name="start"
34-
/>..<span tal:replace="python: batch.start + batch.length -1" i18n:name="end"
35-
/> out of <span tal:replace="batch/sequence_length" i18n:name="total"
36-
/>
37-
</th>
38-
<th>
39-
<a tal:define="next batch/next" tal:condition="next"
40-
tal:attributes="href python:request.indexargs_url(request.classname,
41-
{'@template':'help', 'property': request.form['property'].value,
42-
'properties': request.form['properties'].value,
43-
'form': request.form['form'].value,
44-
'type': request.form['type'].value,
45-
'@startwith':next.first, '@pagesize':next.size})"
46-
i18n:translate="" >next &gt;&gt;</a>
47-
&nbsp;
48-
</th>
49-
</tr>
50-
</table>
51-
52-
<table class="classhelp">
53-
<tr>
54-
<th tal:condition="context/is_edit_ok">&nbsp;<b>x</b></th>
55-
<th tal:repeat="prop props" tal:content="prop" i18n:translate=""></th>
56-
</tr>
4+
<form name="frm_help" action="#">
5+
<table class="classhelp"
6+
tal:define="props python:request.form['properties'].value.split(',');
7+
legend templates/help/macros/legend;
8+
navigation templates/help/macros/batch_navi;
9+
batch request/batch;">
10+
<thead>
11+
<tr metal:use-macro="legend"/>
12+
<tr metal:use-macro="navigation"/>
13+
</thead>
14+
<tfoot>
15+
<tr metal:use-macro="navigation"/>
16+
<tr metal:use-macro="legend"/>
17+
</tfoot>
5718
<tr tal:repeat="item batch">
5819
<tal:block tal:define="attr python:item[props[0]]" >
59-
<td tal:condition="context/is_edit_ok">
60-
<input name="check"
61-
onclick="updatePreview();"
62-
tal:attributes="type python:request.form['type'].value;
63-
value attr; id string:id_$attr" />
64-
</td>
65-
<td tal:repeat="prop props">
66-
<label class="classhelp-label"
67-
tal:attributes="for string:id_$attr"
68-
tal:content="structure python:item[prop]"></label>
69-
</td>
70-
</tal:block>
71-
</tr>
72-
<tr>
73-
<th>&nbsp;<b>x</b></th>
74-
<th tal:repeat="prop props" tal:content="prop" i18n:translate=""></th>
20+
<td tal:repeat="prop props">
21+
<label class="classhelp-label"
22+
tal:attributes="for string:id_$attr"
23+
tal:content="structure python:item[prop]"></label>
24+
</td>
25+
</tal:block>
7526
</tr>
7627
</table>
7728

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
allowed to view this page.</p>
44

55
<tal:if condition="context/is_view_ok">
6-
<tal:def define="batch request/batch">
76
<form>
87
<table class="classhelp"
98
tal:define="props python:request.form['properties'].value.split(',');
109
legend templates/query/macros/legend;
11-
navigation templates/query/macros/navigation;">
10+
navigation templates/query/macros/navigation;
11+
batch request/batch;">
1212
<thead>
1313
<tr metal:use-macro="navigation"/>
1414
<tr metal:use-macro="legend"/>
@@ -35,7 +35,6 @@
3535
</tbody>
3636
</table>
3737
</form>
38-
</tal:def> <!-- batch -->
3938
</tal:if>
4039
</tal:block>
4140

0 commit comments

Comments
 (0)