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 | <div tal:repeat="res results"> |
---|
11 | <span tal:repeat="col res"><span tal:content="col" /> </span> |
---|
12 | </div> |
---|
13 | </tal:block> |
---|
14 | <tal:block define="name here/getHtmlWidgetId;" |
---|
15 | condition="python: mode == 'edit'"> |
---|
16 | <table border=0 cellpadding=0 cellspacing=0> |
---|
17 | <tr><th>Subject</th><th>Grade</th> |
---|
18 | <tr tal:repeat="res results"> |
---|
19 | <td tal:repeat="col res" tal:content="col" /> |
---|
20 | </tr> |
---|
21 | <tr> |
---|
22 | <td><select size="1" |
---|
23 | tal:attributes="name string:${name}_s; |
---|
24 | id string:${name}_s;"> |
---|
25 | <option tal:repeat="sub python:(('','----'),('Mathematics','Mathematics'),('English','English'))" |
---|
26 | tal:attributes="value python:sub[0]" |
---|
27 | tal:content="python: sub[1]"> |
---|
28 | </option> |
---|
29 | </select> |
---|
30 | </td> |
---|
31 | <td> |
---|
32 | <select size="1" |
---|
33 | tal:attributes="name string:${name}_g; |
---|
34 | id string:${name}_g;"> |
---|
35 | <option tal:repeat="sub python:(('','-'),('A','A'),('B','B'),('C','C'),('D','D'))" |
---|
36 | tal:attributes="value python:sub[0]" |
---|
37 | tal:content="python: sub[1]"> |
---|
38 | </option> |
---|
39 | </select> |
---|
40 | </td> |
---|
41 | <td> |
---|
42 | <input type="submit" class="standalone" name="cpsdocument_edit_button" |
---|
43 | value="Add/Modify" |
---|
44 | id="cpsdocument_edit_button" /> |
---|
45 | </td> |
---|
46 | </tr> |
---|
47 | </table> |
---|
48 | </tal:block> |
---|
49 | </tal:block> |
---|