1 | <metal:html tal:define="info options/info; |
---|
2 | portal_status_message options/psm|request/portal_status_message; |
---|
3 | ds options/ds; |
---|
4 | mode options/mode; |
---|
5 | rendered options/rendered;" |
---|
6 | > |
---|
7 | <metal:body use-macro="here/main_template/macros/master"> |
---|
8 | <metal:block fill-slot="header"> |
---|
9 | <a href="" |
---|
10 | tal:attributes="href string:${here/academicsParent}"> |
---|
11 | <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/> |
---|
12 | Up one level |
---|
13 | </a> |
---|
14 | <h3 tal:content="here/title_or_id" /> |
---|
15 | <div tal:condition="python:0" tal:content="info/container_path"/> |
---|
16 | <br /> |
---|
17 | </metal:block> |
---|
18 | <metal:main fill-slot="main"> |
---|
19 | <form action="" method="post" enctype="multipart/form-data" class="group"> |
---|
20 | <span tal:replace="structure rendered" /> |
---|
21 | <br /> |
---|
22 | <input type="submit" name="upload" value="Upload" |
---|
23 | class="destructive" /> |
---|
24 | </form> |
---|
25 | <span tal:condition="info/wrong"> |
---|
26 | <h2>Non-importable Uploads</h2> |
---|
27 | <form action="" method="post" class="group" |
---|
28 | tal:attributes="action info/action" |
---|
29 | > |
---|
30 | <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content" border=0> |
---|
31 | <tr> |
---|
32 | <th></th> |
---|
33 | <th>Filename</th> |
---|
34 | <th>Data Layout</th> |
---|
35 | <th>Uploaded By</th> |
---|
36 | <th>Upload Date</th> |
---|
37 | <th>Error Message</th> |
---|
38 | </tr> |
---|
39 | <span tal:repeat="row info/wrong" tal:omit-tag=""> |
---|
40 | <tr tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')"> |
---|
41 | <td align="left" valign="middle" style="width: 5px;"> |
---|
42 | <input type="checkbox" name="ids:list" value="" id="" class="noborder" |
---|
43 | tal:define="id string:${row/id}.csv" |
---|
44 | tal:attributes="value id; |
---|
45 | id python:'cb_' + id; |
---|
46 | checked python:id in info['choosen_ids'];" |
---|
47 | /> |
---|
48 | </td> |
---|
49 | <td tal:condition="nothing"> <a href="view" tal:attributes="href string:${row/url}"> <span tal:content="row/id" /></a> </td> |
---|
50 | <td tal:content="string:${row/id}.csv" ></td> |
---|
51 | <td> |
---|
52 | <select name="import_layout:record" tal:attributes="name string:${row/id}.import_layout:record"> |
---|
53 | <option tal:repeat="option python: context.portal_vocabularies.import_names.items()" |
---|
54 | tal:attributes="value python: option[0]; |
---|
55 | selected python: option[0] == row['import_layout']" |
---|
56 | tal:content="python:option[1]" /> |
---|
57 | </select> |
---|
58 | </td> |
---|
59 | <td tal:content="row/uploaded_by" ></td> |
---|
60 | <td tal:content="row/upload_date" ></td> |
---|
61 | <td tal:content="row/msg" ></td> |
---|
62 | </tr> |
---|
63 | |
---|
64 | <tr> |
---|
65 | <td> </td> |
---|
66 | <td> </td> |
---|
67 | <td> </td> |
---|
68 | <td colspan="3"> </td> |
---|
69 | </tr> |
---|
70 | <tr> |
---|
71 | <th></th> |
---|
72 | <th>Current Column Title</th> |
---|
73 | <th>Possible Field Names</th> |
---|
74 | <th colspan="3">First Record (Example)</th> |
---|
75 | </tr> |
---|
76 | <tr tal:repeat="key row/fields"> |
---|
77 | <td /> |
---|
78 | <td colspan="1"> |
---|
79 | <font tal:attributes="color python: test(key[3],'red','black')"> |
---|
80 | <span tal:content="python: key[0]" tal:omit-tag=""/> |
---|
81 | <span tal:condition="python: key[3]" tal:content="python: key[3]" tal:omit-tag=""/> |
---|
82 | </font> |
---|
83 | </td> |
---|
84 | <td colspan="1" |
---|
85 | tal:define="old_key python: key[0];new_key python: key[1];"> |
---|
86 | <select tal:attributes="name string:${row/id}|${repeat/key/index}.valid_key:record"> |
---|
87 | <option tal:repeat="new row/valid_keys" |
---|
88 | tal:attributes="value new; selected python: new_key == new" |
---|
89 | tal:content="new" /> |
---|
90 | </select><br /> |
---|
91 | </td> |
---|
92 | <td colspan="3" tal:content="python: key[2]" /> |
---|
93 | </tr> |
---|
94 | |
---|
95 | |
---|
96 | <tr> |
---|
97 | <td> </td> |
---|
98 | <td> </td> |
---|
99 | <td> </td> |
---|
100 | <td colspan="3"> </td> |
---|
101 | </tr> |
---|
102 | |
---|
103 | |
---|
104 | </span> |
---|
105 | </table> |
---|
106 | |
---|
107 | |
---|
108 | <font color='red'>Please see error message for further information. If there are errors in the headline of the import file |
---|
109 | (e.g. invalid keys in heading), you can edit the uploaded file online. Select the correct field names |
---|
110 | from the select boxes provided, tick the box in the first column of the table and press the Edit button. |
---|
111 | If you have accidentally chosen the wrong import data layout, select the correct layout and press the Edit button. </font> |
---|
112 | |
---|
113 | <br /><br /> |
---|
114 | <input tal:condition="nothing" type="button" value="button_select_all" class="context" |
---|
115 | onclick="someJavaScriptFunctionThatWillBeReplaced" |
---|
116 | i18n:attributes="value" |
---|
117 | tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')' |
---|
118 | % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" |
---|
119 | /> |
---|
120 | <input type="submit" name="edit" value="Edit" |
---|
121 | class="destructive" i18n:attributes="value" |
---|
122 | /> |
---|
123 | <input type="submit" name="folder_delete:method" value="button_delete" |
---|
124 | class="destructive" i18n:attributes="value" |
---|
125 | tal:attributes="onclick python:'return window.confirm(\'%s\')' % |
---|
126 | (cpsmcat('description_confirm_delete'), )" |
---|
127 | /> |
---|
128 | </form> |
---|
129 | </span> |
---|
130 | <span tal:condition="info/importable"> |
---|
131 | <h2>Importable Uploads</h2> |
---|
132 | <form action="" method="post" class="group" |
---|
133 | tal:attributes="action info/action" |
---|
134 | > |
---|
135 | <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content"> |
---|
136 | <tr> |
---|
137 | <th></th> |
---|
138 | <th>Filename</th> |
---|
139 | <th>Data Layout</th> |
---|
140 | <th>Uploaded By</th> |
---|
141 | <th>Upload Date</th> |
---|
142 | </tr> |
---|
143 | <tr tal:repeat="row info/importable" |
---|
144 | tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')"> |
---|
145 | <td align="left" valign="middle" style="width: 5px;"> |
---|
146 | <input type="checkbox" name="ids:list" value="" id="" class="noborder" |
---|
147 | tal:define="id string:${row/id}.csv" |
---|
148 | tal:attributes="value id; |
---|
149 | id python:'cb_' + id; |
---|
150 | checked python:id in info['choosen_ids'];" |
---|
151 | /> |
---|
152 | </td> |
---|
153 | <td tal:condition="nothing"> <a href="view" tal:attributes="href string:${row/url}"> <span tal:content="row/id" /></a> </td> |
---|
154 | <td tal:content="string:${row/id}.csv" ></td> |
---|
155 | <td tal:content="row/import_layout"></td> |
---|
156 | <td tal:content="row/uploaded_by" ></td> |
---|
157 | <td tal:content="row/upload_date" ></td> |
---|
158 | <td tal:content="row/msg" ></td> |
---|
159 | </tr> |
---|
160 | </table> |
---|
161 | <br /> |
---|
162 | <input tal:condition="nothing" type="button" value="button_select_all" class="context" |
---|
163 | onclick="someJavaScriptFunctionThatWillBeReplaced" |
---|
164 | i18n:attributes="value" |
---|
165 | tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')' |
---|
166 | % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" |
---|
167 | /> |
---|
168 | <input type="submit" name="import_uploads:method" value="Import" |
---|
169 | tal:condition="info/import_allowed" |
---|
170 | class="destructive" i18n:attributes="value" |
---|
171 | tal:attributes="onclick python:'return window.confirm(\'%s\')' % |
---|
172 | (cpsmcat('description_confirm_delete'), )" |
---|
173 | /> |
---|
174 | <input type="submit" name="goto_edit" value="Re-edit" |
---|
175 | class="destructive" i18n:attributes="value" |
---|
176 | /> |
---|
177 | <input type="submit" name="folder_delete:method" value="button_delete" |
---|
178 | class="destructive" i18n:attributes="value" |
---|
179 | tal:attributes="onclick python:'return window.confirm(\'%s\')' % |
---|
180 | (cpsmcat('description_confirm_delete'), )" |
---|
181 | /> |
---|
182 | </form> |
---|
183 | </span> |
---|
184 | <span tal:condition="info/imported"> |
---|
185 | <h2>Imported Uploads (last ten)</h2> |
---|
186 | <form action="" method="post" class="group" |
---|
187 | tal:attributes="action info/action" |
---|
188 | > |
---|
189 | <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content"> |
---|
190 | <tr> |
---|
191 | <th>File in Archive</th> |
---|
192 | <th>Data Layout</th> |
---|
193 | <th>Uploaded By</th> |
---|
194 | <th>Upload Date</th> |
---|
195 | <th>Imported By</th> |
---|
196 | <th>Import Date</th> |
---|
197 | <th>Message</th> |
---|
198 | <th>Downloads</th> |
---|
199 | </tr> |
---|
200 | <tr tal:repeat="row python:info['imported'][:10]" |
---|
201 | tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')"> |
---|
202 | <td nowrap tal:condition="python:len(row['id']) > 8" tal:content="python:row['id'][:8] + '[...].done'" ></td> |
---|
203 | <td tal:condition="python:len(row['id']) <= 8" tal:content="python:row['id'] + '.done'" ></td> |
---|
204 | <td tal:content="row/import_layout"></td> |
---|
205 | <td tal:content="row/uploaded_by" ></td> |
---|
206 | <td tal:content="row/upload_date" ></td> |
---|
207 | <td tal:content="row/imported_by" ></td> |
---|
208 | <td tal:content="row/import_date" ></td> |
---|
209 | <td tal:content="row/msg"></td> |
---|
210 | <td nowrap> <a href="view" tal:attributes="href string:${row/url}/download_pending">all pendings</a> <br /><br /> |
---|
211 | <a href="view" tal:attributes="href string:${row/url}/download_errors">only errors</a> </td> |
---|
212 | </tr> |
---|
213 | </table> |
---|
214 | </form> |
---|
215 | </span> |
---|
216 | </metal:main> |
---|
217 | <metal:sub fill-slot="sub"/> |
---|
218 | </metal:body> |
---|
219 | </metal:html> |
---|