Changeset 9025 for main/waeup.kofa/trunk
- Timestamp:
- 19 Jul 2012, 20:30:20 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/browser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r9024 r9025 878 878 def getImporters(self): 879 879 importers = getAllUtilitiesRegisteredFor(IBatchProcessor) 880 importers = sorted( 881 [dict(title=x.name, name=x.util_name, fields=x.available_fields) 882 for x in importers], key=lambda k: k['title']) 883 return importers 880 importer_props = [] 881 for x in importers: 882 iface_fields = schema.getFields(x.iface) 883 available_fields = [] 884 for key in iface_fields.keys(): 885 iface_fields[key] = iface_fields[key].__class__.__name__ 886 for value in x.available_fields: 887 available_fields.append( 888 dict(f_name=value, 889 f_type=iface_fields.get(value, 'None'))) 890 available_fields = sorted(available_fields, key=lambda k: k['f_name']) 891 importer_props.append( 892 dict(title=x.name, name=x.util_name, fields=available_fields)) 893 return sorted(importer_props, key=lambda k: k['title']) 884 894 885 895 class FileDownloadView(UtilityView, grok.View): -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenteruploadpage.pt
r9024 r9025 19 19 <th i18n:translate="">Processor</th> 20 20 <th i18n:translate="">Available Fields</th> 21 <th i18n:translate="">CSV File Header</th> 21 22 </tr> 22 23 </thead> … … 24 25 <td tal:content="importer/title"></td> 25 26 <td> 26 <span tal:repeat="field python:sorted(importer['fields'])"> 27 <span tal:replace="field"></span>, 27 <span tal:repeat="field importer/fields"> 28 <span tal:replace="field/f_name"></span> 29 (<span tal:replace="field/f_type"></span>), 30 </span> 31 </td> 32 <td> 33 <span tal:repeat="field importer/fields"> 34 <span tal:replace="field/f_name"></span>, 28 35 </span> 29 36 </td>
Note: See TracChangeset for help on using the changeset viewer.