1 | <tal:block define="mode options/mode; |
---|
2 | id here/getWidgetId; |
---|
3 | id_s string:${id}_s; |
---|
4 | id_g string:${id}_g; |
---|
5 | results options/datastructure/?id; |
---|
6 | subject options/datastructure/?id_s; |
---|
7 | grade options/datastructure/?id_g; |
---|
8 | "> |
---|
9 | <tal:block condition="python: mode == 'view'"> |
---|
10 | <table> |
---|
11 | <tr><th>Subject</th><th>Grade</th> |
---|
12 | <tr tal:repeat="res results"> |
---|
13 | <td tal:repeat="col res" tal:content="col" /> |
---|
14 | </tr> |
---|
15 | </table> |
---|
16 | </tal:block> |
---|
17 | <tal:block define="name here/getHtmlWidgetId;" |
---|
18 | condition="python: mode == 'edit'"> |
---|
19 | <table> |
---|
20 | <tr><th>Subject</th><th>Grade</th> |
---|
21 | <tr tal:repeat="res results"> |
---|
22 | <td tal:repeat="col res" tal:content="col" /> |
---|
23 | </tr> |
---|
24 | <tr> |
---|
25 | <td><select size="1" |
---|
26 | tal:attributes="name string:${name}_s; |
---|
27 | id string:${name}_s;"> |
---|
28 | <option tal:repeat="sub python:(('','----'),('Maths','Mathematics'),('English','English'))" |
---|
29 | tal:attributes="value python:sub[0]" |
---|
30 | tal:content="python: sub[1]"> |
---|
31 | </option> |
---|
32 | </select> |
---|
33 | </td> |
---|
34 | <td> |
---|
35 | <select size="1" |
---|
36 | tal:attributes="name string:${name}_g; |
---|
37 | id string:${name}_g;"> |
---|
38 | <option tal:repeat="sub python:(('','-'),('A','A'),('B','B'),('C','C'),('D','D'))" |
---|
39 | tal:attributes="value python:sub[0]" |
---|
40 | tal:content="python: sub[1]"> |
---|
41 | </option> |
---|
42 | </select> |
---|
43 | </td> |
---|
44 | <td> |
---|
45 | <input type="submit" class="standalone" name="cpsdocument_edit_button" |
---|
46 | value="Add/Modify" |
---|
47 | id="cpsdocument_edit_button" /> |
---|
48 | </td> |
---|
49 | </tr> |
---|
50 | </table> |
---|
51 | </tal:block> |
---|
52 | </tal:block> |
---|