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>Uploads which must be corrected:</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"> |
---|
31 | <tr> |
---|
32 | <th></th> |
---|
33 | <th>Filename</th> |
---|
34 | <th>Data Layout</th> |
---|
35 | <th>By</th> |
---|
36 | <th>Date</th> |
---|
37 | <th>Message</th> |
---|
38 | <th>Unknown Fields</th> |
---|
39 | </tr> |
---|
40 | <tr tal:repeat="row info/wrong" |
---|
41 | tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')"> |
---|
42 | <td align="left" valign="middle" style="width: 5px;"> |
---|
43 | <input type="checkbox" name="ids:list" value="" id="" class="noborder" |
---|
44 | tal:define="id string:${row/id}.csv" |
---|
45 | tal:attributes="value id; |
---|
46 | id python:'cb_' + id; |
---|
47 | checked python:id in info['choosen_ids'];" |
---|
48 | /> |
---|
49 | </td> |
---|
50 | <td tal:condition="nothing"> <a href="view" tal:attributes="href string:${row/url}"> <span tal:content="row/id" /></a> </td> |
---|
51 | <td tal:content="string:${row/id}.csv" ></td> |
---|
52 | <td> |
---|
53 | <select name="import_layout:record" tal:attributes="name string:${row/id}.import_layout:record"> |
---|
54 | <option tal:repeat="option python: context.portal_vocabularies.import_names.items()" |
---|
55 | tal:attributes="value python: option[0]; |
---|
56 | selected python: option[0] == row['import_layout']" |
---|
57 | tal:content="python:option[1]" /> |
---|
58 | </select> |
---|
59 | </td> |
---|
60 | <td tal:content="row/uploaded_by" ></td> |
---|
61 | <td tal:content="row/upload_date" ></td> |
---|
62 | <td tal:content="row/msg" ></td> |
---|
63 | <td> |
---|
64 | <div tal:repeat="key row/invalid_keys"> |
---|
65 | <span tal:replace="key" /><br /> |
---|
66 | <select tal:attributes="name string:${row/id}|${key}.valid_key:record"> |
---|
67 | <option tal:repeat="new row/valid_keys" |
---|
68 | tal:attributes="value new" |
---|
69 | tal:content="new" /> |
---|
70 | </select> |
---|
71 | </div> |
---|
72 | </td> |
---|
73 | <td tal:condition="python:0"> |
---|
74 | <a href="edit" tal:attributes="href string:${row/url}/external_edit_form" |
---|
75 | target="edit" |
---|
76 | onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')"> |
---|
77 | [edit] |
---|
78 | </a> |
---|
79 | </td> |
---|
80 | </tr> |
---|
81 | </table> |
---|
82 | <br /> |
---|
83 | <input tal:condition="nothing" type="button" value="button_select_all" class="context" |
---|
84 | onclick="someJavaScriptFunctionThatWillBeReplaced" |
---|
85 | i18n:attributes="value" |
---|
86 | tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')' |
---|
87 | % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" |
---|
88 | /> |
---|
89 | <input type="submit" name="edit" value="edit" |
---|
90 | class="destructive" i18n:attributes="value" |
---|
91 | /> |
---|
92 | <input type="submit" name="folder_delete:method" value="button_delete" |
---|
93 | class="destructive" i18n:attributes="value" |
---|
94 | tal:attributes="onclick python:'return window.confirm(\'%s\')' % |
---|
95 | (cpsmcat('description_confirm_delete'), )" |
---|
96 | /> |
---|
97 | </form> |
---|
98 | </span> |
---|
99 | <span tal:condition="info/importable"> |
---|
100 | <h2>Importable Uploads:</h2> |
---|
101 | <form action="" method="post" class="group" |
---|
102 | tal:attributes="action info/action" |
---|
103 | > |
---|
104 | <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content"> |
---|
105 | <tr> |
---|
106 | <th></th> |
---|
107 | <th>Filename</th> |
---|
108 | <th>Data Layout</th> |
---|
109 | <th>By</th> |
---|
110 | <th>Date</th> |
---|
111 | </tr> |
---|
112 | <tr tal:repeat="row info/importable" |
---|
113 | tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')"> |
---|
114 | <td align="left" valign="middle" style="width: 5px;"> |
---|
115 | <input type="checkbox" name="ids:list" value="" id="" class="noborder" |
---|
116 | tal:define="id string:${row/id}.csv" |
---|
117 | tal:attributes="value id; |
---|
118 | id python:'cb_' + id; |
---|
119 | checked python:id in info['choosen_ids'];" |
---|
120 | /> |
---|
121 | </td> |
---|
122 | <td tal:condition="nothing"> <a href="view" tal:attributes="href string:${row/url}"> <span tal:content="row/id" /></a> </td> |
---|
123 | <td tal:content="string:${row/id}.csv" ></td> |
---|
124 | <td tal:content="row/import_layout"></td> |
---|
125 | <td tal:content="row/uploaded_by" ></td> |
---|
126 | <td tal:content="row/upload_date" ></td> |
---|
127 | <td tal:content="row/msg" ></td> |
---|
128 | </tr> |
---|
129 | </table> |
---|
130 | <br /> |
---|
131 | <input tal:condition="nothing" type="button" value="button_select_all" class="context" |
---|
132 | onclick="someJavaScriptFunctionThatWillBeReplaced" |
---|
133 | i18n:attributes="value" |
---|
134 | tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')' |
---|
135 | % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" |
---|
136 | /> |
---|
137 | <input type="submit" name="import_uploads:method" value="import" |
---|
138 | class="destructive" i18n:attributes="value" |
---|
139 | tal:attributes="onclick python:'return window.confirm(\'%s\')' % |
---|
140 | (cpsmcat('description_confirm_delete'), )" |
---|
141 | /> |
---|
142 | <input type="submit" name="folder_delete:method" value="button_delete" |
---|
143 | class="destructive" i18n:attributes="value" |
---|
144 | tal:attributes="onclick python:'return window.confirm(\'%s\')' % |
---|
145 | (cpsmcat('description_confirm_delete'), )" |
---|
146 | /> |
---|
147 | </form> |
---|
148 | </span> |
---|
149 | <span tal:condition="info/imported"> |
---|
150 | <h2>Imported Uploads:</h2> |
---|
151 | <form action="" method="post" class="group" |
---|
152 | tal:attributes="action info/action" |
---|
153 | > |
---|
154 | <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content"> |
---|
155 | <tr> |
---|
156 | <th>Filename</th> |
---|
157 | <th>Data Layout</th> |
---|
158 | <th>By</th> |
---|
159 | <th>Date</th> |
---|
160 | <th>Import Date</th> |
---|
161 | <th>Message</th> |
---|
162 | </tr> |
---|
163 | <tr tal:repeat="row info/imported" |
---|
164 | tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')"> |
---|
165 | <td tal:condition="nothing"> <a href="view" tal:attributes="href string:${row/url}"> <span tal:content="row/id" /></a> </td> |
---|
166 | <td tal:content="string:${row/id}.done" ></td> |
---|
167 | <td tal:content="row/import_layout"></td> |
---|
168 | <td tal:content="row/uploaded_by" ></td> |
---|
169 | <td tal:content="row/upload_date" ></td> |
---|
170 | <td tal:content="row/imported_at" ></td> |
---|
171 | <td tal:content="row/msg"></td> |
---|
172 | </tr> |
---|
173 | </table> |
---|
174 | </form> |
---|
175 | </span> |
---|
176 | </metal:main> |
---|
177 | <metal:sub fill-slot="sub"/> |
---|
178 | </metal:body> |
---|
179 | </metal:html> |
---|