_finishConsrtuction a disparu => les slots ne sont plus construits. On assure donc...
[MosaicDocument.git] / dtml / rulesForm.dtml
1 <dtml-let form_title="'Actions'">
2 <dtml-if manage_page_header>
3 <dtml-var manage_page_header>
4 <dtml-else>
5 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
6 <html lang="en">
7 <head>
8 <title>&dtml-form_title;</title>
9 </head>
10 <body bgcolor="#FFFFFF" link="#000099" vlink="#555555">
11 <h3>&dtml-form_title;</h3>
12 </dtml-if>
13 </dtml-let>
14 <dtml-var manage_tabs>
15
16 <dtml-let mbis="[ct.id for ct in mosaic_tool.listTypeInfo() if ct.meta_type == 'Mosaic Block Information']"
17 availMbis="[ct.id for ct in mosaic_tool.listTypeInfo() if ct.meta_type == 'Mosaic Block Information' and ct.id not in objectIds(['Rule Information',])]">
18 <dtml-if "objectIds(['Rule Information',])">
19 <form action="&dtml-absolute_url;" method="POST">
20 <dtml-in "objectValues(['Rule Information',])">
21 <dtml-let currentSlot="_['sequence-item']">
22 <table>
23 <tr>
24 <td>
25 <input type="checkbox" name="ruleSelection:list"
26 value="<dtml-var "_['sequence-item'].id">">
27 </td>
28 <td class="form-label">
29 Block type
30 </td>
31 <td>
32 <dtml-let blockId="_['sequence-item'].id">
33 <select name="<dtml-var "blockId+'.id:record'">">
34 <dtml-in "[blockId,] + availMbis">
35 <option value="<dtml-var sequence-item>" <dtml-if "blockId == _['sequence-item']">selected</dtml-if>>
36 <dtml-var sequence-item>
37 </option>
38 </dtml-in>
39 </select>
40 </dtml-let>
41 </td>
42 </tr>
43 <tr>
44 <td></td>
45 <td class="form-label">
46 Max intances nb
47 </td>
48 <td>
49 <input type="text"
50 name="<dtml-var "_['sequence-item'].id + '.maxNbInstance:int:record'">"
51 value="<dtml-var "_['sequence-item'].maxNbInstance">">
52 </td>
53 </tr>
54 <tr>
55 <td></td>
56 <td class="form-label">
57 Allow Move
58 </td>
59 <td>
60 <select name="<dtml-var "_['sequence-item'].id + '.allowMove:int:record'">">
61 <option value="1" <dtml-if "_['sequence-item'].allowMove">selected</dtml-if>>yes</option>
62 <option value="0" <dtml-if "not _['sequence-item'].allowMove">selected</dtml-if>>no</option>
63 </select>
64 </td>
65 </tr>
66 <tr>
67 <td></td>
68 <td class="form-label">
69 Allow Move right and left
70 </td>
71 <td>
72 <select name="<dtml-var "_['sequence-item'].id + '.allowMoveRightAndLeft:int:record'">">
73 <option value="1" <dtml-if "_['sequence-item'].allowMoveRightAndLeft">selected</dtml-if>>yes</option>
74 <option value="0" <dtml-if "not _['sequence-item'].allowMoveRightAndLeft">selected</dtml-if>>no</option>
75 </select>
76 </td>
77 </tr>
78 <tr>
79 <td></td>
80 <td class="form-label">
81 Allow Move up and down
82 </td>
83 <td>
84 <select name="<dtml-var "_['sequence-item'].id + '.allowMoveUpAndDown:int:record'">">
85 <option value="1" <dtml-if "_['sequence-item'].allowMoveUpAndDown">selected</dtml-if>>yes</option>
86 <option value="0" <dtml-if "not _['sequence-item'].allowMoveUpAndDown">selected</dtml-if>>no</option>
87 </select>
88 </td>
89 </tr>
90 <tr>
91 <td></td>
92 <td class="form-label">
93 Mode
94 </td>
95 <td>
96 <select name="<dtml-var "_['sequence-item'].id + '.mode:record'">"
97 <option value="wd" <dtml-if "_['sequence-item'].mode == 'wd'">selected</dtml-if>>wd</option>
98 <option value="w" <dtml-if "_['sequence-item'].mode == 'w'">selected</dtml-if>>w</option>
99 </select>
100 </td>
101 </tr>
102 <tr>
103 <td colspan="3"><hr></td>
104 </tr>
105 </table>
106 </dtml-let>
107 </dtml-in>
108 <div>
109 <input type="submit" name="saveRules:method" value="Save">
110 <input type="submit" name="deleteRules:method" value="Delete">
111 </div>
112 </form>
113 </dtml-if>
114
115 <dtml-if availMbis>
116 <h3 class="form-help">Add a rule</h3>
117 <form action="manage_addRule" method="POST">
118 <table>
119 <tr>
120 <td class="form-label">
121 Block type
122 </td>
123 <td class="form-label">
124 <select name="id">
125 <dtml-in availMbis>
126 <option value="<dtml-var sequence-item>"><dtml-var sequence-item></option>
127 </dtml-in>
128 </select>
129 </td>
130 </tr>
131 <tr>
132 <td class="form-label">
133 Max intances nb
134 </td>
135 <td class="form-label">
136 <input type="text" name="maxNbInstance:int" value="0">
137 </td>
138 </tr>
139 <tr>
140 <tr>
141 <td class="form-label">
142 Allow Move
143 </td>
144 <td>
145 <select name="allowMove:int">
146 <option value="1" selected>yes</option>
147 <option value="0">no</option>
148 </select>
149 </td>
150 </tr>
151 <tr>
152 <td class="form-label">
153 Mode
154 </td>
155 <td>
156 <select name="mode">"
157 <option value="wd" selected>wd</option>
158 <option value="w">w</option>
159 </select>
160 </td>
161 </tr>
162 </tr>
163 <td colspan="2"><input type="submit" value="Add"></td>
164 </tr>
165 </table>
166 </form>
167 </dtml-if>
168 </dtml-let>
169 <dtml-if manage_page_footer>
170 <dtml-var manage_page_footer>
171 <dtml-else>
172 </body></html>
173 </dtml-if>