source: WAeUP_SRP/base/skins/waeup_upload/uploads_form.pt @ 3308

Last change on this file since 3308 was 3308, checked in by Henrik Bettermann, 17 years ago

set correct import_date and imported_by

  • Property svn:keywords set to Id
File size: 9.2 KB
Line 
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">     
31            <tr>
32              <th></th>
33              <th>Filename</th>
34              <th>Data Layout</th>
35              <th>By</th>
36              <th>Upload Date</th>
37              <th>Error Message</th>
38              <th>Invalid Keys</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         
83          <br />
84         
85          <font color='red'>Please see error message for further information. If there are
86          'invalid keys in heading', you can edit the uploaded file online. Select the correct keys
87          (column titles) from the select boxes provided, tick the box in the first column of the table and press the Edit button.
88          If you have accidentally chosen the wrong import data layout, select the correct layout and press the Edit button.  </font>
89                   
90          <br /><br />
91          <input tal:condition="nothing" type="button" value="button_select_all" class="context"
92                 onclick="someJavaScriptFunctionThatWillBeReplaced"
93                 i18n:attributes="value"
94                 tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
95                 % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
96                 />
97          <input type="submit" name="edit" value="Edit"
98                 class="destructive" i18n:attributes="value"
99                 />
100          <input type="submit" name="folder_delete:method" value="button_delete"
101                 class="destructive" i18n:attributes="value"
102                 tal:attributes="onclick python:'return window.confirm(\'%s\')' %
103                 (cpsmcat('description_confirm_delete'), )"
104                 />
105        </form>
106      </span>
107      <span tal:condition="info/importable">
108        <h2>Importable Uploads</h2>
109        <form action="" method="post" class="group"
110              tal:attributes="action info/action"
111              >
112          <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">     
113            <tr>
114              <th></th>
115              <th>Filename</th>
116              <th>Data Layout</th>
117              <th>By</th>
118              <th>Upload Date</th>
119            </tr>           
120            <tr tal:repeat="row info/importable"
121                tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
122              <td align="left" valign="middle" style="width: 5px;">
123                <input type="checkbox" name="ids:list" value="" id="" class="noborder"
124                       tal:define="id string:${row/id}.csv"
125                       tal:attributes="value id;
126                       id python:'cb_' + id;
127                       checked python:id in info['choosen_ids'];"
128                       />
129              </td>
130              <td tal:condition="nothing"> <a href="view" tal:attributes="href string:${row/url}"> <span tal:content="row/id" /></a>  </td>
131              <td tal:content="string:${row/id}.csv" ></td>
132              <td tal:content="row/import_layout"></td>
133              <td tal:content="row/uploaded_by" ></td>
134              <td tal:content="row/upload_date" ></td>
135              <td tal:content="row/msg" ></td>
136            </tr>
137          </table>
138          <br />
139          <input tal:condition="nothing" type="button" value="button_select_all" class="context"
140                 onclick="someJavaScriptFunctionThatWillBeReplaced"
141                 i18n:attributes="value"
142                 tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
143                 % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
144                 />
145          <input type="submit" name="import_uploads:method" value="Import"
146                 tal:condition="info/import_allowed"
147                 class="destructive" i18n:attributes="value"
148                 tal:attributes="onclick python:'return window.confirm(\'%s\')' %
149                 (cpsmcat('description_confirm_delete'), )"
150                 />
151          <input type="submit" name="folder_delete:method" value="button_delete"
152                 class="destructive" i18n:attributes="value"
153                 tal:attributes="onclick python:'return window.confirm(\'%s\')' %
154                 (cpsmcat('description_confirm_delete'), )"
155                 />
156        </form>
157      </span>
158      <span tal:condition="info/imported">
159        <h2>Imported Uploads</h2>
160        <form action="" method="post" class="group"
161              tal:attributes="action info/action"
162              >
163          <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">     
164            <tr>
165              <th>File in Archive</th>
166              <th>Data Layout</th>
167              <th>Uploaded By</th>
168              <th>Upload Date</th>
169              <th>Imported By</th>
170              <th>Import Date</th>
171              <th>Message</th>
172            </tr>           
173            <tr tal:repeat="row info/imported"
174                tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
175              <td tal:condition="nothing"> <a href="view" tal:attributes="href string:${row/url}"> <span tal:content="row/id" /></a>  </td>
176              <td tal:content="string:${row/id}.done" ></td>
177              <td tal:content="row/import_layout"></td>
178              <td tal:content="row/uploaded_by" ></td>
179              <td tal:content="row/upload_date" ></td>
180              <td tal:content="row/imported_by" ></td>
181              <td tal:content="row/import_date" ></td>
182              <td tal:content="row/msg"></td>
183            </tr>
184          </table>
185        </form>
186      </span>
187    </metal:main>
188    <metal:sub fill-slot="sub"/>
189  </metal:body>
190</metal:html>
Note: See TracBrowser for help on using the repository browser.