Commit 4dfb7358 authored by Andreas Jung's avatar Andreas Jung

Collector #1523: replace the text field for importing .zexp files with a select list

parent 714cda2d
......@@ -567,6 +567,18 @@ class ObjectManager(
ob=self._getOb(id)
ob.manage_changeOwnershipType(explicit=0)
def list_imports(self):
listing = []
cfg = getConfiguration()
paths = [cfg.zopehome]
if not cfg.instancehome in paths:
paths.append(cfg.instancehome)
for impath in paths:
directory = os.path.join(impath, 'import')
listing += [f for f in os.listdir(directory)
if f.endswith('.zexp') or f.endswith('.xml')]
return listing
# FTP support methods
def manage_FTPlist(self, REQUEST):
......
......@@ -88,11 +88,14 @@ ownership information".
</div>
</td>
<td align="left" valign="top">
<input type="text" name="file" size="25" value="" />
<select name="file">
<dtml-in "list_imports()">
<option value="<dtml-var sequence-item>"><dtml-var sequence-item></option>
</dtml-in>
</select>
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
Ownership
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment